/* 1. Global Reset - Makes browsers behave consistently */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 2. Page Defaults */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: #222;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; border-bottom: 2px solid #ddd; padding-bottom: 10px; }

p {
    margin-bottom: 1.5rem;
}

/* 4. Links */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 5. Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 40px;
}

li {
    margin-bottom: 0.5rem;
}

/* 6. Forms & Inputs */
input, textarea, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

input:hover, select:hover, button:hover {
    background-color: #68da81;
}


/* 7. Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
}

th, td {
    border: 0px solid #ddd;
    padding: 5px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #eee;
}

td table {
    margin-top: 0;
    display: table;      /* Ensures it behaves as a table block */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

td img {
    display: inline-block; /* Allows text-align to affect it */
    vertical-align: middle; 
    margin: 0 auto;        /* Backup for block-level images */
}

/* 9. Code blocks */
code, pre {
    background: #e9ecef;
    padding: 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.container {
    max-width: 90%;
    margin: 0 auto; /* Centers the content */
    padding: 0 20px;
}