html {
    scroll-behavior: smooth;
}

/* --- NAVIGATION STYLES --- */
nav {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-left: auto;
}

.nav-link {
    color: var(--text-brand);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    position: relative;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--yellow);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #111;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 10;
    border-top: 2px solid var(--yellow);
    margin-top: 10px;
}

.dropdown-content a {
    color: var(--text-brand);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #222;
}

.dropdown-content a:hover {
    background-color: #1a1a1a;
    color: var(--yellow);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;

    /* --- SLEEK DARK BACKGROUND --- */
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);

    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    border-image: var(--gradient) 1;
}

section {
    scroll-margin-top: 100px;
}

:root {
    --bg-deep: #0a0a0a;
    --bg-accent: #151515;
    --text-brand: #fcf5e5;
    --yellow: #f1c40f;
    --gradient: linear-gradient(90deg, #f39c12 0%, #e74c3c 40%, #8e44ad 70%, #3498db 100%);
}

body {
    background-color: var(--bg-deep);
    color: var(--text-brand);
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* --- LOGO SECTION --- */
header {
    padding: 30px 10%;
    background: linear-gradient(to bottom, #111, transparent);
    border-bottom: 1px solid transparent;
    border-image: var(--gradient) 1;
}

.logo-container img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(241, 196, 15, 0.2));
}

/* --- TYPOGRAPHY --- */
.fokin-style {
    font-style: italic;
    font-weight: 900;
    text-transform: none;
}

.eng-style {
    color: var(--yellow);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* --- SECTIONS --- */
.hero {
    padding: 80px 10% 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero h1 {
    font-size: 3.5rem;
    max-width: 900px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.about,
.services {
    padding: 100px 10%;
    background: var(--bg-accent);
    border-top: 1px solid #222;
}

.services {
    background: var(--bg-deep);
}

.btn {
    background: var(--yellow);
    color: black;
    padding: 18px 45px;
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-top: 30px;
    transition: all 0.3s ease;
    clip-path: polygon(5% 0%, 100% 0%, 95% 100%, 0% 100%);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(241, 196, 15, 0.3);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    border: 1px solid #333;
    padding: 30px;
    background: #0d0d0d;
    transition: border-color 0.3s;
}

.card:hover {
    border-color: var(--yellow);
}

.card h3 {
    color: var(--yellow);
    text-transform: uppercase;
    margin-top: 0;
    letter-spacing: 2px;
}

.footer-bar {
    height: 8px;
    width: 100%;
    background: var(--gradient);
    clip-path: polygon(1% 0%, 99% 0%, 100% 100%, 0% 100%);
}

@keyframes glowPulse {
    0% {
        filter:
            drop-shadow(-10px 0 12px rgba(243, 156, 18, 0.3)) drop-shadow(0px 0 12px rgba(231, 76, 60, 0.2)) drop-shadow(10px 0 12px rgba(52, 152, 219, 0.3));
        transform: scale(1);
    }

    50% {
        filter:
            drop-shadow(-18px 0 25px rgba(243, 156, 18, 0.5)) drop-shadow(0px 0 25px rgba(231, 76, 60, 0.4)) drop-shadow(18px 0 25px rgba(52, 152, 219, 0.5));
        transform: scale(1.02);
    }

    100% {
        filter:
            drop-shadow(-10px 0 12px rgba(243, 156, 18, 0.3)) drop-shadow(0px 0 12px rgba(231, 76, 60, 0.2)) drop-shadow(10px 0 12px rgba(52, 152, 219, 0.3));
        transform: scale(1);
    }
}

.logo-glow {
    max-width: 280px;
    height: auto;
    animation: glowPulse 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo-glow:hover {
    animation-play-state: paused;
    filter:
        drop-shadow(-20px 0 30px rgba(243, 156, 18, 0.7)) drop-shadow(0px 0 30px rgba(231, 76, 60, 0.6)) drop-shadow(20px 0 30px rgba(52, 152, 219, 0.7));
}

header {
    transition: padding 0.3s ease, background 0.3s ease;
}

.logo-glow {
    transition: max-width 0.3s ease, transform 0.3s ease;
}

header.shrunk {
    padding: 12px 10%;
    background: rgba(10, 10, 10, 0.98);
}

header.shrunk .logo-glow {
    max-width: 190px;
}


/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS (Screens smaller than 768px)
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. Recalibrate Heavy Layout Padding */
    header,
    .hero,
    .about,
    .services,
    footer {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .hero,
    .about,
    .services {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    /* 2. Stack and Center the Sticky Header */
    header {
        flex-direction: column !important;
        gap: 15px;
        text-align: center;
    }

    /* Scale the logo down so it fits nicely on compact displays */
    .logo-glow {
        max-width: 200px !important;
    }

    header.shrunk .logo-glow {
        max-width: 150px !important;
    }

    /* Center and wrap navigation links cleanly */
    nav {
        margin-left: 0 !important;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 12px 20px !important;
        width: 100%;
    }

    .nav-link {
        font-size: 0.8rem !important;
    }

    /* 3. Adapt the Dropdown for Mobile (Floating overlay so it doesn't break the row) */
    .dropdown-content {
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        /* Center the dropdown perfectly under the "Services" link */
        background-color: #111 !important;
        min-width: 180px !important;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.6) !important;
        border-top: 2px solid var(--yellow) !important;
        border-left: none !important;
        /* Removes the previous static layout border */
        margin-top: 10px !important;
        display: none;
        /* Keeps it hidden until hovered/tapped */
    }

    /* Ensures the dropdown container behaves smoothly as a relative base anchor */
    .dropdown {
        position: relative !important;
        display: inline-block !important;
    }

    /* 4. Tame Giant Desktop Typography */
    .hero h1 {
        font-size: 2.1rem !important;
        /* Prevents long words from wrapping awkwardly */
    }

    .about h2,
    .services h2 {
        font-size: 1.8rem !important;
    }

    /* 5. Force the Services Grid into a Single Column */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}


/* --- COLLABORATORS SECTION --- */
.collaborators {
    padding: 80px 10%;
    background: var(--bg-deep); /* Sits on your main deep background */
    border-top: 1px solid #222;
    text-align: center;
}

/* 1. The new large, lighter container panel wrapping all the images */
.logo-panel {
    background: #fcf5e5; /* Lighter charcoal surface so dark logos are instantly visible */
    border: 1px solid #fcf5e5; /* Subtle industrial rim accent */
    padding: 50px 40px;
    border-radius: 8px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px 60px; /* Uniform breathing room inside the panel */
}

/* 2. Individual bounding boxes are now completely invisible 
      (No borders, no backgrounds to bleed over) */
.logo-item {
    width: 160px;
    height: 80px; /* Slightly increased height to accommodate tall logos */
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-item a {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Keeps shapes scaled perfectly within the invisible 160x80 box */
    filter: none;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Retains your smooth zoom effect on hover */
.logo-item img:hover {
    transform: scale(1.15); 
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .logo-panel {
        padding: 35px 20px;
    }
    .logo-grid {
        gap: 30px 30px;
    }
    .logo-item {
        width: 130px;
        height: 60px;
    }
}