/* 
   Dr. Ferrari - High-Impact Vibrant Design System
   Dominant Green & Sage with Complex Layering
*/

:root {
    --primary-green: #0A3D2E;
    --primary-green-light: #155e49;
    --secondary-sage: #E2E9E3;
    --secondary-sage-dark: #cbd9ce;
    --bg-white: #ffffff;
    --text-white: #ffffff;
    --text-dark: #072a20;
    --text-muted: #556B5D;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
    --transition-slow: all 1s var(--ease-smooth);
    --transition-fast: all 0.4s var(--ease-smooth);

    --depth-soft: 0 10px 40px rgba(10, 61, 46, 0.05);
    --depth-bold: 0 30px 60px rgba(10, 61, 46, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

/* Background Decorative Elements */
.bg-shape {
    position: absolute;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}

.shape-1 {
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: var(--primary-green);
    border-radius: 50%;
}

.shape-2 {
    bottom: 100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--secondary-sage);
    border-radius: 50%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* NAVBAR */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: var(--transition-fast);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-green);
    font-size: 26px;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-green);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    transform: translateY(-2px);
}

.btn-cta {
    background: var(--primary-green);
    color: white !important;
    padding: 12px 32px;
    border-radius: 100px;
    opacity: 1 !important;
    box-shadow: 0 10px 20px rgba(10, 61, 46, 0.2);
    white-space: nowrap;
}

.mobile-socials {
    display: none;
}

/* MOBILE TOGGLE */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.mobile-toggle .bar {
    width: 30px;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition-fast);
}

.mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* SOCIAL SIDEBAR */
.social-sidebar {
    position: fixed;
    left: 40px;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
    padding: 10px;
    transition: var(--transition-fast);
}

.social-sidebar a {
    color: var(--primary-green);
    /* Oscuro por defecto para fondo blanco */
    font-size: 24px;
    opacity: 1;
    transition: var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cuando pasa sobre secciones oscuras */
.social-sidebar.on-dark a {
    color: var(--secondary-sage);
    opacity: 0.9;
}

.social-sidebar a:hover {
    opacity: 1;
    transform: scale(1.2);
    color: var(--primary-green-light);
}

.social-sidebar.on-dark a:hover {
    color: #fff;
}

@media (max-width: 1024px) {
    .social-sidebar {
        display: none;
        /* Hide on smaller screens to avoid overlap */
    }
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.9;
    color: var(--primary-green);
    margin-bottom: 2.5rem;
    letter-spacing: -2px;
}

.hero-content h1 span {
    display: block;
    color: var(--secondary-sage-dark);
    font-style: italic;
    font-weight: 400;
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3.5rem;
    border-left: 4px solid var(--secondary-sage);
    padding-left: 30px;
}

.hero-image-wrap {
    position: relative;
    padding-bottom: 40px;
}

.hero-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -40px;
    width: 300px;
    height: 300px;
    background: var(--secondary-sage);
    z-index: -1;
    border-radius: 20px;
}

.hero-image-wrap img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--depth-bold);
    transform: rotate(-2deg);
    transition: var(--transition-slow);
}

.hero-image-wrap:hover img {
    transform: rotate(0deg) scale(1.02);
}

/* SECTIONS */
section {
    padding: 160px 0;
    position: relative;
}

.section-vibrant {
    background: var(--primary-green);
    color: var(--text-white);
}

.section-sage {
    background: var(--secondary-sage);
}

.section-head {
    margin-bottom: 80px;
}

.section-tag {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 14px;
    font-weight: 800;
    color: var(--secondary-sage-dark);
    display: block;
    margin-bottom: 15px;
}

.section-head h2 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    max-width: 800px;
}

/* CARDS & GRIDS */
.stagger-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.premium-box {
    background: white;
    padding: 60px;
    border-radius: 24px;
    box-shadow: var(--depth-soft);
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.premium-box:hover {
    transform: translateY(-15px);
    box-shadow: var(--depth-bold);
}

.premium-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-fast);
}

.premium-box:hover::before {
    transform: scaleX(1);
}

.premium-box i {
    font-size: 3.5rem;
    color: var(--primary-green);
    margin-bottom: 30px;
    display: block;
}

/* BIO LAYOUT */
.bio-split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 100px;
    align-items: center;
}

.bio-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.bio-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.stat-item h4 {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--secondary-sage);
}

/* TREATMENT GRID (3.0) */
.treatment-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    /* Centering items if they wrap */
}

.t-card {
    flex: 1 1 380px;
    /* Grow and shrink with a base of 380px */
    max-width: 480px;
    /* Larger but controlled */
    margin: 0;
    height: auto;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    color: white;
    background: #000;
    /* Fondo negro para que si el video no ocupa todo, se vea profesional */
    display: flex;
    flex-direction: column;
    box-shadow: var(--depth-soft);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.77%;
    /* Proporción 9:16 para Shorts */
    background: #000;
    overflow: hidden;
    /* Important for masking */
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background 0.3s ease;
}

.video-overlay:hover {
    background: rgba(0, 0, 0, 0.1);
}

.play-pause-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
    pointer-events: none;
}

.video-overlay:hover .play-pause-btn,
.video-overlay.paused .play-pause-btn {
    opacity: 1;
    transform: scale(1);
}

.video-overlay.playing .play-pause-btn {
    opacity: 0;
}

.t-card-content {
    width: 100%;
    padding: 25px 20px;
    background: var(--primary-green);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}


.achievement-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 30px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(226, 233, 227, 0.1);
    border-radius: 30px;
    padding: 50px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.achievement-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-10px);
    border-color: var(--secondary-sage);
}

.achievement-card h3 {
    font-size: 5rem;
    font-family: var(--font-heading);
    color: var(--secondary-sage);
    opacity: 0.2;
    position: absolute;
    top: 20px;
    right: 30px;
    line-height: 1;
}

.achievement-card h4 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.achievement-card p {
    font-size: 1.1rem;
    opacity: 0.7;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Specific Grid Placements for Visual Interest */
.ac-1 {
    grid-column: span 7;
    min-height: 350px;
}

/* Main grad */
.ac-2 {
    grid-column: span 5;
    min-height: 350px;
    background: rgba(226, 233, 227, 0.05);
}

/* Spec */
.ac-3 {
    grid-column: span 4;
    min-height: 300px;
}

/* Rez */
.ac-4 {
    grid-column: span 8;
    min-height: 300px;
    border-left: 10px solid var(--secondary-sage);
}

/* Leadership */
.ac-5 {
    grid-column: span 6;
    min-height: 250px;
}

/* Int */
.ac-6 {
    grid-column: span 6;
    min-height: 250px;
    background: var(--secondary-sage);
    color: var(--primary-green);
}

.ac-6 h3,
.ac-6 h4,
.ac-6 p {
    color: var(--primary-green);
    opacity: 1;
}

.achievement-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-sage);
}

@media (max-width: 968px) {
    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .ac-1,
    .ac-2,
    .ac-3,
    .ac-4,
    .ac-5,
    .ac-6 {
        grid-column: span 1;
    }

    .achievement-card h3 {
        font-size: 3rem;
    }
}

/* FORM OVERLAY */
.contact-vibrant {
    background: var(--primary-green);
    border-radius: 40px;
    padding: 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    color: white;
    box-shadow: 0 50px 100px rgba(10, 61, 46, 0.3);
}

.contact-form-v {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form-v input,
.contact-form-v textarea,
.contact-form-v select {
    background: rgba(255, 255, 255, 0.05);
    /* Sutil y elegante */
    border: 1px solid rgba(226, 233, 227, 0.15);
    /* Borde suave en Sage */
    color: white;
    padding: 24px;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.contact-form-v textarea {
    resize: none;
}

.contact-form-v input::placeholder,
.contact-form-v textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
    /* Placeholder legible pero discreto */
}

/* Fix for Select Options Visibility */
.contact-form-v select option {
    background-color: var(--primary-green);
    color: white;
}

.contact-form-v input:focus,
.contact-form-v textarea:focus,
.contact-form-v select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-sage);
    outline: none;
    box-shadow: 0 0 20px rgba(226, 233, 227, 0.1);
}

.btn-vibrant {
    background: var(--secondary-sage);
    color: var(--primary-green);
    padding: 24px;
    border-radius: 16px;
    border: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-vibrant:hover {
    background: white;
    transform: scale(1.02);
}

/* ANIMATION CLASSES */
.reveal-up {
    opacity: 0;
    transform: translateY(80px);
    transition: var(--transition-slow);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-reveal>* {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.stagger-reveal.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* MOBILE */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 80%;
        height: 100dvh;
        min-height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: 0.5s var(--ease-smooth);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .mobile-socials {
        display: flex;
        gap: 20px;
        margin-top: 20px;
        justify-content: center;
        width: 100%;
    }

    .mobile-socials a {
        font-size: 1.8rem;
        color: var(--primary-green);
        opacity: 0.8;
    }

    .hero-grid,
    .bio-split,
    .stagger-grid,
    .contact-vibrant {
        grid-template-columns: 1fr;
    }

    .section-head h2 {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }

    .hero-image-wrap {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 3rem;
        border-left: none;
        border-top: 4px solid var(--secondary-sage);
        padding: 20px 0 0;
        max-width: 100%;
    }

    .stagger-reveal {
        justify-content: center;
    }

    .contact-vibrant {
        padding: 40px;
        text-align: center;
    }

    .bio-stat-grid {
        gap: 15px;
    }
}

/* WHATSAPP FLOAT */
.whatsapp-float {
    position: fixed;
    right: 40px;
    bottom: 40px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 80px 0;
    }

    .t-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .achievement-card {
        padding: 30px;
    }

    .achievement-card h3 {
        font-size: 3rem;
    }

    .contact-info-v h2 {
        font-size: 2.5rem !important;
    }

    .contact-vibrant {
        padding: 40px 20px;
        border-radius: 24px;
        gap: 40px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .contact-form-v {
        max-width: 100%;
        overflow: hidden;
    }

    .contact-form-v input,
    .contact-form-v textarea,
    .contact-form-v select {
        padding: 18px;
        font-size: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .btn-vibrant {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .whatsapp-float {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .bio-split {
        gap: 40px;
        max-width: 100%;
        overflow: hidden;
    }

    .hero-image-wrap {
        max-width: 100%;
        overflow: hidden;
    }

    .hero-image-wrap img {
        max-width: 100%;
        height: auto;
    }

    .hero-image-wrap::after {
        right: 0;
        width: 100%;
        height: 100%;
        bottom: -20px;
    }

    .bg-shape {
        display: none;
    }
}