/* ===================================================
   dermatoH · Dr. Juan Manuel Hernayes
   CSS personalizado (complementa Tailwind CDN)
   Desarrollado por Lucas Giovinazzo
   =================================================== */

:root {
    --navy:    #1c2541;
    --navy-d:  #10182b;
    --peach:   #f0a48c;
    --peach-d: #d97e63;
    --peach-l: #fbe8e1;
    --navy-l:  #eaeef6;
    --text:    #1c2b38;
    --muted:   #607d8b;
}

/* ─── RESET / BASE ─────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #faf7f2;
    overflow-x: hidden;
}

.mont { font-family: 'Montserrat', sans-serif; }

/* Scroll suave nativo + offset para el navbar fijo (reemplaza el JS de smooth-scroll). */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 5rem; }

/* ─── GRADIENTS ─────────────────────────────────── */
.grad {
    background: linear-gradient(135deg, var(--navy) 0%, var(--peach) 100%);
}

.grad-text {
    background: linear-gradient(135deg, var(--navy) 0%, var(--peach-d) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── NAVBAR ────────────────────────────────────── */
#navbar {
    background: transparent;
    box-shadow: none;
    transition: background .35s ease, box-shadow .35s ease;
}
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.10);
}
/* Navbar transparente sobre el hero: texto claro */
#navbar .brand-name { -webkit-text-fill-color: #f6f2eb; color: #f6f2eb; }
#navbar .brand-sub  { color: rgba(255, 255, 255, 0.6); }
#navbar .nav-link   { color: rgba(255, 255, 255, 0.82); }
#navbar .nav-link:hover { color: #fff; }
#navbar .hamburger span { background: #f6f2eb; }
/* Al scrollear (fondo blanco): texto oscuro (vuelve al estado normal) */
#navbar.scrolled .brand-name { -webkit-text-fill-color: transparent; }
#navbar.scrolled .brand-sub  { color: var(--muted); }
#navbar.scrolled .nav-link   { color: var(--muted); }
#navbar.scrolled .nav-link:hover { color: var(--navy); }
#navbar.scrolled .hamburger span { background: var(--navy); }

.nav-link {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}
.nav-link:hover { color: var(--navy); }

/* CTA del navbar: transparente, apoyado en el borde. Sobre el hero oscuro va
   claro; cuando el navbar se vuelve blanco al scrollear, pasa a navy. */
.btn-nav {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 100px;
    color: #f6f2eb;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.btn-nav:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.8);
}
#navbar.scrolled .btn-nav {
    border-color: rgba(28, 37, 65, 0.4);
    color: var(--navy);
}
#navbar.scrolled .btn-nav:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

/* Logo real (PNG transparente) */
.logo-img {
    width: 2.7rem;
    height: 2.7rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* ─── HERO ──────────────────────────────────────── */
.hero-bg {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 7rem 0 3rem;
    /* Fondo de marca hecho en Canva (navy + logo + ondas peach). */
    background: #141a3a url('../images/fondo-hero.png') center center / cover no-repeat;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── HERO · CONTENIDO ──────────────────────────── */
.hero-content {
    max-width: 36rem;
    text-align: left;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.25rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero-sub {
    margin: 1.5rem auto 0;
    max-width: 34rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-cta {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.hero-trust {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem 0.9rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.62);
}
.hero-trust strong { color: #f5f1ea; font-weight: 700; }
.hero-trust .dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--peach);
}

/* ─── HERO OSCURO · overrides para el canva navy ─────── */
.hero-bg .hero-content { position: relative; z-index: 2; }
.hero-bg .hero-title { color: #f6f2eb; }
.hero-bg .grad-text {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--peach);
}
.hero-bg .hero-sub { color: rgba(255, 255, 255, 0.74); }
.hero-bg .btn-navy {
    background: var(--peach);
    color: var(--navy-d);
}
.hero-bg .btn-navy:hover { background: var(--peach-d); color: #fff; }
.hero-bg .btn-outline {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.hero-bg .btn-outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ─── SEPARATOR ─────────────────────────────────── */
.sep {
    width: 52px; height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--peach));
    border-radius: 2px;
}

/* ─── BUTTONS ───────────────────────────────────── */
.btn-wa {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 0.95rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 0.6rem;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    cursor: pointer;
}
.btn-wa:hover { transform: scale(1.04); box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35); }

.btn-navy {
    background: var(--navy);
    color: white;
    padding: 0.95rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 0.6rem;
    transition: background 0.3s, transform 0.3s;
    text-decoration: none;
    cursor: pointer;
}
.btn-navy:hover { background: var(--navy-d); transform: scale(1.04); }

.btn-outline {
    border: 2px solid var(--navy);
    color: var(--navy);
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 0.6rem;
    transition: background 0.3s, color 0.3s;
    text-decoration: none;
    cursor: pointer;
}
.btn-outline:hover { background: var(--navy); color: white; }

/* Servicios: la regla separa áreas clínicas, sin contenedores decorativos. */
.services-intro {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    align-items: baseline;
    margin-bottom: 3.5rem;
}
.services-intro > p,
.service-row > p,
.prices-intro > p,
.booking-intro > p {
    max-width: 38rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.8;
}
.service-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    padding: 2.25rem 0;
    border-top: 1px solid rgba(28, 37, 65, 0.2);
}
.service-row h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
}
.service-specialty {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--navy);
    font-weight: 600;
}
.prices-intro { max-width: 45rem; margin-bottom: 2.5rem; }
.prices-intro h2 { margin-bottom: 1.25rem; }
.prices-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
}
.prices-footer p { margin: 0; max-width: 32rem; line-height: 1.7; }
.booking-layout { display: grid; grid-template-columns: 1fr 1.65fr; gap: 4rem; }
.booking-content { min-width: 0; }
.location-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.location-title { font-size: 1rem; font-weight: 600; margin-bottom: 2rem; }
.location-details {
    border-top: 1px solid rgba(28, 37, 65, 0.2);
    margin: 2rem 0;
    padding-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
}
.location-details p + p { margin-top: 1rem; }
@media (max-width: 767px) {
    .services-intro, .service-row, .booking-layout, .location-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
    .services-intro { margin-bottom: 2.5rem; }
    .service-row { padding: 1.75rem 0; }
    .booking-layout, .location-layout { gap: 2.5rem; }
    .prices-footer { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
    #servicios, #tratamientos, #contacto, #ubicacion { padding: 4rem 1.5rem; }
}

/* ─── PROFESSIONAL ──────────────────────────────── */

/* Foto placeholder del profesional */
/* Ficha de credenciales. Reemplaza al recuadro que esperaba una foto: en vez de
   un hueco, la seccion se apoya en lo que un paciente puede verificar. Sin borde
   ni sombra a proposito, para que no lea como una tarjeta mas del sitio: se
   separa del texto con una regla vertical y aire. */
.prof-ficha {
    border-left: 2px solid var(--navy);
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    /* Centrada en la altura de la fila: la columna de texto es mas alta y, al
       ras de arriba, la ficha quedaba flotando sobre un hueco. */
    justify-content: center;
    gap: 1.6rem;
}

.ficha-rol {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 0.3rem;
}

/* El acento del sitio se gasta una sola vez en esta seccion: aca. */
.ficha-matricula {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin: 0;
}
.ficha-matricula span {
    color: var(--peach-d);
    font-variant-numeric: tabular-nums;
}

.ficha-avales {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
}
.ficha-avales div {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.9rem;
    align-items: baseline;
}
.ficha-avales dt {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy);
}
.ficha-avales dd {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

.ficha-especialidad {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--peach-d);
    margin: 0;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(28, 37, 65, 0.1);
}

/* En celular la regla vertical no tiene sentido: pasa a separador horizontal. */
@media (max-width: 767px) {
    .prof-ficha {
        border-left: none;
        border-top: 2px solid var(--navy);
        padding-left: 0;
        padding-top: 1.75rem;
    }
}

/* ─── TRATAMIENTOS · TABS DE PRECIOS ────────────── */
.ptabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2rem;
    border-bottom: 1px solid rgba(28, 37, 65, 0.2);
    margin-bottom: 1.5rem;
}
.ptab {
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 0;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.ptab:hover { color: var(--navy); }
.ptab.is-active { color: var(--navy); border-bottom-color: var(--navy); }
@media (max-width: 767px) {
    .ptabs { flex-direction: column; align-items: stretch; }
    .ptab { text-align: left; padding: 0.8rem 0; }
}

.ppanel { display: none; }
.ppanel.is-active { display: block; animation: fadePanel 0.35s ease; }
@keyframes fadePanel {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.pgrid { display: grid; grid-template-columns: 1fr; column-gap: 3rem; }
@media (min-width: 1024px) {
    .pgrid.two { grid-template-columns: 1fr 1fr; }
}
.pitem {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(28, 37, 65, 0.07);
    font-size: 0.95rem;
}
.pitem span { color: var(--text); }
.pitem b { color: var(--navy); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ─── TURNOS · FORMULARIO ───────────────────────── */
.turno-form {
    background: white;
    border: 1px solid rgba(28, 37, 65, 0.08);
    border-radius: 0.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.turno-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) {
    .turno-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }

.field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.field input,
.field select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(28, 37, 65, 0.15);
    border-radius: 0.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background: #fbfcfe;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--peach);
    box-shadow: 0 0 0 3px rgba(240, 164, 140, 0.2);
}

.turno-resumen[hidden] { display: none; }
.turno-resumen {
    margin-top: 1.25rem;
    background: var(--navy-l);
    border-radius: 0.25rem;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.9rem;
}
.tr-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tr-row strong, .tr-row > span:last-child { white-space: nowrap; }
.tr-muted { font-size: 0.78rem; color: var(--muted); }

.turno-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* El botón "Reservar" es un <button>: normaliza su apariencia con .btn-navy. */
.turno-actions button.btn-navy {
    border: none;
    cursor: pointer;
    font: inherit;
}

/* Mensaje de estado / error del formulario de turnos. */
.turno-msg {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--muted);
}
.turno-msg.is-error { color: var(--peach-d); }

/* ─── UBICACIÓN · MAPA DE PALERMO (imagen estática) ── */
.palermo-wrap { background: #eef2f8; }
#palermo-map {
    display: block;
    width: 100%;
    height: auto;
}

/* ─── WHATSAPP FLOTANTE ─────────────────────────── */
.wa-float {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 60;
    width: 3.6rem; height: 3.6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s;
    text-decoration: none;
}
.wa-float:hover { transform: scale(1.08); }

/* ─── MOBILE NAV ────────────────────────────────── */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    margin: 5px 0;
}

/* ─── TYPOGRAPHY / MISC ─────────────────────────── */
section { padding: 6.5rem 1.5rem; }

.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--peach-d);
}

.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title { font-size: 3.1rem; }
}

/* ─── SCROLL ANIMATIONS ─────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── ACCESIBILIDAD ─────────────────────────────── */

/* Foco visible propio: el anillo por defecto del navegador se pierde sobre el
   hero oscuro y sobre los botones con gradiente. Especificidad 0 a proposito,
   para que los campos del formulario conserven su tratamiento de arriba. */
:where(a, button, select, input, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--peach-d);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Saltear el navbar fijo y el hero para llegar directo al contenido. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--navy);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 0.75rem 0;
    font-size: 0.85rem;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Todo el sitio se usa mayormente desde el celular: sin el retardo de 300 ms
   al tocar ni el flash gris de Android. */
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Titulos sin ultima linea huerfana. */
h1, h2, h3 { text-wrap: balance; }

/* Quien pidio menos movimiento no recibe fades, desplazamientos ni scroll suave. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
