/* MSA Light Blue Color Scheme */
:root {
    --msa-primary: #5DADE2;
    --msa-primary-dark: #3498DB;
    --msa-primary-light: #85C1E9;
    --msa-secondary: #2E86C1;
    --msa-accent: #F39C12;
    --msa-text-dark: #2C3E50;
    --msa-text-light: #ECF0F1;
    --msa-bg-light: #F8F9FA;
    --msa-white: #FFFFFF;
    --msa-success: #27AE60;
    --msa-border-radius: 8px;
    --msa-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --msa-transition: all 0.3s ease;
}

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

/* Cross-browser consistency reset */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

ul {
    list-style: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--msa-text-dark);
    background-color: var(--msa-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation (sticky) */
.navbar {
    background: linear-gradient(135deg, var(--msa-primary), var(--msa-secondary));
    color: var(--msa-white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--msa-shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar .logo img {
    height: 50px;
    width: auto;
    border-radius: var(--msa-border-radius);
}

.navbar .logo span {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--msa-white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--msa-border-radius);
    transition: var(--msa-transition);
    cursor: pointer;
}

.nav-menu a.active,
.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--msa-white);
    margin: 4px 0;
    display: block;
    transition: var(--msa-transition);
}

/* Hero section (its own background image, no video) */
.hero {
    position: relative;
    height: 30vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    text-align: center;
    background-image: url('images/MSAhero.png');
    background-size: cover;
    background-position: center 30%;
    color: var(--msa-white);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 33, 60, 0.85), rgba(46, 134, 193, 0.7));
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--msa-border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--msa-transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--msa-accent);
    color: var(--msa-white);
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--msa-white);
    border: 2px solid var(--msa-white);
}

.btn-secondary:hover {
    background: var(--msa-white);
    color: var(--msa-secondary);
}

/* ===== VIDEO AS BACKGROUND BEHIND CONTENT ===== */
.main-content {
    position: relative;
    background: transparent;
    z-index: 0;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.content-on-video {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Pages (SPA - hidden/visible) */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--msa-primary), var(--msa-secondary));
    color: var(--msa-white);
    text-align: center;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: var(--msa-border-radius);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: center;
    width: 100%;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--msa-secondary);
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--msa-primary);
    margin: 1rem auto;
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: left;
    width: 100%;
}

.mission-list {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 2rem;
    padding-left: 1.5rem;
}

.mission-list li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.feature-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: 0.2s;
}

.feature-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.7);
}

.feature-item h3 {
    color: var(--msa-secondary);
    margin-bottom: 0.5rem;
}

/* Transparent cards for About page */
.about-card {
    background: rgba(255, 255, 255, 0.5); /* light white, half transparent */
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Ensure text is dark enough for readability */
.about-card p, .about-card li, .feature-item p {
    color: #2C3E50; /* dark gray, matches your theme */
}

/* Adjust lists inside about-card */
.about-card ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.about-card li {
    margin-bottom: 0.5rem;
}

/* Industry card base styles */
.industry-card {
    background: var(--msa-white);
    padding: 2rem;
    border-radius: var(--msa-border-radius);
    box-shadow: var(--msa-shadow);
    transition: var(--msa-transition);
    border: 2px solid transparent;
    text-align: center;
}

.industry-card:hover {
    transform: translateY(-5px);
    border-color: var(--msa-primary);
    box-shadow: 0 8px 20px rgba(93, 173, 226, 0.2);
}

.industry-card h3 {
    color: var(--msa-secondary);
    margin-bottom: 0.5rem;
}

/* 3-column grid for first 12 industries */
.industries-grid-3col {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: center;
}

/* Centered row for Printing industry */
.industries-printing-row {
    max-width: 1000px;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
}

.industries-printing-row .industry-card {
    width: 100%;
    max-width: 300px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--msa-white);
    border-radius: var(--msa-border-radius);
    overflow: hidden;
    box-shadow: var(--msa-shadow);
    transition: var(--msa-transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1rem;
}

.project-info h3 {
    color: var(--msa-secondary);
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--msa-secondary), var(--msa-primary));
    padding: 4rem 0;
    text-align: center;
    color: var(--msa-white);
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn {
    background: var(--msa-white);
    color: var(--msa-secondary);
}

.cta-section .btn:hover {
    background: var(--msa-bg-light);
}

/* Contact Grid - 3 equal width columns */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.contact-grid .contact-info {
    display: flex;
    flex-direction: column;
}

.contact-grid .contact-form-container {
    display: flex;
    flex-direction: column;
}

.contact-grid .map-container {
    margin-top: 0;
}

.contact-grid .map-container iframe {
    width: 100%;
    height: 300px;
    border-radius: var(--msa-border-radius);
}

.contact-form-container h2 {
    color: var(--msa-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--msa-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--msa-border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--msa-transition);
    background: var(--msa-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--msa-primary);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--msa-bg-light);
    border-radius: var(--msa-border-radius);
    border: 1px solid #e0e0e0;
    transition: var(--msa-transition);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--msa-shadow);
}

.contact-item h3 {
    color: var(--msa-secondary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.contact-item p {
    margin: 0;
    color: var(--msa-text-dark);
}

/* Gallery */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--msa-primary);
    background: transparent;
    color: var(--msa-secondary);
    border-radius: var(--msa-border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--msa-transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--msa-primary);
    color: var(--msa-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--msa-border-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--msa-shadow);
    transition: var(--msa-transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 1rem;
    opacity: 0;
    transition: var(--msa-transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: var(--msa-white);
    font-size: 1rem;
    margin: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--msa-border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--msa-white);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--msa-transition);
}

.lightbox-close {
    top: -2.5rem;
    right: 0;
}

.lightbox-prev {
    left: -3rem;
    top: 50%;
    transform: translateY(-50%);
    display: none; /* Hidden by default, shown when needed */
}

.lightbox-next {
    right: -3rem;
    top: 50%;
    transform: translateY(-50%);
    display: none; /* Hidden by default, shown when needed */
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--msa-primary);
}

.lightbox-caption {
    color: var(--msa-white);
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Video Preloader – covers the main content area initially */
.video-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* dark semi-transparent background */
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* above everything */
    transition: opacity 0.5s ease;
}
.video-preloader.fade-out {
    opacity: 0;
    pointer-events: none; /* allows clicking through */
}
.video-preloader.hidden {
    display: none;
}

.preloader-content {
    text-align: center;
    color: white;
    max-width: 300px;
}
.preloader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0.6; /* faint logo */
    filter: brightness(0) invert(1); /* makes logo white-ish if needed – adjust */
}
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background: #F39C12; /* accent color */
    transition: width 0.2s linear;
}
.preloader-content p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Footer */
.footer {
    background: var(--msa-text-dark);
    color: var(--msa-white);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--msa-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section a {
    color: var(--msa-text-light);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--msa-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.map-container {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--msa-secondary);
        padding: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .industries-grid-3col {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-prev {
        left: -2rem;
    }

    .lightbox-next {
        right: -2rem;
    }
}
/* Hide video background on mobile devices */
@media (max-width: 767px) {
    .bg-video {
        display: none !important;
    }
    
    .main-content {
        /* Adjust main content to fill the screen without video */
        min-height: 100vh;
    }
    
    /* Ensure hero section still shows properly */
    .hero {
        height: 50vh;
        min-height: 300px;
    }
}