/* Layout Styles (Header & Footer) */

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: #fff;
    z-index: 9999;
    /* Increased z-index significantly */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    transition: color 0.3s;
    position: relative;
    padding: 10px 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    transition: 0.3s;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: #888;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    display: block;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: 0;
        background-color: #fff;
        overflow: hidden;
        transition: height 0.3s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        height: 100vh;
        /* Full screen menu */
        padding-bottom: 20px;
        overflow-y: auto;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 40px 20px;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 20px 0;
        font-size: 1.2rem;
    }

    /* Footer Responsive */
    .footer-content {
        grid-template-columns: 1fr;
        /* Stack footer columns */
        gap: 40px;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 20px;
        display: flex;
        /* Ensure centering works for flex items if used */
        flex-direction: column;
        align-items: center;
    }

    .footer-logo img {
        max-width: 150px;
        height: auto;
    }

    .footer-nav-col {
        border-bottom: 1px solid #333;
        padding-bottom: 20px;
    }

    .footer-nav-col:last-child {
        border-bottom: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}