/* Variables y reset */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }

:root {
    /* Paleta extraída del logo real de Sonríadents (iteración 15) */
    --color-primary: #0060A8;   /* Azul del logo */
    --color-accent: #00A8D8;    /* Cian del logo */
    --color-red: #C00000;       /* Rojo del logo */
    --color-green: #007800;     /* Verde del logo */
    --color-text: #1f2937;
    --color-bg: #ffffff;
    --color-light: #f8fafc;
    --font-sans: system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: var(--font-sans); color: var(--color-text); line-height: 1.6; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.logo img { height: 48px; width: auto; display: block; }
.site-header { background: white; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; padding: 1rem; }

/* Barra multicolor bajo el header (firma del logo) */
.site-header::after { content: ""; position: absolute; bottom: -4px; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #0060A8 0%, #00A8D8 35%, #007800 70%, #C00000 100%); }

/* Navegación desktop: píldoras con underline animado */
.main-nav ul { display: flex; gap: 2rem; list-style: none; align-items: center; }
.main-nav a { text-decoration: none; color: var(--color-text); font-weight: 500; transition: color 0.3s; position: relative; padding: 0.4rem 0; }
.main-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--color-accent), var(--color-primary)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.main-nav a:not(.nav-cta):hover { color: var(--color-primary); }
.main-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }

/* "Agendar Cita" como botón destacado (rojo del logo) */
.nav-cta { display: inline-block; background: var(--color-red); color: white !important; padding: 0.55rem 1.3rem; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-sm); transition: all 0.3s ease; }
.nav-cta:hover { background: #a30000; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Botón hamburguesa (oculto en desktop) */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; margin-right: 0.25rem; z-index: 110; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--color-primary); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero con banner local */
.hero { background: linear-gradient(135deg, #f0f9ff, #e0f2fe, #dbeafe); padding: 0; text-align: center; position: relative; overflow: hidden; }

/* Carrusel hero */
.carousel { position: relative; width: 100%; height: clamp(280px, 55vh, 800px); overflow: hidden; background: #e0f2fe; }
.hero .container { padding-top: 3rem; padding-bottom: 4rem; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease-in-out; }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-dots { position: absolute; bottom: 0.75rem; left: 0; right: 0; display: flex; justify-content: center; gap: 0.5rem; z-index: 2; }
.carousel-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; cursor: pointer; padding: 0; transition: all 0.3s ease; }
.carousel-dot.active { background: white; transform: scale(1.25); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.footer-logo { height: 40px; margin-bottom: 0.75rem; opacity: 0.9; }
.hero-banner { width: 100%; max-width: 800px; height: auto; border-radius: 1rem; margin-bottom: 2rem; box-shadow: var(--shadow-lg); object-fit: cover; }
.hero h1 { font-size: 3rem; margin-bottom: 1.5rem; color: var(--color-primary); position: relative; z-index: 1; }
.hero p { font-size: 1.25rem; margin-bottom: 2rem; color: #475569; position: relative; z-index: 1; }

/* Botones con sombra y hover */
.btn-cta { display: inline-block; background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); color: white; padding: 1rem 2rem; border-radius: 0.75rem; text-decoration: none; font-weight: 600; box-shadow: var(--shadow-md); transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--color-accent), var(--color-primary)); }
.btn-large { font-size: 1.25rem; padding: 1.25rem 2.5rem; }

/* Servicios con imágenes diferentes por sección + acento por tarjeta (paleta del logo) */
.services { padding: 4rem 0; background: var(--color-light); }
.services h2 { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; color: var(--color-primary); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background: white; padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-md); transition: all 0.3s ease; overflow: hidden; border-top: 5px solid var(--color-primary); }
.service-card:nth-child(4n+2) { border-top-color: var(--color-accent); }
.service-card:nth-child(4n+3) { border-top-color: var(--color-green); }
.service-card:nth-child(4n) { border-top-color: var(--color-red); }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service-img { width: 100%; height: 200px; object-fit: cover; border-radius: 0.75rem; margin-bottom: 1.5rem; }
.service-card h3 { color: var(--color-primary); margin-bottom: 1rem; font-size: 1.5rem; }

/* Testimonios con fotos locales */
.testimonials { padding: 4rem 0; background: white; }
.testimonials h2 { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; color: var(--color-primary); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial-card { background: var(--color-light); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-sm); text-align: center; }
.testimonial-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--color-primary); }
.testimonial-card p { font-style: italic; margin-bottom: 1rem; color: #475569; }
.testimonial-card strong { color: var(--color-primary); display: block; margin-top: 0.5rem; }
.testimonial-card span { color: #6b7280; font-size: 0.9rem; }

/* Contacto */
.contact { padding: 4rem 0; text-align: center; }
.contact form { display: grid; gap: 1rem; max-width: 600px; margin: 2rem auto; }
.contact input, .contact select, .contact textarea { padding: 1rem; border: 2px solid #e5e7eb; border-radius: 0.75rem; width: 100%; font-size: 1rem; transition: border-color 0.3s; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,96,168,0.15); }
.contact-info { margin-top: 2rem; font-size: 1.1rem; }
.contact-info p { margin-bottom: 0.5rem; }

/* Footer con borde multicolor superior */
.site-footer { background: var(--color-text); color: white; text-align: center; padding: 2rem 0; margin-top: 4rem; border-top: 4px solid transparent; border-image: linear-gradient(90deg, #0060A8, #00A8D8, #007800, #C00000) 1; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
}
/* ===== Iteración 12 — copy de conversión (marketing) ===== */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-contact { display: flex; align-items: center; gap: 0.75rem; }
.header-phone { text-decoration: none; color: var(--color-text); font-weight: 600; white-space: nowrap; }

/* Botones WhatsApp */
.btn-wa { display: inline-flex; align-items: center; gap: 0.45rem; background: #25D366; color: white; padding: 0.55rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: all 0.3s ease; box-shadow: var(--shadow-sm); }
.btn-wa:hover { background: #1ebe5b; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-wa svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }

/* Hero content */
.hero-content { text-align: center; padding-top: 3rem; padding-bottom: 4rem; }
.hero-sub { font-size: 1.25rem; color: #475569; max-width: 720px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.btn-secondary { display: inline-block; background: white; color: var(--color-primary); border: 2px solid var(--color-primary); padding: 0.9rem 1.8rem; border-radius: 0.75rem; text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
.btn-secondary:hover { background: var(--color-primary); color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-micro { color: #6b7280; margin-bottom: 2rem; font-size: 0.95rem; }

/* Barra de confianza (checks verdes del logo) */
.trust-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; background: white; border-radius: 999px; padding: 0.9rem 1.75rem; box-shadow: var(--shadow-md); max-width: 820px; margin: 0 auto; }
.trust-bar span { font-weight: 600; color: var(--color-primary); font-size: 0.95rem; white-space: nowrap; }
.tcheck { color: var(--color-green); font-weight: 700; margin-right: 0.25rem; }

/* CTA por servicio */
.service-cta { margin-top: 1.25rem; font-size: 0.85rem; padding: 0.45rem 0.9rem; }

/* Por qué Sonríadents (borde izquierdo con acentos del logo) */
.why { padding: 4rem 0; background: var(--color-light); }
.why h2, .hours-loc h2, .faq h2 { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; color: var(--color-primary); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.why-item { background: white; padding: 1.75rem; border-radius: 1rem; box-shadow: var(--shadow-sm); transition: all 0.3s ease; border-left: 4px solid var(--color-primary); }
.why-item:nth-child(4n+2) { border-left-color: var(--color-accent); }
.why-item:nth-child(4n+3) { border-left-color: var(--color-green); }
.why-item:nth-child(4n) { border-left-color: var(--color-red); }
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-item h3 { color: var(--color-primary); margin-bottom: 0.5rem; font-size: 1.15rem; }
.why-item p { color: #475569; font-size: 0.98rem; }

/* Horarios y ubicación */
.hours-loc { padding: 4rem 0; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 900px; margin: 0 auto; }
.hours-card { background: var(--color-light); border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow-sm); }
.hours-card h3 { color: var(--color-primary); margin-bottom: 1rem; }
.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.hours-table td { padding: 0.6rem 0; border-bottom: 1px solid #e5e7eb; color: var(--color-text); }
.hours-table tr:last-child td { border-bottom: none; }
.hours-closed { color: #dc2626; font-weight: 600; }
.row-sab td { background: rgba(0,120,0,0.07); font-weight: 600; color: #005c00; }

/* Avatares de iniciales (testimonios reales, sin fotos inventadas) — paleta del logo */
.avatar-initials { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 2rem; font-weight: 700; color: white; }
.av-1 { background: linear-gradient(135deg, #0060A8, #00A8D8); }
.av-2 { background: linear-gradient(135deg, #00A8D8, #007800); }
.av-3 { background: linear-gradient(135deg, #007800, #0060A8); }
.av-4 { background: linear-gradient(135deg, #C00000, #F07800); }
.google-note { text-align: center; color: #6b7280; margin-top: 2rem; font-size: 0.95rem; }

/* FAQ */
.faq { padding: 4rem 0; background: var(--color-light); }
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 1rem; }
.faq-item { background: white; border-radius: 0.75rem; box-shadow: var(--shadow-sm); padding: 1.25rem 1.5rem; }
.faq-item summary { font-weight: 600; color: var(--color-primary); cursor: pointer; font-size: 1.05rem; list-style-position: inside; }
.faq-item summary::marker { color: var(--color-accent); }
.faq-item p { margin-top: 0.75rem; color: #475569; }

/* Botón flotante WhatsApp */
.wa-float { position: fixed; bottom: 1.25rem; right: 1.25rem; width: 58px; height: 58px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 200; transition: transform 0.3s ease; }
.wa-float:hover { transform: scale(1.08); background: #1ebe5b; }
.wa-float svg { width: 30px; height: 30px; fill: white; }

/* ===== Iteración 15 — menú hamburguesa móvil ===== */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: white; box-shadow: var(--shadow-lg); display: none; z-index: 10; }
    .main-nav.open { display: block; animation: navDrop 0.25s ease; }
    .main-nav ul { flex-direction: column; gap: 0; align-items: stretch; padding: 0.5rem 0; }
    .main-nav li { border-bottom: 1px solid #f1f5f9; }
    .main-nav li:last-child { border-bottom: none; }
    .main-nav a { display: block; padding: 0.95rem 1.5rem; font-size: 1.05rem; }
    .main-nav a:not(.nav-cta)::after { display: none; }
    .main-nav a:hover { background: var(--color-light); transform: none; }
    .nav-cta { margin: 0.75rem 1.5rem; text-align: center; padding: 0.85rem 1.5rem; }
    .logo img { max-width: 160px; height: auto; }
}
@keyframes navDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .header-phone { display: none; }
    .btn-wa { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
    .trust-bar { border-radius: 1rem; }
}

/* ===== Iteración 12b — pulido visual (verificación screenshots) ===== */
.testimonials-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.testimonial-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.testimonial-card strong { margin-top: auto; padding-top: 0.75rem; }

/* Fuente del formulario: heredar (el default de <textarea> es monospace) */
#cita-form input, #cita-form select, #cita-form textarea { font-family: inherit; }
