@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary: #0067B2;
    --primary-light: #3385C1;
    --primary-dark: #004D86;
    --secondary: #5FBB47;
    /* Alimentos Green */
    --secondary-light: #7FC96B;
    --secondary-dark: #478C35;
    --accent: #FFD700;
    --celeste: #00ADEF;
    /* Agua & Aire Blue */
    --celeste-light: #33BEF2;

    --bg-white: #FFFFFF;
    --bg-soft: #F0F4F8;
    --bg-dark: #0F172A;
    --bg-glass: rgba(255, 255, 255, 0.1);

    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-light));
    --gradient-mixed: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));

    /* Layout */
    --container-max: 1280px;
    --section-padding: 100px;
    --header-height: 90px;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --radius-full: 9999px;

    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.h-full {
    height: 100%;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 103, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 103, 178, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid white;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

.btn-whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    background: #128C7E;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}


.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.5);
}

.gradient-text {
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-slide h1 span.gradient-text {
    background: none !important;
    -webkit-text-fill-color: white !important;
    color: white !important;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}

.mission-vision-title {
    font-size: 2.8rem !important;
    margin-bottom: 1.5rem !important;
}

.subpage-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    padding: 140px 0 80px !important;
    text-align: center;
    color: white !important;
}

.subpage-banner h2 {
    color: white !important;
    font-size: 3rem !important;
    margin: 0 !important;
}

/* Full Screen Video Hero */
.subpage-hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    background-color: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.subpage-hero-video .video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.subpage-hero-video .video-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    border: none;
}

/* Aspect ratio handling to ensure "cover" effect */
@media (min-aspect-ratio: 16/9) {
    .subpage-hero-video .video-bg iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .subpage-hero-video .video-bg iframe {
        width: 177.78vh;
    }
}

.subpage-hero-video .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.subpage-hero-video .container {
    position: relative;
    z-index: 3;
    padding: 0 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.subpage-hero-video h1 {
    color: #ffffff !important;
    font-size: clamp(3rem, 10vw, 5.5rem) !important;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}


/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    align-items: center;
    /* background: rgba(15, 23, 42, 0.4); */
    background: rgba(120, 120, 120, 0.3);
    /* Darker initial background for better contrast */
    backdrop-filter: blur(10px);
}

.nav.scrolled {
    height: 100px;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.logo-main {
    height: 90px;
    /* Maximum size requested */
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
}

.nav.scrolled .logo-main {
    height: 75px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links {
    display: none;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-weight: 500;
    font-size: 1.05rem;
    color: white;
    /* Contrast with dark hero overlay */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.nav.scrolled .nav-link {
    color: var(--text-main);
    text-shadow: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Styles */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

.dropdown-link:hover {
    background: var(--bg-soft);
    color: var(--primary);
    padding-left: 2rem;
}

/* Lab Detail Styles */
.lab-detail-card {
    padding: 3rem;
    margin-bottom: 3rem;
    border-left: 8px solid var(--celeste);
}

.lab-detail-card.green {
    border-left-color: var(--secondary);
}

.lab-detail-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--celeste);
}

.lab-detail-card.green h3 {
    color: var(--secondary);
}

.lab-subtitle {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 2rem 0 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.lab-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    border: 1px solid #edf2f7;
    transition: var(--transition);
}

.lab-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--text-main);
    z-index: 1200;
}

.mobile-toggle i {
    width: 32px;
    height: 32px;
}

@media (min-width: 768px) {
    .md-hidden {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    z-index: 1100;
    padding: 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
}

/* Hero Slider Implementation */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero-slider-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.1);
    transition: transform 6s ease-out;
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1);
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    padding: 0;
    width: 100%;
}

.h-full.flex-center-v {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.hero-slide h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    max-width: 800px;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease out 0.3s;
}

.hero-slide p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease out 0.5s;
}

.hero-slide.active h1,
.hero-slide.active p {
    transform: translateY(0);
    opacity: 1;
}

/* Slider Controls */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--secondary);
    transform: scale(1.3);
}

/* Redefining old classes for compatibility if needed or cleaning up */
/* hero-tag replaced by white version above */

@media (max-width: 768px) {
    .hero-slide h1 {
        font-size: 2.5rem;
    }

    .hero-slide p {
        font-size: 1rem;
    }
}

/* Services */
.service-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.service-card ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-card li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.1rem;
}

.card-blue {
    background: var(--primary);
    color: white;
    border: none;
}

.card-green {
    background: var(--secondary);
    color: white;
    border: none;
}

.card-blue h3,
.card-green h3 {
    color: white !important;
}

.card-blue p,
.card-green p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.service-card.card-blue,
.service-card.card-green {
    color: white;
    border: none;
}


.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: white;
}

.service-card ul li {
    color: rgba(255, 255, 255, 0.9);
}

.service-card.card-blue li,
.service-card.card-green li {
    color: rgba(255, 255, 255, 0.9);
}

.service-card li::before {
    content: '✓';
    color: inherit;
    font-weight: bold;
    opacity: 0.8;
}

/* Contact */
.contact-icon-box {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.social-link {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    transform: translateY(-3px);
    color: var(--primary);
}

.contact-form {
    padding: 3rem;
}

.grid-2-form {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .grid-2-form {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 103, 178, 0.1);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer p,
.footer a {
    color: #94A3B8;
    font-size: 0.95rem;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-scale {
    transform: scale(0.9);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Icons Fix */
[class^="lucide-"] {
    display: inline-block;
    vertical-align: middle;
}

i[data-lucide] {
    width: 24px;
    height: 24px;
    display: inline-block;
}