/* 
   Docs: css/layout.css
   Description: Structural layout (Header, Footer, Grid)
   Version: 1.1.0
*/

/* --- Site Header (Transparent & Sticky) --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    /* Initially transparent */
    border-bottom: 2px solid transparent;
    height: 100px;
    /* Taller initially */
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Centralized Header Typography */
    font-size: 13px !important;
    font-weight: 600;
}

/* Enforce font size on links globally */
.site-header .nav-link,
.site-header a {
    font-size: 13px !important;
    padding: 8px 10px !important;
    /* Compact padding */
}

/* --- Site Footer --- */
.site-footer {
    font-size: 11px !important;
    /* Going to 11px to be safely compacted */
    line-height: normal !important;
}

/* Override Bootstrap defaults for footer children */
.site-footer p,
.site-footer a,
.site-footer li,
.site-footer span {
    font-size: 12px !important;
}

.site-footer h5,
.site-footer h4,
.site-footer h3 {
    font-size: 13px !important;
    text-transform: uppercase;
    font-weight: 700;
}

text-transform: uppercase;
font-weight: 700;
}

/* --- Footer Bottom (Copyright) --- */
.footer-bottom {
    text-align: center !important;
    /* Force center alignment globally */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Optional separator */
}

/* Scrolled State */
/* Scrolled State OR Static State (for non-hero pages) */
.site-header.scrolled,
.site-header.static,
body.header-static .site-header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--c-accent);
    box-shadow: var(--shadow-md);
    height: 80px;
}

body.header-static .nav-link,
body.header-static .mobile-toggle {
    color: var(--c-dark);
    text-shadow: none;
}

body.header-static .nav-link:hover {
    color: var(--c-primary);
    background-color: var(--c-primary-bg);
}

body.header-static .social-icon {
    color: var(--c-gray-600);
}

body.header-static .social-icon:hover {
    color: var(--c-primary);
}

body.header-static .brand-logo {
    top: 0;
    height: 80px;
    padding: 0;
}

body.header-static .brand-logo img {
    height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-3);
}

/* --- Premium Hanging Logo --- */
.brand-logo {
    position: relative;
    top: 0;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    transition: all 0.4s ease;
    z-index: 1001;
}

.brand-logo img {
    height: 80px;
    /* Maximized size */
    width: auto;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Scrolled Logo State */
.site-header.scrolled .brand-logo,
.site-header.static .brand-logo {
    top: 0;
    height: 80px;
    padding: 0;
}

.site-header.scrolled .brand-logo img,
.site-header.static .brand-logo img {
    height: 70px;
}

.brand-logo:hover img {
    transform: scale(1.05);
}

/* --- Navigation --- */
.main-nav {
    display: none;
    /* Mobile First: Hidden by default */
}

@media (min-width: 992px) {
    .main-nav {
        display: flex;
        gap: var(--sp-2);
        align-items: center;
    }
}

.nav-link {
    color: var(--c-white);
    /* White text initially for dark hero */
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: var(--s-sm);
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    border-radius: var(--r-md);
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Legibility */
    text-decoration: none;
}

.site-header.scrolled .nav-link,
.site-header.static .nav-link {
    color: var(--c-dark);
    /* Dark text on scroll */
    text-shadow: none;
}

.nav-link:hover {
    color: var(--c-accent);
    background-color: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .nav-link:hover,
.site-header.static .nav-link:hover {
    color: var(--c-primary);
    background-color: var(--c-primary-bg);
}

/* Social Icons with Borders */
.nav-social {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: var(--sp-3);
    padding-left: var(--sp-2);
    /* Removed border-left */
}

.site-header.scrolled .nav-social {
    border-left: none;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--c-white);
    transition: var(--transition);
    border: none;
    /* Removing all borders for cleaner look */
    font-size: 16px;
}

.social-icon:first-child {
    border: none;
}

.site-header.scrolled .social-icon,
.site-header.static .social-icon {
    color: var(--c-gray-600);
    border-color: var(--c-gray-200);
}

.social-icon:hover {
    color: var(--c-accent);
    background-color: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .social-icon:hover,
.site-header.static .social-icon:hover {
    color: var(--c-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile Toggle */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--c-white);
    /* White toggle */
    cursor: pointer;
}

.site-header.scrolled .mobile-toggle,
.site-header.static .mobile-toggle,
body.header-static .mobile-toggle {
    color: var(--c-primary);
}

/* --- Global Layout Fixes --- */
body {
    overflow-x: hidden;
    width: 100%;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-center {
    justify-content: center;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.align-items-center {
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

@media (min-width: 992px) {
    .mobile-toggle {
        display: none;
    }
}

/* Mobile Dropdown (Simple implementation for now) */
.mobile-menu-container {
    display: none;
    /* JS to toggle this */
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    border-bottom: 2px solid var(--c-primary);
    padding: var(--sp-3);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-container.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: var(--sp-2);
    border-bottom: 1px solid var(--c-gray-100);
    font-weight: 600;
}

/* --- Page Sections --- */
.section {
    padding: var(--sp-6) 0;
}

.section-hero {
    margin-top: 80px;
    /* Offset for fixed header */
    position: relative;
    width: 100%;
    min-height: 500px;
    background-color: var(--c-dark);
    color: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- General Grid System --- */
.container-grid {
    display: grid;
    gap: var(--sp-4);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-3);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .md-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .lg-grid-cols-6 {
        grid-template-columns: repeat(6, 1fr);
    }
}

.justify-items-center {
    justify-items: center;
}

.align-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.collab-link {
    flex: 0 1 180px;
    margin: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 1.5rem;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 120px;
}

.collab-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.collab-link img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

.text-center {
    text-align: center;
}

.section-hero {
    margin-top: 80px;
    /* Offset for fixed header */
}

/* --- Site Footer --- */
.site-footer {
    background-color: var(--c-dark);
    color: var(--c-white);
    padding-top: var(--sp-6);
    border-top: 4px solid var(--c-accent);
}

/* --- Standard Page Header (For subpages) --- */
.page-header {
    margin-top: 80px;
    /* Offset for fixed navbar */
    background: var(--c-primary);
    background: linear-gradient(135deg, var(--c-primary) 0%, #4a0c00 100%);
    color: var(--c-white);
    padding: var(--sp-6) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.3;
}

.page-header h1 {
    color: var(--c-white);
    margin-bottom: var(--sp-2);
    font-size: var(--s-3xl);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    color: var(--c-accent);
    font-size: var(--s-lg);
    margin: 0 auto;
    max-width: 700px;
    font-weight: 300;
}

.footer-top {
    padding-bottom: var(--sp-5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--sp-4);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-3);
}

.footer-col h5 {
    color: var(--c-accent);
    font-family: var(--f-heading);
    text-transform: uppercase;
    margin-bottom: var(--sp-3);
    font-size: var(--s-lg);
    letter-spacing: 1px;
}

.footer-link {
    display: block;
    color: var(--c-gray-200);
    margin-bottom: var(--sp-2);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--c-white);
    transform: translateX(5px);
}

.footer-social-row {
    display: flex;
    gap: var(--sp-2);
    margin-bottom: var(--sp-3);
}

.footer-bottom {
    background-color: #000;
    padding: var(--sp-3) 0;
    text-align: center;
    font-size: var(--s-sm);
    color: var(--c-gray-500);
}

.footer-bottom a {
    color: var(--c-accent);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--c-accent);
    color: var(--c-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 900;
}

.back-to-top:hover {
    background-color: var(--c-white);
    transform: translateY(-3px);
}