/* Light Theme Base */
body {
    background-color: var(--bg-light);
    color: var(--text-main);
}

/* Page Hero Section */
.page-hero {
    height: 50vh;
    min-height: 400px;
    background: #081832;
    /* Core fallback blue */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
    /* Contain the parallax background */
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -50px;
    /* Overhang for parallax room */
    left: 0;
    right: 0;
    bottom: -50px;
    background: linear-gradient(135deg, rgba(8, 24, 50, 0.85) 0%, rgba(30, 80, 140, 0.8) 100%), url('images/hero_premium.png') center/cover no-repeat;
    z-index: 0;
    /* Parallax Hook */
    transform: translateY(var(--parallax-y, 0));
    will-change: transform;
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.4rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Industries Section */
#industries {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

.industries-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-sm) 0;
    max-width: 1100px;
    margin: 0 auto;
}

/* Industry Card Container */
.industry-card {
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(30, 58, 95, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);

    /* Initial state for animation */
    opacity: 0;
    transform: translateY(40px);
}

/* Animated state - triggered by JS */
.industry-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Staggered animation delays for cards */
.industry-card:nth-child(1).animate-in {
    transition-delay: 0.1s;
}

.industry-card:nth-child(2).animate-in {
    transition-delay: 0.2s;
}

.industry-card:nth-child(3).animate-in {
    transition-delay: 0.3s;
}

.industry-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Featured Video - Takes prominent position */
.card-video-large {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 16px;
    border: none;
    background: #1E3A5F;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

    /* Animation initial state */
    opacity: 0;
    transform: scale(0.95);
}

.card-video-large.animate-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

/* Image Gallery within Card */
.card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-sm);
}

/* Gallery items animation */
.card-gallery img,
.card-gallery .card-video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: none;
    background: #f0f0f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;

    /* Animation initial state */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.card-gallery img.animate-in,
.card-gallery .card-video.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for gallery items */
.card-gallery img:nth-child(1).animate-in,
.card-gallery .card-video:nth-child(1).animate-in {
    transition-delay: 0.1s;
}

.card-gallery img:nth-child(2).animate-in,
.card-gallery .card-video:nth-child(2).animate-in {
    transition-delay: 0.2s;
}

.card-gallery img:nth-child(3).animate-in,
.card-gallery .card-video:nth-child(3).animate-in {
    transition-delay: 0.3s;
}

/* Hover effects */
.card-gallery img:hover,
.card-gallery .card-video:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-video-large:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Text Section */
.card-bottom {
    padding: var(--spacing-sm) var(--spacing-xs) var(--spacing-xs);
    text-align: center;
    border-top: 1px solid rgba(30, 58, 95, 0.1);

    /* Animation initial state */
    opacity: 0;
    transform: translateY(15px);
}

.card-bottom.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.card-bottom h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 2rem;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.card-bottom h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.card-bottom p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 15px auto 0;
}


/* Full-Screen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--secondary);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
}

.close-modal:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.close-modal img {
    width: 28px;
    height: 28px;
    filter: invert(1);
}

.image-caption {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 20px;
    font-size: 1.1rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .page-hero {
        min-height: 300px;
    }

    .page-hero h1 {
        font-size: 2.5rem;
    }

    #industries {
        padding-top: 40px;
    }

    .industries-grid {
        gap: 50px;
        padding: 40px 15px;
    }

    .industry-card {
        padding: 25px;
        border-radius: 16px;
    }

    .card-video-large {
        height: 280px;
        border-radius: 12px;
    }

    .card-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-gallery img,
    .card-gallery .card-video {
        height: 200px;
        border-radius: 10px;
    }

    .card-bottom h3 {
        font-size: 1.6rem;
    }

    .card-bottom p {
        font-size: 1rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .card-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-video-large {
        height: 380px;
    }
}