/* style.css — universal, clean, modern site style */

/* RESET & BASE */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    color: #232b36;
    background: #f7f9fb;
    line-height: 1.7;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    outline: none;
}
a:hover, a:focus {
    color: #183970;
    background: #eaf1ff;
    border-radius: 4px;
    text-decoration: underline;
}
a:active {
    color: #fff;
    font-size: 22px;
}

/* HEADER */
header {
    background: #2963d5;
    color: #fff;
    padding: 32px 0 20px 0;
    text-align: center;
    box-shadow: 0 2px 12px #0001;
    letter-spacing: 0.5px;
}
header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: -1px;
}
header p {
    font-size: 1.2rem;
    opacity: 0.93;
    margin-bottom: 0;
}

@media (max-width: 700px) {
    header {
        padding: 20px 0 12px 0;
    }
    header h1 {
        font-size: 1.4rem;
    }
    header p {
        font-size: 1rem;
    }
}

/* LAYOUT CONTAINER */
.container {
    max-width: 1200px;
    margin: 36px auto 22px auto;
    display: flex;
    gap: 36px;
    padding: 0 20px;
    min-height: 64vh;
    align-items: flex-start;
}

/* MAIN CONTENT */
main {
    flex: 3;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px #0001;
    padding: 38px 32px 34px 32px;
    min-width: 0;
    min-height: 60vh;
    overflow-wrap: break-word;
}
@media (max-width: 900px) {
    .container {
        flex-direction: column-reverse;
        gap: 0;
        padding: 0 6px;
    }
    main {
        padding: 22px 6vw;
        border-radius: 14px;
    }
}
@media (max-width: 600px) {
    main {
        padding: 12px 4vw 18px 4vw;
        font-size: 1rem;
    }
}

/* SIDEBAR */
.sidebar {
    flex: 1;
    min-width: 225px;
    max-width: 300px;
    background: #f4f7fa;
    border-radius: 16px;
    box-shadow: 0 2px 8px #0000;
    padding: 32px 18px 26px 18px;
    margin-left: auto;
    margin-bottom: 16px;
    height: fit-content;
    position: sticky;
    top: 36px;
    font-size: 1.08rem;
}
.sidebar h2 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: #3a4d6d;
    letter-spacing: 0.3px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar li {
    margin-bottom: 13px;
}
.sidebar a {
    font-weight: 500;
    color: #000;
    padding: 9px 6px;
    display: block;
    border-radius: 6px;
    transition: background 0.16s;
}
.sidebar a:hover, .sidebar a:focus {
    background: #eaf1ff;
    color: #850000;
    font-weight: 600;
}
.sidebar a:active {
    background: #850000;
    color: #850000;
    font-size: 22px;
}
@media (max-width: 900px) {
    .sidebar {
        max-width: none;
        min-width: 0;
        padding: 18px 8px;
        margin-left: 0;
        margin-bottom: 16px;
        position: static;
        border-radius: 12px;
    }
}

/* HEADINGS */
h1, h2, h3, h4, h5 {
    color: #243251;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.19rem; }
h4 { font-size: 1.06rem; }
h5 { font-size: 1rem; font-weight: 600; }

main h2:first-child, main h1:first-child {
    margin-top: 0.3em;
}
main h3, main h4, main h5 {
    margin-top: 1.15em;
}

/* PARAGRAPH, TEXT */
p {
    margin: 0.7em 0;
    color: #232b36;
    font-size: 1.06em;
    line-height: 1.74;
    font-weight: 400;
}

b, strong { color: #1a253e; }
em, i     { color: #2e4b8a; font-style: italic; }

hr {
    margin: 36px 0 24px 0;
    border: none;
    border-bottom: 1px solid #e2e7f1;
}

/* LISTS */
ul, ol {
    margin: 1em 0 1.4em 2em;
    padding: 0;
    font-size: 1em;
}
li {
    margin-bottom: 0.6em;
    line-height: 1.65;
    font-size: 1em;
}
ul li::marker {
    color: #4784ec;
    font-size: 1.1em;
}
ol li::marker {
    color: #3c61b0;
    font-weight: 700;
}

@media (max-width: 500px) {
    ul, ol { margin-left: 1.1em; }
}

/* BUTTONS */
button, .btn, input[type="submit"], input[type="button"] {
    background: linear-gradient(90deg, #2963d5 20%, #518fff 100%);
    color: #fff;
    font-size: 1.06rem;
    padding: 9px 20px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin: 10px 0;
    box-shadow: 0 2px 8px #0001;
    transition: background 0.14s, box-shadow 0.13s;
    outline: none;
}
button:hover, .btn:hover, input[type="submit"]:hover {
    background: #183970;
    box-shadow: 0 3px 10px #0002;
}
button:active, .btn:active {
    background: #15274b;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: #f8fafd;
    border-radius: 10px;
    overflow: hidden;
}
th, td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e7f1;
}
th {
    background: #eaf1ff;
    font-weight: 600;
    color: #2b385a;
}
tr:last-child td {
    border-bottom: none;
}

/* IMAGES */
img {
    max-width: 100%;
    border-radius: 9px;
    box-shadow: 0 2px 12px #0001;
    margin: 16px 0;
    display: block;
    height: auto;
}
@media (max-width: 600px) {
    img { margin: 10px 0; }
}

/* CODE & QUOTES */
code, pre {
    background: #eaf1ff;
    color: #214488;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 0.97em;
    border-radius: 4px;
    padding: 2px 7px;
}
pre {
    padding: 12px 16px;
    overflow-x: auto;
    margin: 1.2em 0;
}
blockquote {
    background: #e8eef9;
    border-left: 5px solid #2963d5;
    margin: 1.3em 0;
    padding: 12px 20px;
    font-style: italic;
    color: #204175;
    border-radius: 6px;
}

/* ZOOM, ALIGNMENT, MISC */
html {
    font-size: 18px;
}
@media (max-width: 600px) {
    html { font-size: 16px; }
}
@media (max-width: 400px) {
    html { font-size: 15px; }
}

/* Content alignment helpers */
.text-center    { text-align: center !important; }
.text-right     { text-align: right !important; }
.text-left      { text-align: left !important; }
.align-middle   { vertical-align: middle !important; }
.align-top      { vertical-align: top !important; }
.align-bottom   { vertical-align: bottom !important; }
.wide { width: 100% !important; }

/* Footer */
footer {
    background: #232a3b;
    color: #d2dbed;
    padding: 28px 0 18px 0;
    text-align: center;
    font-size: 1rem;
    letter-spacing: 0.1px;
    margin-top: auto;
    border-top: 1px solid #232a3b;
}
footer span {
    opacity: 0.7;
    font-size: 0.95em;
}

@media (max-width: 600px) {
    footer {
        font-size: 0.94rem;
        padding: 18px 0 10px 0;
    }
}

/* Print styles (hide nav/sidebar, clean look) */
@media print {
    header, .sidebar, footer {
        display: none !important;
    }
    main {
        box-shadow: none !important;
        background: #fff !important;
        padding: 0 !important;
    }
}

/* Focus highlights for accessibility */
a:focus, button:focus, input:focus, .btn:focus {
    outline: 2px solid #2963d5;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #c6e0ff;
    color: #232b36;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
    background: #f3f7fa;
}
::-webkit-scrollbar-thumb {
    background: #d3e0f5;
    border-radius: 7px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b6cef3;
}
