:root {
    --brand: #059669;
    --brand-dark: #047857;
    --brand-light: #ecfdf5;
    --text-900: #0f172a;
    --text-600: #475569;
    --text-400: #94a3b8;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    color: var(--text-600);
    line-height: 1.6;
    background-color: #fafafa;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Common Header */
header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 24px;
    text-decoration: none;
    color: var(--text-900);
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--text-600);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--brand);
}

/* Hamburger Menu Base Styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-900);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* Floating Return Home Button */
.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 99px;
    color: var(--text-900);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    margin: 40px auto;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.back-home-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Common Footer */
footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h5 {
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 800;
    border-left: 4px solid var(--brand);
    padding-left: 12px;
    color: var(--text-900);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    text-decoration: none;
    color: var(--text-600);
    font-size: 14px;
    transition: all 0.2s;
}

.footer-col a:hover {
    color: var(--brand);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-400);
}

.footer-bottom a {
    color: var(--text-400);
    text-decoration: none;
    margin-left: 20px;
}

.footer-bottom a:hover {
    color: var(--brand);
}

@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 768px) {
    header {
        height: 64px;
    }
    header .container {
        justify-content: space-between;
    }
    .menu-toggle {
        display: flex;
    }
    nav {
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        height: auto;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0 24px;
        gap: 0;
        transition: all 0.3s ease-in-out;
        z-index: 1000;
        backdrop-filter: blur(10px);
        overflow: hidden;
        max-height: 0;
        border-bottom: 0 solid var(--border);
    }
    nav.active {
        max-height: 400px;
        padding: 20px 24px;
        border-bottom: 1px solid var(--border);
    }
    nav a {
        font-size: 16px;
        color: var(--text-main);
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    nav a:last-child {
        border-bottom: none;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-top: 20px;
        margin-top: 30px;
    }
    .footer-bottom div:last-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    .footer-bottom a {
        margin: 0;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
        gap: 32px 24px;
    }
    .footer-col {
        grid-column: span 1 !important;
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .footer-col h5 {
        border-left: 3px solid var(--brand) !important;
        padding-left: 12px !important;
        margin-bottom: 20px !important;
        text-align: left !important;
        width: 100%;
        display: block;
    }
    .footer-col p {
        text-align: left !important;
        line-height: 1.6;
        margin-top: 10px;
    }
    .footer-col ul {
        align-items: flex-start !important;
        display: flex;
        flex-direction: column;
        padding: 0 !important;
        margin: 0 !important;
        text-align: left !important;
        width: 100%;
    }
    .footer-col li {
        text-align: left !important;
        width: 100%;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    .logo {
        font-size: 20px;
    }
}

/* Ultra-wide screen optimization */
@media (min-width: 1440px) {
    .container {
        max-width: 1360px;
    }
}

/* Header Download Button (Mobile) */
.header-dl-btn {
    display: none;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}

/* Floating Action Button (FAB) */
.fab-download {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    width: auto;
    height: 60px;
    padding: 0 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: float-bounce 3s infinite ease-in-out;
}

@keyframes float-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fab-download:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.4);
}

@media (max-width: 768px) {
    .header-dl-btn {
        display: block;
        margin-right: 12px;
        margin-left: auto;
    }
    .fab-download {
        bottom: 24px;
        right: 20px;
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .fab-download span {
        display: none;
    }
}
