@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&family=Saira:ital,wght@0,100..900;1,100..900&display=swap');
/* ========================================================================
   1. margo/MATERIAL DESIGN TOKENS
   ======================================================================== */
:root {
    
    --margo-blue: #0C3651;
    --margo-gray-900: #98A8B0;
    --margo-gray-700: #000000;
    --margo-gray-100: #f1f3f4;
    --margo-border:   #dadce0;
    --font-stack: "Google Sans Flex", Arial;
}

/* ========================================================================
   1.1 margo/new
   ======================================================================== */

   .post-meta {margin: 16px 0; font-size: 14px;}

/* ========================================================================
   2. BASE
   ======================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    overflow-x: hidden; 
    background-color: #ffffff;
    color: var(--margo-gray-700);
    font-family: var(--font-stack);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, li, a, td, th {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

img { max-width: 100%; height: auto; display: block; }


header, nav, .content-wrapper, footer {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;    
    padding: 0 1.5rem;   
}

/* ========================================================================
   3. COMPONENTS
   ======================================================================== */

/* HEADER */
.site-header {
    background: #fff;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--margo-border);
    position: relative;
    min-height: 60px;
}

.site-header img {
    height: 48px; 
    width: auto;
}

/* NAV */
.site-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--margo-border);
}
.site-nav .sidebar { 
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.site-nav .top-menu-item a { 
    display: block;
    padding: 1rem 0;
    color: var(--margo-gray-700);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 2px solid transparent;
}
.site-nav .top-menu-item a:hover {
    color: var(--margo-blue);
    border-bottom-color: var(--margo-blue);
}

/* LAYOUT */
.content-wrapper {
    flex: 1; 
    display: grid;
    grid-template-columns: 1fr; 
    gap: 4rem; 
    padding-top: 3rem;
    padding-bottom: 4rem;
    align-items: start;
}

/* Important for grid */
main { min-width: 0; width: 100%; }

/* SIDEBAR */
.site-sidebar { background: #fff; padding: 0; border: none; }

/* FOOTER */
.site-footer {
    background: var(--margo-gray-100);
    color: var(--margo-gray-700);
    padding: 3rem 1rem;
    margin-top: auto; 
    font-size: 14px;
    border-top: 1px solid var(--margo-border);
}

/* ========================================================================
   4. TYPOGRAPHY
   ======================================================================== */
h1, h2, h3, h4 {
    font-family: "Saira", Georgia, serif;
    color: var(--margo-gray-900);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    letter-spacing: -0.02em;
}
h1:first-child, h2:first-child { margin-top: 0; }

h1 { font-size: 44px; line-height: 1.2; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }

main p {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 740px;
}

main a {
    color: var(--margo-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 115, 232, 0.3);
}

main ul, main ol {
    font-size: 19px;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    max-width: 740px;
}
main li { margin-bottom: 0.5rem; }

/* Sidebar typo */
.site-sidebar h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--margo-gray-700);
    margin-bottom: 1rem;
    margin-top: 2rem;
    border-bottom: 1px solid var(--margo-border);
    padding-bottom: 0.5rem;
}
.site-sidebar ul { list-style: none; padding: 0; }
.site-sidebar li { margin-bottom: 12px; }
.site-sidebar a {
    font-size: 16px;
    font-weight: 500;
    color: var(--margo-blue);
    text-decoration: none;
}
.site-sidebar a:hover { color: var(--margo-gray-900); }

/* FIX: Tables scroll inside */
main table, article table {
    display: block;
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    border-collapse: collapse;
}
main table th, main table td {
    min-width: 120px;
    padding: 10px;
    border: 1px solid var(--margo-border);
    font-size: 16px;
}

/* ========================================================================
   5. MOBILE & RESPONSIVE
   ======================================================================== */

/* Hamburger/button */
.hamburger {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 20;
}
.hamburger span {
    display: block; width: 26px; height: 3px;
    background-color: var(--margo-gray-900); border-radius: 2px;
}

/* --- DESKTOP VERSION (> 900px) --- */
@media (min-width: 900px) {
    .hamburger { display: none; } 

    /* Centering */
    .site-header {
        justify-content: center;
        padding-top: 2.5rem;
        padding-bottom: 1.5rem;
        border-bottom: none;
    }
    .site-header img { height: 180px; width: auto; }
    .site-nav .sidebar { justify-content: center; gap: 32px; }

    /* Grid */
    .content-wrapper { grid-template-columns: 1fr 340px; }

    /* Dropdown (HOVER) */
    .site-nav .top-menu-item.has-dropdown { position: relative; }
    .site-nav .dropdown-menu {
        display: none;
        position: absolute; top: 100%; left: 0;
        background: #fff; border: 1px solid var(--margo-border);
        min-width: 200px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 10px 0; z-index: 1000;
        flex-direction: column; gap: 0;
    }
    .site-nav .top-menu-item.has-dropdown:hover .dropdown-menu { display: flex; }
    .site-nav .dropdown-menu .top-menu-item a { padding: 8px 20px; white-space: nowrap; border: none; }
    .site-nav .dropdown-menu .top-menu-item a:hover { background-color: var(--margo-gray-100); }
}

/* --- MOBILE VERSION (< 900px) --- */
@media (max-width: 899px) {
    /* 1. Header: Center + Hamburger right */
    .site-header { justify-content: center; padding: 0.5rem 1rem; }
    .logo-container { position: absolute; left: 50%; transform: translateX(-50%); z-index: 10; }
    .site-header img { height: 120px; }
    .hamburger { display: flex; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }

    /* 2. MENU: Hidden by defult */
    .site-nav { padding: 0 1rem; }
    
    .site-nav .sidebar {
        display: none; /* Hidden! */
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding-bottom: 1rem;
        list-style: none; /* No markers */
        margin: 0;
        padding: 0;
    }
    
    /* Open by JS */
    .site-nav .sidebar.open { display: flex; }

    /* Links */
    .site-nav .top-menu-item a {
        padding: 12px 0;
        width: 100%;
        border-bottom: 1px solid var(--margo-border);
        font-size: 18px;
        display: block;
    }

    /* 3. MORE Logic (Accordeon) */
    
    /* More Button */
    .site-nav .more-link { 
        display: block !important;
        padding: 12px 0;
        background: transparent;
        border-bottom: 1px solid var(--margo-border);
        color: var(--margo-blue);
        font-weight: bold;
        cursor: pointer;
        pointer-events: auto; 
    }

    /* Hidden Submenu */
    .site-nav .dropdown-menu {
        display: none; 
        position: static; 
        box-shadow: none; 
        border: none; 
        padding: 0;
        margin: 0;
        list-style: none; 
        width: 100%;
    }

    .site-nav .dropdown-menu.mobile-visible {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    .site-nav .dropdown-menu .top-menu-item {
        margin: 0; padding: 0; list-style: none;
    }

    /* Fonts */
    h1 { font-size: 30px; margin-top: 1rem; }
    h2 { font-size: 24px; }
    .content-wrapper { gap: 2rem; padding-top: 1.5rem; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}