/* =========================================================
   DANSA Lab — home.css (Final Synchronized Version)
   
   FIXES: 
   1. Header gaps and measurements unified.
   2. REPLICATION: Forces the purple background box on the active link (a.is-active) 
      to match the visual behavior seen on the team.html page.
   ========================================================= */


/* ---------- RESET AND BASE STYLES ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: "Inter", sans-serif;
    background-color: #0b0c0f;
    color: #ffffff;
    overflow-x: hidden;
    /* KEY: Enables smooth scrolling when clicking internal links (e.g., #news) */
    scroll-behavior: smooth;
}


/* Specific styling for ultra-wide screens */

@media (min-width: 2000px) {
    .header-inner {
        padding: 0 6vw;
    }
}


/* =========================================================
     HEADER — Fixed Navigation Bar (UNIFIED)
     ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Consistent background and blur from home.css */
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    padding: 0.9rem 2.5rem;
    /* Consistent Header Height */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 3vw;
    box-sizing: border-box;
    max-width: none;
    margin: 0;
}


/* -------- Left: Logo + Title (Brand) -------- */

.brand {
    display: flex;
    align-items: center;
    gap: 40px;
    /* UNIFIED BRAND GAP */
    text-decoration: none;
}

.brand-logo {
    height: 55px;
    /* UNIFIED LOGO HEIGHT */
    width: auto;
    margin-right: 0;
}

.brand-text {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.35s ease-in-out;
    text-shadow: none;
    white-space: nowrap;
}

.brand-text strong {
    font-weight: 700;
}

.brand-text:hover {
    color: #ffffff;
    transform: scale(1.08);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6), 0 0 16px rgba(0, 255, 255, 0.4), 0 0 24px rgba(0, 255, 255, 0.3);
}


/* -------- Right: Navigation Links -------- */

.site-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    /* UNIFIED NAV GAP */
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    text-shadow: none;
}

.site-nav a:hover {
    color: #06b6d4;
    text-shadow: none;
}

.site-nav a.is-active {
    color: #06b6d4;
    text-shadow: none;
}


/* ===========================================
     Responsive Navbar — Hamburger Menu & Mobile Menu
     =========================================== */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 2001;
    /* ensures it stays above nav */
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}


/* Animation when menu is open */

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}


/* Responsive behavior — hide desktop menu on small screens */

@media (max-width: 900px) {
    .header-inner {
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        /* ensures space between text & hamburger */
    }
    .brand {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        /* tighter logo-title spacing */
    }
    .brand-logo {
        height: 48px;
    }
    .brand-text {
        display: block;
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.2;
        max-width: 180px;
        text-align: left;
        white-space: normal;
        /* allow wrapping if needed */
    }
    .menu-toggle {
        display: flex;
        flex-shrink: 0;
        margin-left: auto;
        /* push hamburger to far right */
    }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: rgba(15, 20, 35, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 1500;
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-menu li {
        margin: 1.5rem 0;
    }
    .nav-menu a {
        font-size: 1.2rem;
        color: #ffffff;
    }
    /* Ensure mobile menu active links don't have the purple box, 
       as it looks bad on the full-screen menu. */
    .nav-menu a.is-active {
        background: none !important;
        padding: 0 !important;
        color: #06b6d4 !important;
    }
}


/* -------- Tablet/Smaller Laptop adjustments -------- */

@media (max-width: 1024px) {
    .brand-logo {
        height: 50px;
    }
    .brand-text {
        font-size: 0.9rem;
    }
    .nav-menu {
        gap: 1.5rem;
    }
}


/* ===========================================
   HERO SECTION — Welcome Banner
   =========================================== */

.section-hero {
    position: relative;
    width: 100%;
    /* Clamp sets a minimum, preferred (viewport-based), and maximum height */
    height: clamp(520px, 63vh, 820px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    /* Padding to clear the fixed header */
    padding-top: calc(7rem + 1vh);
}


/* --- Large Screens (e.g., 32" Monitor) --- */

@media (min-width: 1600px) {
    .section-hero {
        height: 68vh;
        padding-top: calc(6rem + 2vh);
    }
}


/* FIX: Mid-Sized Screen Adjustment (e.g., MacBook Pro) */

@media (max-width: 1600px) {
    .hero-text h1 {
        /* Prevents H1 from wrapping too early and colliding with the fixed header */
        font-size: clamp(2.5rem, 3.5vw + 1rem, 3.5rem);
    }
}


/* --- MacBook / Medium Screens --- */

@media (max-width: 1440px) {
    .section-hero {
        height: 60vh;
        padding-top: calc(8rem + 1.5vh);
        justify-content: flex-start;
    }
}


/* --- Mobile Screens --- */

@media (max-width: 768px) {
    .section-hero {
        height: 55vh;
        padding-top: calc(7rem + 1vh);
        justify-content: flex-start;
    }
}


/* ---------- Background Image ---------- */

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    z-index: 0;
}


/* ---------- Overlay Gradient ---------- */

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( rgba(10, 15, 25, 0.7), rgba(10, 15, 25, 0.6));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}


/* Smooth fade into bottom background */

.hero-overlay::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient( to bottom, rgba(10, 15, 25, 0), #0b0c0f 90%);
    z-index: 2;
}


/* ---------- Hero Text ---------- */

.hero-text {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
    transform: translateY(1.2rem);
}

.hero-text h1 {
    /* Base H1 font size controlled here, overridden by media queries above */
    font-size: clamp(2.3rem, 4vw + 1rem, 4rem);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 1.2rem;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6), 0 0 16px rgba(0, 255, 255, 0.4), 0 0 24px rgba(0, 255, 255, 0.3);
}

.hero-text p {
    font-size: clamp(1rem, 1.1vw + 0.7rem, 1.3rem);
    color: #d1d5db;
    margin-bottom: 2rem;
}


/* ---------- Buttons ---------- */

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid #06b6d4;
    color: #06b6d4;
}

.btn-outline:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #fff;
}


/* ==============================
   FEATURED LOGOS SECTION 
   ============================== */

.featured-section {
    background: rgba(11, 12, 15, 0.85);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* Makes logo links clickable but keeps spacing consistent */

.featured-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}


/* Prevent default link underline or color */

.featured-link img {
    border: none;
    outline: none;
}


/* Optional — subtle pointer feedback for all linked logos */


/* NOTE: This rule is redundant now that .featured-logo:hover is defined below, 
   but is kept for completeness if other non-linked logos exist. */

.featured-link:hover img {
    cursor: pointer;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}


/* ======================================================
   FINAL FIX — 4 LOGOS ALWAYS IN ONE LINE + SAFE EDGES
   (Requires .featured-logos-inner wrapper in HTML)
   ====================================================== */

.featured-logos {
    display: flex;
    justify-content: space-evenly;
    /* Spreads logos out */
    align-items: center;
    flex-wrap: nowrap;
    /* CRITICAL: No wrapping ever */
    width: 100%;
    /* Set the container width */
    padding: 0;
    /* IMPORTANT: REMOVED SIDE PADDING HERE to allow full width for scrolling */
    gap: clamp(1rem, 3vw, 4rem);
    /* Space between logos */
    overflow-x: auto;
    /* CRITICAL: Allows horizontal scrolling on mobile */
    scrollbar-width: none;
    /* hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* hide scrollbar IE/Edge */
}


/* This new container handles the padding and defines the scrollable content width */

.featured-logos-inner {
    display: flex;
    align-items: center;
    padding: 0 8vw;
    /* ADDED SIDE PADDING TO INNER CONTAINER */
    width: fit-content;
    /* Ensures the inner content dictates the scrollable width */
    min-width: 100%;
    /* Guarantees the inner content is at least as wide as the screen */
}

.featured-logos::-webkit-scrollbar {
    display: none;
    /* hide scrollbar Chrome/Safari */
}


/*
   ==================================================
   🔑 IMPLEMENTED FIX: SMOOTHER TRANSITION + CUSTOM HOVER SHAPES
   ==================================================
*/

.featured-logo {
    flex: 0 0 auto;
    /* CRITICAL: Prevents shrinking */
    height: clamp(45px, 5vw, 80px);
    width: auto;
    object-fit: contain;
    /* NEW SMOOTHER TRANSITION AND BASE FILTER */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease-in-out;
    filter: brightness(1) drop-shadow(0 0 0 rgba(255, 255, 255, 0));
}

.featured-logo:hover {
    /* DEFAULT HOVER: applies to all unless overridden */
    transform: scale(1.1);
    /* BRIGHTER LOGO + SUBTLE WHITE GLOW */
    filter: brightness(1.3) drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
    cursor: pointer;
}


/* -------------------------------------------
   CUSTOM HOVER LOGIC
   ------------------------------------------- */


/* 1. Circular Highlight for the first three logos (DANSA, UCALGARY, CAMPUS) */


/* This targets the first 3 children of the .featured-logos-inner container */

.featured-logos-inner>* {
    /* Apply border-radius to the logo (or its container) to make the drop-shadow circular */
    border-radius: 50%;
}


/* We must specifically reset the border-radius for the 4th item (Faculty) */


/* The 4th item is the 4th child of featured-logos-inner, which is a .featured-link containing the img */

.featured-logos-inner>*:nth-child(4) {
    border-radius: 0;
}


/* 2. NO Highlight for the 4th Logo (FACULTY) */


/* The 4th logo is inside a .featured-link wrapper which is the 4th child of .featured-logos-inner */


/* We target the image inside that link wrapper */

.featured-logos-inner>.featured-link:nth-child(4) img:hover {
    /* Reset hover transform and filter back to base state */
    transform: scale(1);
    filter: brightness(1);
}


/* ======= Tablet (medium screens) ======= */

@media (max-width: 1024px) {
    .featured-logos-inner {
        padding: 0 7vw;
        /* maintain side space */
        gap: clamp(1rem, 2vw, 2.5rem);
    }
    .featured-logo {
        height: clamp(40px, 5vw, 65px);
    }
}


/* ======= Mobile (small screens) ======= */

@media (max-width: 768px) {
    .featured-logos-inner {
        padding: 0 8vw;
        /* keeps first & last logos visible */
        gap: clamp(0.5rem, 2vw, 1rem);
    }
    .featured-logo {
        height: clamp(30px, 6vw, 55px);
    }
}


/* ======= ULTRA SMALL (e.g., 360px wide) ======= */

@media (max-width: 400px) {
    .featured-logos-inner {
        padding: 0 5vw;
        gap: 0.5rem;
    }
    .featured-logo {
        height: clamp(30px, 7vw, 50px);
    }
}


/* =========================================================
     NEWS SECTION
     ========================================================= */

.section {
    padding: 5rem 2rem;
}

#news {
    background: #0d1328;
}

#news h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #06b6d4;
    margin-bottom: 2rem;
    text-align: center;
}

.news-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    background: #101831;
    border-left: 4px solid #06b6d4;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    color: #d1d5db;
}

.news-item time {
    color: #06b6d4;
    font-weight: 600;
    margin-right: 0.5rem;
}


/* NEWS PLACEHOLDER STYLING (For 'No news' message) */

.news-placeholder-item {
    text-align: center;
    font-size: 1.1rem;
    padding: 1.5rem 1rem;
    font-weight: 500;
}


/* =========================================================
     CONTACT SECTION
     ========================================================= */

#contact {
    background: #0b0c0f;
}

#contact h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #06b6d4;
    margin-bottom: 1.5rem;
    text-align: center;
}

#contact p {
    text-align: center;
    color: #d1d5db;
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form label {
    font-weight: 600;
    color: #ffffff;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    background: #182245;
    border: 1px solid #2b3567;
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #06b6d4;
    outline: none;
}

.contact-form button {
    align-self: flex-start;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}


/* =========================================================
     FOOTER
     ========================================================= */

.site-footer {
    background: #0b0c0f;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
}

.footer-meta {
    color: #d1d5db;
    margin-top: 0.5rem;
}

.footer-meta a {
    color: #06b6d4;
    text-decoration: none;
}

.footer-meta a:hover {
    text-decoration: underline;
}


/* =========================================================
     RESPONSIVENESS (General Overrides)
     ========================================================= */

@media (max-width: 1024px) {
    .brand-logo {
        height: 50px;
    }
    .hero-text h1 {
        /* Overridden by the 1600px rule for better MacBook compatibility */
        font-size: 2.3rem;
    }
    .featured-logo {
        height: 65px;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 1.9rem;
    }
    .hero-text p {
        font-size: 1rem;
    }
    /* Logo gap is handled by .featured-logos-inner now */
    .featured-logos {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.6rem;
    }
    .featured-logo {
        height: 55px;
    }
}

#page-info {
    padding: 0.8rem 1.75rem;
}