/* ===========================
   Pilots Section (Ladder List)
   =========================== */
.pilots-section {
    padding: var(--section-padding) 0;
    background: var(--bg-surface);
}

.pilots-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

.ladder-list {
    max-width: 700px;
    margin: 0 auto;
}

.ladder-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(91, 214, 255, 0.05);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent);
}

.ladder-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(8 8 8 / 40%);
    color: var(--bg-primary);
    border-radius: 50%;
    font-weight: 700;
}

.ladder-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.ladder-content p {
    color: var(--text-secondary);
}

/* ===========================
   Partners Carousel (Infinite Marquee)
   =========================== */
.partners-carousel-section {
    padding: 1rem 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 6px 22px rgba(0,0,0,0.35);
    overflow: hidden;
}

.partners-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.partners-track {
    display: flex;
    gap: 24px;
    will-change: transform;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.partner-logo {
    flex-shrink: 0;
    height: 120px;
    width: calc((100vw - 144px) / 7); /* 7 logos visible, accounting for 6 gaps of 24px */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.partner-logo img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease;
}

.partner-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.partner-logo:hover img {
    filter: brightness(1) contrast(1.2);
}

/* Infinite marquee animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.partners-carousel:hover .partners-track {
    animation-play-state: paused;
}

/* Tablet adjustments - show 5 logos */
@media (max-width: 992px) {
    .partners-track {
        gap: 20px;
        animation-duration: 25s;
    }
    
    .partner-logo {
        height: 100px;
        width: calc((100vw - 100px) / 5); /* 5 logos visible, accounting for 4 gaps of 20px */
        padding: 0.75rem 1rem;
    }
}

/* Mobile adjustments - show 3 logos */
@media (max-width: 768px) {
    .partners-track {
        gap: 16px;
        animation-duration: 20s;
    }
    
    .partner-logo {
        height: 80px;
        width: 120px;
        padding: 0.75rem 1rem;
    }
}

/* Small mobile - show 2 logos */
@media (max-width: 480px) {
    .partners-track {
        gap: 12px;
        animation-duration: 15s;
    }
    
    .partner-logo {
        height: 60px;
        width: 100px;
        padding: 0.5rem 0.75rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .partners-track {
        animation: none !important;
    }
    
    .partners-carousel {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 1.5rem;
        padding: 2rem 1rem;
    }
    
    .partners-track {
        display: contents;
    }
    
    .partner-logo {
        height: 120px;
        width: auto;
    }
    
    /* Responsive grid for reduced motion */
    @media (max-width: 992px) {
        .partners-carousel {
            grid-template-columns: repeat(5, 1fr);
        }
    }
    
    @media (max-width: 768px) {
        .partners-carousel {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    
    @media (max-width: 480px) {
        .partners-carousel {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

/* ===========================
   Expandable Content
   =========================== */
.expandable-content {
    margin: 1.5rem 0;
}

.expand-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
}

.expand-toggle:hover {
    background: var(--glass-bg-strong);
    border-color: var(--accent);
    color: var(--accent);
}

.expand-toggle.active {
    background: rgba(91, 214, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.expand-text {
    flex: 1;
    text-align: left;
}

.expand-icon {
    font-size: 1.2rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    width: 20px;
    text-align: center;
}

.expand-toggle.active .expand-icon {
    transform: rotate(45deg);
}

.expandable-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    margin-top: 0;
}

.expandable-list.active {
    max-height: 300px;
    opacity: 1;
    margin-top: 1rem;
}

.expandable-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    overflow: hidden;
}

.expandable-list li {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.expandable-list li:last-child {
    border-bottom: none;
}

.expandable-list li:hover {
    background: rgba(91, 214, 255, 0.05);
    color: var(--text-primary);
    padding-left: 1.25rem;
}

.expandable-list li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.expandable-list li:hover::before {
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .expand-toggle {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .expandable-list li {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .expandable-list li:hover {
        padding-left: 1rem;
    }
    
    .expandable-list li::before {
        left: 0.5rem;
    }
}

/* Essential Core background via pseudo-element for reliable mobile tiling */
/* desktop default */



#essential-core { position: relative; }
#essential-core::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url('/pictures/essential-core-hero-3.png');
    background-size: auto 100vh;
    background-position: center;
    pointer-events: none;
    background-attachment: fixed;
    transform: translateZ(0); /* iOS repaint fix */
}
@media (min-width: 769px) {
    #essential-core::before {
        background-size: contain;
        background-attachment: fixed;
        transform: none;
        background-repeat: repeat-x;
        background-position: right;
    }
}

#essential-ops-supervisor { position: relative; }
#essential-ops-supervisor::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url('/pictures/essential-ops-supervisor-hero-2.png');
    background-repeat: no-repeat;
    background-size: auto 100vh;
    background-position: center;
    pointer-events: none;
    transform: translateZ(0); /* iOS repaint fix */
}
@media (min-width: 769px) {
    #essential-ops-supervisor::before {
        background-size: cover;
        background-attachment: fixed;
        transform: none;
    }
}

#essential-commander { position: relative; }
#essential-commander::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url('/pictures/ea_console_showcase_2.png');
    background-repeat: no-repeat;
    background-size: auto 100vh;
    background-position: center;
    pointer-events: none;
    transform: translateZ(0); /* iOS repaint fix */
}
@media (min-width: 769px) {
    #essential-commander::before {
        background-size: contain;
        background-attachment: fixed;
        transform: none;
        background-position: right;
    }
}

#essential-mesh { position: relative; }
#essential-mesh::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url('/pictures/essential-mesh-hero.png');
    background-repeat: no-repeat;
    background-size: auto 100vh;
    background-position: center;
    pointer-events: none;
    transform: translateZ(0); /* iOS repaint fix */
}
@media (min-width: 769px) {
    #essential-mesh::before {
        background-size: cover;
        background-attachment: fixed;
        transform: none;
    }
}

/* ===========================
   Mobile Typography Tweaks for Tech Sections
   =========================== */
@media (max-width: 768px) {
    .essential-core-content,
    .essential-ops-content,
    .essential-mesh-content {
        padding: 1.25rem !important;
        max-width: 92vw;
    }
    .essential-core-content h1,
    .essential-core-content h2,
    .essential-core-content h3,
    .essential-ops-content h1,
    .essential-ops-content h2,
    .essential-ops-content h3,
    .essential-mesh-content h1,
    .essential-mesh-content h2,
    .essential-mesh-content h3 {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }
    .essential-core-content p,
    .essential-ops-content p,
    .essential-mesh-content p,
    .essential-core-content li,
    .essential-ops-content li,
    .essential-mesh-content li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    .essential-core-content .btn,
    .essential-ops-content .btn,
    .essential-mesh-content .btn {
        font-size: 0.9rem !important;
        padding: 0.6rem 1.1rem !important;
    }
}

/* ===========================
   FOD Cycle Flashcards
   =========================== */
.fod-cycle-flashcards {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

.fod-cycle-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
}

.fod-cycle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
}

.fod-cycle-bg.active {
    opacity: 1;
    z-index: 1;
}

.fod-cycle-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}

.fod-cycle-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fod-cycle-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 3;
}

.fod-cycle-card {
    position: relative;
    min-height: 120px;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.fod-cycle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent);
    pointer-events: none;
}

.fod-cycle-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(91, 214, 255, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.fod-cycle-card.active {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(91, 214, 255, 0.4),
                0 0 0 1px rgba(91, 214, 255, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fod-cycle-card.active::before {
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent) 50%, 
        transparent);
    opacity: 0.6;
}

.fod-cycle-card h3 {
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.fod-cycle-content-wrapper {
    position: relative;
    min-height: 400px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.fod-cycle-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.fod-cycle-content.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.cycle-content-inner {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.cycle-content-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent);
    pointer-events: none;
    z-index: 1;
}

.cycle-content-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.03) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

.cycle-content-inner > * {
    position: relative;
    z-index: 2;
}

.cycle-content-inner h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cycle-content-inner p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cycle-content-inner em {
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

/* Mobile Responsive for Flashcards */
@media (max-width: 768px) {
    .fod-cycle-container {
        padding: 2rem 1rem;
    }
    
    .fod-cycle-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .fod-cycle-card {
        min-height: 100px;
        padding: 1.25rem;
    }
    
    .cycle-content-inner {
        padding: 2rem 1.5rem;
    }
}
