﻿/* ============================================== */
/* VARIABLES Y GLOBALES */
/* ============================================== */
:root {
    --color-primary: #2f7df6;      /* azul suave */
    --color-secondary: #0ea5e9;    /* turquesa suave */
    --color-accent: #22c4e8;
    --color-dark: #1e293b;
    --color-light-gray: #f3f7fb;
    --color-surface: #ffffff;

    --font-family-primary: 'Nunito', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--color-dark);
    background: linear-gradient(180deg, #f3f7fb 0%, #ffffff 40%, #f3f7fb 100%);
}

/* CONTENEDOR */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TIPOGRAFÍA BÁSICA */
h1, h2, h3 {
    font-weight: 900;
    line-height: 1.2;
    color: var(--color-dark);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; margin-bottom: 20px; }
h3 { font-size: 1.5rem; margin-bottom: 10px; }

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

.section-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

/* PÁRRAFOS DE SECCIÓN */
.section-description {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
    color: #536079;
    text-align: center;
}

/* BOTONES */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 5px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-surface);
    box-shadow: 0 12px 30px rgba(47, 125, 246, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 16px 40px rgba(47, 125, 246, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn-secondary:hover {
    background: #e5f1ff;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
}

/* SECCIONES */
.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.section-light {
    background-color: #f7f9ff;
}

.section-surface {
    padding: 80px 0;
}

/* HEADER */
header {
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.logo {
    font-size: 1.1rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo pensado para imagotipo horizontal */
.logo-mark {
    width: 160px;
    height: auto;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}

/* Si el imagotipo ya lleva texto, ocultamos el texto secundario */
.logo-text {
    display: none;
}

.main-nav a {
    color: #475569;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 700;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-secondary);
}

.nav-btn {
    margin-left: 30px;
}

.main-nav .nav-btn:hover {
    color: #ffffff;
}

/* MENÚ MÓVIL */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-surface);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    padding: 10px 0;
    text-align: center;
    z-index: 999;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

/* HERO */
.hero {
    position: relative;
    padding: 120px 0 90px;
    color: #f9fbff;
    overflow: hidden;
    background-image:
        linear-gradient(120deg, rgba(15, 23, 42, 0.75), rgba(14, 165, 233, 0.85)),
        url("https://images.pexels.com/photos/3845761/pexels-photo-3845761.jpeg?auto=compress&cs=tinysrgb&w=1200");
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.35), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
}

.hero-content {
    position: relative;
    display: flex;
    gap: 40px;
    align-items: center;
    z-index: 1;
}

.hero-text {
    flex: 1.4;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    font-weight: 800;
    color: #bae6fd;
    display: inline-block;
    margin-bottom: 12px;
}

.hero-text h1 {
    font-size: 3.2rem;
    margin-bottom: 16px;
    color: #f9fbff;
}

.hero-text .subtitle {
    font-size: 1.05rem;
    margin-bottom: 28px;
    color: #dbeafe;
    max-width: 480px;
}

.hero-actions {
    margin-bottom: 28px;
}

/* Barra de stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(18px);
}

.hero-stat {
    min-width: 120px;
}

.hero-stat-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: #cbd5f5;
}

/* Lado derecho del hero: personaje + badge */
.hero-image-wrapper {
    position: relative;
    flex: 1;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-illustration {
    max-width: 260px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 40px rgba(15, 23, 42, 0.35));
}

.hero-image-badge {
    position: absolute;
    right: 0;
    bottom: 12%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(248, 250, 252, 0.98);
    border-radius: 999px;
    padding: 8px 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
    border: 1px solid #e2e8f0;
}

/* círculo de color para el isotipo en el badge */
.hero-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #e0f2fe, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* isotipo dentro del badge */
.hero-mini-logo {
    width: 24px;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hero-badge-text {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
}

.hero-badge-main {
    font-weight: 900;
    color: #1d4ed8;
    font-size: 1rem;
}

.hero-badge-sub {
    color: #64748b;
}

/* QUIÉNES SOMOS */
.quienes-somos-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    background: var(--color-surface);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.quienes-somos-info {
    flex: 2;
}

.brand-signature {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* logo dentro de la firma de marca */
.brand-signature-logo {
    max-width: 180px;
    height: auto;
}

.brand-signature img {
    width: 160px;
    max-width: 40%;
    height: auto;
}

.brand-signature p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.dentist-photo-placeholder {
    flex: 1;
    min-height: 260px;
    border-radius: 32px;
    background-image:
        linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(37, 99, 235, 0.5)),
        url("https://images.pexels.com/photos/3845606/pexels-photo-3845606.jpeg?auto=compress&cs=tinysrgb&w=1200");
    background-size: cover;
    background-position: center;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    color: #e0f2fe;
    font-size: 1rem;
    padding: 18px;
}

/* Lista de atributos */
.attributes-list {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.attributes-list li {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
}

.attributes-list i {
    color: var(--color-secondary);
    margin-right: 10px;
}

.certifications-logos {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--color-secondary);
}

.certifications-logos i {
    font-size: 1.7rem;
}

.cert-text {
    font-style: italic;
    color: #6b7280;
}

/* DÓNDE ESTAMOS */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 32px;
    align-items: stretch;
}

.map-container iframe {
    width: 100%;
    height: 420px;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    border: 0;
}

.contact-info-block {
    padding: 24px;
    background-color: var(--color-surface);
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.contact-info-block h3 {
    color: var(--color-primary);
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 5px;
    margin-top: 15px;
    font-size: 1.1rem;
}

.contact-info-block h3:first-child {
    margin-top: 0;
}

.contact-info-block p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #475569;
}

.contact-info-block i {
    color: var(--color-secondary);
    margin-right: 8px;
}

.contact-info-block a {
    color: var(--color-dark);
    text-decoration: none;
}

.contact-info-block a:hover {
    color: var(--color-primary);
}

/* SERVICIOS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.service-card {
    background-color: var(--color-surface);
    padding: 26px 24px;
    border-radius: 24px;
    border: 1px solid #dbe4ff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-align: left;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    border-color: var(--color-primary);
}

.card-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 12px;
    padding: 10px;
    background-color: #eff6ff;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.service-card h3 {
    color: var(--color-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.service-card p {
    font-size: 0.95rem;
    color: #6b7280;
}

.btn-service {
    margin-top: 15px;
    background-color: transparent;
    color: var(--color-primary);
    border-radius: 999px;
    padding: 8px 18px;
    border: 1px solid #bfdbfe;
    font-size: 0.85rem;
}

.btn-service:hover {
    background-color: #e0edff;
}

.service-cta {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #e0f2fe;
    border-color: transparent;
}

.service-cta h3,
.service-cta p {
    color: #f9fafb;
}

/* COMENTARIOS */
.comments-section {
    background-color: #f3f7ff;
    position: relative;
    background-image: radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.25) 1px, transparent 0);
    background-size: 32px 32px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background-color: var(--color-surface);
    padding: 22px;
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
}

.rating {
    color: #fbbf24;
    margin-bottom: 10px;
}

.rating i {
    font-size: 1.05rem;
}

.comment-text {
    font-style: italic;
    margin-bottom: 15px;
    color: #4b5563;
    font-size: 0.95rem;
}

.patient-name {
    font-weight: 700;
    color: var(--color-primary);
    text-align: right;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

/* AGENDA / CTA */
.cta-section {
    padding: 80px 0 90px;
    background: radial-gradient(circle at top, #e0f2fe 0, #ffffff 55%);
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.8fr);
    gap: 32px;
    align-items: stretch;
    margin-top: 36px;
}

.appointment-form-card {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(221, 231, 255, 0.9);
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .appointment-form-card {
        padding: 24px;
    }
}

.appointment-card-header p {
    color: #475569;
    margin-bottom: 16px;
}

.appointment-steps {
    list-style: none;
    padding: 0;
    margin: 0 -8px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.appointment-steps li {
    background: #f8fafc;
    border-radius: 999px;
    padding: 8px 16px 8px 12px;
    font-size: 0.9rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.appointment-steps span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.appointment-form .form-row {
    margin-bottom: 16px;
}

.calendar-picker {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-small {
    padding: 10px 16px;
    font-size: 0.85rem;
}

.calendar-hint {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.availability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.availability-status {
    font-size: 0.85rem;
    color: #64748b;
}

.availability-status[data-state="loading"] {
    color: #0284c7;
}

.availability-status[data-state="error"] {
    color: #b91c1c;
}

.availability-status[data-state="selected"] {
    color: #15803d;
}

.availability-wrapper {
    border: 1px solid #dbe2f2;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
}

.availability-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.slot-button {
    border: 1px solid #cbd5f5;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slot-button:hover,
.slot-button:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.25);
}

.slot-button.is-selected {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 10px 20px rgba(0, 188, 212, 0.25);
}

.appointment-form label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    display: block;
    margin-bottom: 8px;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
    width: 100%;
    border: 1px solid #dbe2f2;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.appointment-form input:focus,
.appointment-form select:focus,
.appointment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.form-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.appointment-info-card {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 35px 65px rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.appointment-info-logo {
    width: 120px;
}

.appointment-info-card h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.appointment-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appointment-highlights article {
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px;
}

.appointment-highlights h4 {
    margin-bottom: 6px;
    color: #38bdf8;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.appointment-highlights ul {
    padding-left: 18px;
    margin: 0;
    color: #cbd5f5;
}

.appointment-contact {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.appointment-contact small {
    color: #94a3b8;
}

.form-footer {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-footer small {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-spinner.visible {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.appointment-status {
    margin-top: 16px;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    display: none;
}

.appointment-status.is-visible {
    display: block;
}

.appointment-status.is-info {
    background: #e0f2fe;
    color: #0369a1;
}

.appointment-status.is-success {
    background: #dcfce7;
    color: #15803d;
}

.appointment-status.is-error {
    background: #fee2e2;
    color: #b91c1c;
}

.note-info {
    font-style: italic;
    color: #6b7280;
    margin-top: 20px;
    font-size: 0.95rem;
}

/* FOOTER */
footer {
    background-color: #020617;
    color: #e2e8f0;
    padding: 36px 0;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    font-weight: 700;
}

.footer-logo {
    width: 160px;
    margin-bottom: 12px;
    filter: drop-shadow(0 8px 16px rgba(2, 6, 23, 0.45));
}

.footer-contact h4,
.footer-links h4 {
    color: var(--color-secondary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.footer-contact a,
.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.footer-contact a:hover,
.footer-links a:hover {
    color: var(--color-accent);
}

.footer-contact i {
    color: var(--color-accent);
    margin-right: 5px;
}

.footer-pattern-overlay {
    position: absolute;
    bottom: -40px;
    right: -60px;
    width: 260px;
    height: 260px;
    z-index: 0;
    opacity: 0.16;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--color-primary) 0, transparent 55%);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .hero-text h1 {
        font-size: 2.6rem;
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .hero-stats {
        border-radius: 18px;
    }

    .hero-image-wrapper {
        width: 100%;
        justify-content: flex-start;
        margin-top: 24px;
    }

    .hero-illustration {
        margin: 0 auto;
    }

    .quienes-somos-grid {
        flex-direction: column;
        text-align: left;
    }

    .brand-signature {
        flex-direction: column;
        text-align: center;
    }

    .booking-layout {
        grid-template-columns: 1fr;
    }

    .appointment-info-card {
        order: -1;
    }

    .dentist-photo-placeholder {
        width: 100%;
        min-height: 220px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 320px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding-top: 110px;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .btn-large {
        padding: 12px 22px;
        font-size: 0.95rem;
    }

    .section {
        padding: 60px 0;
    }

    h2 {
        font-size: 1.8rem;
    }

    .quienes-somos-grid {
        padding: 26px 20px;
        border-radius: 24px;
    }
}
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 12px;
    }

    .hero-image-badge {
        bottom: 8%;
        right: 50%;
        transform: translateX(50%);
    }

    .appointment-form-card {
        padding: 24px 16px;
    }
}
