:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-gold: #c5a059;
    --accent-gold-light: #e0c28c;
    --shadow-gold: rgba(197, 160, 89, 0.2);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    cursor: pointer;
}

button {
    cursor: pointer;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
    /* Sin transition: evita el micro-desplazamiento durante scroll-snap */
    will-change: transform;
    backface-visibility: hidden;
}

.logo {
    grid-column: 1;
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 100px;
    width: auto;
    filter: brightness(1.2);
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    grid-column: 2;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 300;
    color: var(--text-primary);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.cta-nav {
    background: #fff;
    color: #000;
    padding: 0.8rem 1.8rem;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
}

/* --- Hero --- */
.video-hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #000;
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.video-hero .hero-content {
    z-index: 2;
    max-width: 90%;
    animation: fadeInScale 1.5s ease-out;
}

.video-hero h1 {
    font-family: 'Poppins', sans-serif;
    /* font-size: clamp(2.5rem, 10vw, 6rem); */
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: clamp(4px, 4vw, 20px);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.video-hero h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.6rem, 2.5vw, 1.1rem);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: clamp(4px, 3vw, 12px);
    font-weight: 600;
    margin-top: 1rem;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    font-size: 0.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    animation: bounce 2s infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(1.1);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 20%, transparent 100%), url('uploads/drfernandocorrea.jpg');
    background-size: cover;
    background-position: right center;
    background-attachment: scroll;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-subtitle {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero-image {
    display: none;
}

/* --- Sections General --- */
section,
.hero,
.video-hero,
footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

section {
    padding: 8rem 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-label {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
}

/* --- Path Select --- */
.path-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--bg-darker);
}

.path-card {
    background: #111;
    padding: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.path-card:hover {
    border-color: var(--accent-gold);
    background: #161616;
}

.path-card h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* --- Procedures --- */
.procedures {
    padding: 8rem 0;
    text-align: center;
}

.procedures h2 {
    margin-bottom: 4rem;
    padding: 0 10%;
}

.procedures-grid {
    display: flex;
    height: 700px;
    width: 100%;
    gap: 0;
    overflow: hidden;
}

.proc-card {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.proc-card:last-child {
    border-right: none;
}

.proc-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
    filter: grayscale(40%) contrast(110%);
}

.proc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    transition: var(--transition);
}

.proc-info {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 3rem;
    z-index: 2;
    width: 100%;
    text-align: left;
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.proc-card:hover {
    flex: 3;
}

.proc-card:hover img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(100%);
}

.proc-card:hover .proc-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.7) 100%);
}

.proc-card:hover .proc-info {
    opacity: 1;
    transform: translateY(0);
}

.proc-vertical-title {
    position: absolute;
    bottom: 10rem;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    z-index: 2;
    transition: all 0.3s ease;
}

.proc-card:hover .proc-vertical-title {
    opacity: 0;
}

.proc-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 600;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--accent-gold);
    color: #000;
}

/* --- Gallery & Carousel --- */
.gallery-section {
    padding: 8rem 0;
    text-align: center;
    background: var(--bg-darker);
    overflow: hidden;
}

.gallery-text {
    padding: 0 10% 3rem;
}

.gallery-text h1 {
    font-size: 1.2rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.gallery-text h2 {
    font-size: 3.5rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.1;
}

.carousel-container {
    width: 70%;
    overflow: hidden;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    width: fit-content;
    animation: scrollRightToLeft 50s linear infinite;
}

.carousel-item {
    flex: 0 0 200px;
    height: 180px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item img {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.5);
    transition: var(--transition);
}

.carousel-item:hover img {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scrollRightToLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 14));
    }
}

@media (max-width: 768px) {
    .gallery-text h2 {
        font-size: 2.2rem;
    }

    .carousel-item {
        flex: 0 0 150px;
    }

    @keyframes scrollRightToLeft {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-150px * 14));
        }
    }
}

/* --- Video Quote Section --- */
.video-quote {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #000;
}

.video-quote .quote-content {
    z-index: 2;
    max-width: 900px;
    padding: 0 5%;
}

.video-quote h1 {
    /* font-size: clamp(1.4rem, 5vw, 3rem); */
    font-family: var(--font-heading);
    font-weight: 300;
    /* font-style: italic; */
    margin: 2rem 0;
    line-height: 1.4;
    color: var(--text-primary);
}

.video-quote cite {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    font-style: normal;
}

.video-quote .hero-overlay {
    background: rgba(0, 0, 0, 0.4);
}

/* --- Footer --- */
footer {
    padding: 6rem 10% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to bottom, var(--bg-darker), #000);
}

.footer-logo img {
    height: 100px;
    width: auto;
    margin-bottom: 2rem;
    filter: brightness(1.1);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
    margin-bottom: 2rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-gold);
    transform: translateY(-3px);
}

.footer-links-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links-grid a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-links-grid a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-section.contact p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.appointment-btn {
    margin-top: 1.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legal-links {
    display: flex;
    gap: 1rem;
}

.legal-links .sep {
    opacity: 0.3;
}

.legal-links a:hover {
    color: var(--text-primary);
}

/* --- Side Navigation --- */
.side-nav {
    position: fixed;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: var(--transition);
    cursor: pointer;
}

.dot:hover,
.dot.active {
    background: var(--accent-gold);
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--shadow-gold);
}

.nav-arrow {
    width: 30px;
    height: 30px;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: var(--transition);
    cursor: pointer;
}

.nav-arrow svg {
    width: 16px;
}

.nav-arrow:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* --- Visual Slider --- */
.visual-slider {
    position: relative;
    overflow: hidden;
}

.visual-slider .slider-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.visual-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    z-index: 0;
}

.visual-slider .slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }

    .nav-links {
        position: fixed;
        right: 0;
        /* siempre a la derecha del viewport */
        transform: translateX(100%);
        /* empieza fuera de pantalla con transform */
        top: 0;
        width: 80%;
        height: 100vh;
        background: var(--bg-darker);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateX(0);
        /* desliza hacia adentro */
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .mobile-menu-btn {
        display: block;
        order: 3;
        position: relative;
        z-index: 1003;
    }

    nav .cta-nav {
        display: none !important;
    }

    .logo img {
        height: 90px !important;
    }

    /* ── Mobile Side-Nav: right side, vertically centered ── */
    .side-nav {
        right: 10px;
        left: auto;
        top: 60%;
        bottom: auto;
        transform: translateY(-50%);
        flex-direction: column;
        align-items: center;
        gap: 10px;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        padding: 10px 8px;
    }

    .nav-dots {
        flex-direction: column;
        gap: 8px;
    }

    .dot {
        width: 6px;
        height: 6px;
        background: rgba(255, 255, 255, 0.3);
    }

    .dot.active {
        background: var(--accent-gold);
        transform: scale(1.4);
        box-shadow: 0 0 6px var(--shadow-gold);
    }

    /* Flechas en mobile: ocultas para no ocupar espacio */
    .nav-arrow {
        width: 22px;
        height: 22px;
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        backdrop-filter: none;
        border-radius: 50%;
    }

    .nav-arrow svg {
        width: 12px;
    }

    .hero {
        padding: 0 5%;
        text-align: center;
        background-position: 70% top;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.4;
    }

    section {
        padding: 4rem 8%;
    }

    .procedures {
        padding: 4rem 0;
    }

    .procedures-grid {
        flex-direction: column;
        height: auto;
    }

    .proc-card {
        flex: none;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .proc-info {
        opacity: 1;
        transform: translateY(0);
        padding: 2rem;
    }

    .proc-vertical-title {
        display: none;
    }

    .proc-card:hover {
        flex: none;
    }

    .gallery-text h2 {
        font-size: 2.2rem;
    }

    .carousel-container {
        width: 90%;
    }

    .carousel-item {
        flex: 0 0 150px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-tagline {
        max-width: 100%;
        margin: 0 auto 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .legal-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    @keyframes scrollRightToLeft {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-150px * 14));
        }
    }
}