:root {
    --primary-color: #0f2b46;
    --secondary-color: #007bb5;
    --accent-color: #00a8cc;
    --light-bg: #f8f9fa;
    --text-color: #333333;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-color); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; }
.section-padding { padding: 80px 0; }
.divider { height: 4px; width: 60px; background: var(--secondary-color); margin: 15px 0 25px; border-radius: 2px; }

/* Navbar */
.navbar { background: transparent; transition: all 0.4s ease; padding: 15px 0; }
.navbar.scrolled { background: rgba(15, 43, 70, 0.98); backdrop-filter: blur(10px); padding: 10px 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.brand-title { color: var(--white); font-family: var(--font-heading); font-size: 1.5rem; font-weight: bold; line-height: 1; }
.brand-subtitle { color: var(--accent-color); font-size: 0.75rem; letter-spacing: 1px; }
.nav-link { color: rgba(255,255,255,0.8) !important; font-weight: 600; margin: 0 5px; position: relative; transition: color 0.3s; }
.nav-link:hover, .nav-link.active { color: var(--white) !important; }
.btn-whatsapp-nav { background: #25D366; color: white !important; border-radius: 20px; padding: 8px 20px; font-weight: 600; transition: transform 0.3s; }
.btn-whatsapp-nav:hover { transform: translateY(-2px); background: #1ebd5c; }

/* Hero */
.hero-section { min-height: 100vh; background: linear-gradient(135deg, rgba(15,43,70,0.9) 0%, rgba(0,123,181,0.8) 100%); position: relative; padding-top: 100px; }
.hero-bg-animation { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, rgba(0,168,204,0.1) 0%, transparent 70%); animation: pulseBg 10s infinite alternate; pointer-events: none; }
@keyframes pulseBg { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.2); opacity: 1; } }

/* Services */
.col-lg-20percent { flex: 0 0 auto; width: 20%; }
@media (max-width: 991px) { .col-lg-20percent { width: 50%; } }
@media (max-width: 767px) { .col-lg-20percent { width: 100%; } }
.service-card { background: var(--white); padding: 30px 20px; border-radius: 10px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: all 0.4s ease; height: 100%; border-bottom: 4px solid transparent; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--accent-color); }
.service-icon { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 20px; transition: transform 0.4s; }
.service-card:hover .service-icon { transform: scale(1.1); }

/* Tests */
.filter-btn { background: transparent; border: 1px solid var(--secondary-color); color: var(--secondary-color); padding: 8px 16px; border-radius: 20px; margin: 5px; font-size: 0.9rem; transition: all 0.3s; }
.filter-btn.active, .filter-btn:hover { background: var(--secondary-color); color: var(--white); }
.test-card { background: var(--white); border-radius: 8px; padding: 25px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: all 0.3s ease; cursor: pointer; height: 100%; position: relative; overflow: hidden; border-left: 4px solid var(--secondary-color); }
.test-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-left-width: 8px; }
.test-icon { font-size: 1.5rem; color: var(--secondary-color); }

/* Research */
#research { background-color: var(--primary-color); }
.research-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.1; background: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="2" fill="%23ffffff"/></svg>'); }
.research-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(5px); padding: 25px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); height: 100%; transition: transform 0.3s; }
.research-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.15); }

/* =========================================
   UPDATED: AUTO-SCROLLING GALLERY SLIDER
   ========================================= */
.gallery-slider-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 20px 0 30px 0;
    scroll-behavior: auto; /* Handled by JS for smooth auto-scroll */
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Styling */
.gallery-slider-wrapper::-webkit-scrollbar {
    height: 10px;
}
.gallery-slider-wrapper::-webkit-scrollbar-track {
    background: #e9ecef; 
    border-radius: 10px;
}
.gallery-slider-wrapper::-webkit-scrollbar-thumb {
    background: var(--secondary-color); 
    border-radius: 10px;
}
.gallery-slider-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); 
}

.gallery-track {
    display: inline-flex;
    gap: 20px;
    align-items: center;
}

.gallery-item {
    flex: 0 0 auto;
    width: 320px; /* Fixed width for all media cards */
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-item img, 
.gallery-item video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-item video {
    background: #000;
}

.gallery-caption {
    padding: 15px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: normal; /* Allows text to wrap to next line */
    line-height: 1.4;
}

/* Elements */
.mobile-floating-actions { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.floating-whatsapp { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #25D366; color: white; border-radius: 50%; z-index: 999; transition: transform 0.3s; text-decoration: none; }
.floating-whatsapp:hover { transform: scale(1.1); color: white; }
.back-to-top { position: fixed; bottom: 100px; right: 30px; width: 45px; height: 45px; background: var(--primary-color); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s; text-decoration: none; }
.back-to-top.visible { opacity: 1; visibility: visible; }

/* Animations */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.slide-up { animation: slideUp 0.8s forwards; opacity: 0; transform: translateY(30px); }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }