/* ==========================================================================
   Queen's Café — MOBILE FIRST
   Los estilos base son para móvil. Se amplía solo con @media (min-width).
   Breakpoints: 600px (móvil grande) · 860px (tablet / escritorio) · 1100px (pantalla amplia)
   ========================================================================== */

:root {
    --olive-dark: #4A583E;
    --terracotta: #8C4A32;
    --coffee-dark: #2C241E;
    --cream-bg: #FAF7F2;
    --white: #FFFFFF;
    --text-main: #332B25;
    --text-muted: #665C54;
    --border-light: #E2DBD0;
    --whatsapp: #25D366;
    --whatsapp-dark: #1EBE5D;
    --nav-height: 76px;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); -webkit-text-size-adjust: 100%; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--cream-bg); color: var(--text-main); line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; }
h1, h2, h3 { font-family: 'Lora', Georgia, serif; color: var(--coffee-dark); font-weight: 700; line-height: 1.25; }
.container { width: 90%; max-width: 1140px; margin: 0 auto; }

/* ---------- Navbar (móvil: menú hamburguesa) ---------- */
.navbar { background-color: var(--white); border-bottom: 1px solid var(--border-light); position: sticky; top: 0; z-index: 100; padding: 10px 0; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.brand img { height: 52px; width: auto; display: block; border-radius: 50%; }

.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; background: none; border: 1px solid var(--border-light); border-radius: 4px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--coffee-dark); border-radius: 2px; transition: transform 0.3s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; background-color: var(--white); padding: 8px 5% 20px; border-bottom: 1px solid var(--border-light); box-shadow: 0 12px 24px rgba(44, 36, 30, 0.12); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s; }
.nav-links.open { opacity: 1; visibility: visible; transform: none; }
.nav-links a:not(.btn-nav) { text-decoration: none; color: var(--coffee-dark); font-weight: 500; font-size: 1rem; padding: 14px 0; border-bottom: 1px solid var(--border-light); transition: color 0.2s; }
.nav-links a:not(.btn-nav):hover { color: var(--terracotta); }
.btn-nav { margin-top: 16px; text-align: center; background-color: var(--olive-dark); color: var(--white); text-decoration: none; padding: 14px 20px; border-radius: 4px; font-size: 0.95rem; font-weight: 600; transition: background 0.2s; }
.btn-nav:hover { background-color: var(--coffee-dark); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 560px; min-height: 86svh; display: flex; align-items: center; overflow: hidden; background-color: var(--coffee-dark); }
.hero-slider { position: absolute; inset: -12% 0; will-change: transform; transform: translate3d(0, var(--parallax, 0px), 0); }
.hero-slider .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s ease-in-out; will-change: opacity, transform; }
.hero-slider .slide.active { opacity: 1; z-index: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35, 27, 21, 0.6) 0%, rgba(35, 27, 21, 0.85) 100%); }

.hero-content { position: relative; z-index: 2; width: 90%; padding: 48px 0 96px; color: var(--white); will-change: transform, opacity; transform: translate3d(0, var(--content-shift, 0px), 0); opacity: var(--content-opacity, 1); }
.hero-content > * { opacity: 0; transform: translateY(24px); animation: heroIn 0.9s cubic-bezier(.22,.61,.36,1) forwards; }
.hero-content > :nth-child(1) { animation-delay: 0.15s; }
.hero-content > :nth-child(2) { animation-delay: 0.3s; }
.hero-content > :nth-child(3) { animation-delay: 0.45s; }
.hero-content > :nth-child(4) { animation-delay: 0.6s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero-tag { display: inline-block; text-transform: uppercase; letter-spacing: 1.2px; font-size: 0.75rem; font-weight: 600; color: #E6C79C; margin-bottom: 12px; }
.hero-content h1 { color: var(--white); font-size: 2rem; margin-bottom: 16px; }
.hero-content p { font-size: 1rem; color: #F0EAE1; margin-bottom: 28px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-primary, .btn-secondary { display: block; text-align: center; padding: 15px 24px; text-decoration: none; border-radius: 4px; font-weight: 600; }
.btn-primary { background-color: var(--terracotta); color: var(--white); transition: background 0.2s; }
.btn-primary:hover { background-color: #703925; }
.btn-secondary { border: 1px solid var(--white); color: var(--white); transition: background 0.2s, color 0.2s; }
.btn-secondary:hover { background-color: var(--white); color: var(--coffee-dark); }

/* Controles del slider (móvil: centrados abajo) */
.slider-controls { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 12px; }
.slider-controls button { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4); color: var(--white); width: 44px; height: 44px; border-radius: 4px; cursor: pointer; font-size: 1rem; transition: background 0.25s, color 0.25s, transform 0.25s; }
.slider-controls button:hover { background: var(--white); color: var(--coffee-dark); }
.slider-controls button:active { transform: scale(0.92); }
.slider-dots { display: flex; gap: 8px; }
.slider-dots span { position: relative; width: 10px; height: 10px; border-radius: 10px; background: rgba(255,255,255,0.4); cursor: pointer; overflow: hidden; transition: width 0.4s ease, background 0.3s; }
.slider-dots span.active { width: 30px; }
.slider-dots span::after { content: ''; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: left; }
.slider-dots span.active::after { animation: dotProgress var(--slide-time, 6s) linear forwards; }
.hero.paused .slider-dots span.active::after { animation-play-state: paused; }
@keyframes dotProgress { to { transform: scaleX(1); } }

/* Indicador de scroll: solo en pantallas grandes */
.scroll-hint { display: none; }

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section-subtitle { display: block; color: var(--terracotta); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px; }
.section-header { text-align: center; max-width: 650px; margin: 0 auto 32px; }
.section-header h2 { font-size: 1.6rem; }

/* Nosotros */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.about-text h2 { font-size: 1.6rem; margin-bottom: 16px; }
.about-text p { margin-bottom: 16px; color: var(--text-muted); }
.hours-box { margin-top: 24px; padding: 18px 20px; background-color: var(--white); border-left: 4px solid var(--olive-dark); border-top: 1px solid var(--border-light); border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.hours-box h3 { font-size: 1.1rem; margin-bottom: 10px; }
.hours-box ul { list-style: none; }
.hours-box li { font-size: 0.95rem; margin-bottom: 4px; }
.about-image img { width: 100%; height: 280px; object-fit: cover; display: block; border-radius: 4px; border: 1px solid var(--border-light); }
.image-caption { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* Galería */
.gallery-section { background-color: var(--white); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.gallery-item { background: var(--cream-bg); border: 1px solid var(--border-light); border-radius: 4px; overflow: hidden; }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption { padding: 14px 16px; font-size: 0.9rem; color: var(--text-main); font-weight: 500; }

/* Reseñas */
.rating-summary { margin-top: 10px; color: var(--text-muted); }
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.review-card { background: var(--white); padding: 22px; border: 1px solid var(--border-light); border-radius: 4px; }
.review-card .stars { color: #D49A2A; font-size: 1.1rem; margin-bottom: 12px; }
.review-card p { font-style: italic; color: var(--text-main); margin-bottom: 16px; font-size: 0.95rem; }
.review-card .author { font-size: 0.85rem; font-weight: 600; color: var(--olive-dark); }

/* Contacto */
.contact-section { background-color: var(--white); border-top: 1px solid var(--border-light); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.map-wrapper h2, .form-wrapper h2 { font-size: 1.5rem; margin-bottom: 12px; }
.address-text, .form-wrapper > p { color: var(--text-muted); margin-bottom: 20px; }
.map-frame { border: 1px solid var(--border-light); border-radius: 4px; overflow: hidden; }
.map-frame iframe { display: block; height: 300px; }
.map-link { display: inline-block; margin-top: 12px; padding: 8px 0; color: var(--terracotta); font-weight: 600; text-decoration: none; }
.map-link:hover { text-decoration: underline; }

.contact-form { background: var(--cream-bg); padding: 20px; border: 1px solid var(--border-light); border-radius: 4px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 13px 12px; border: 1px solid #CFC6B8; border-radius: 4px; font-family: inherit; font-size: 1rem; /* 16px evita el zoom automático en iOS */ background-color: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--olive-dark); }
.btn-whatsapp { width: 100%; background-color: var(--olive-dark); color: var(--white); border: none; padding: 15px; font-size: 1rem; font-weight: 600; border-radius: 4px; cursor: pointer; transition: background 0.2s; }
.btn-whatsapp:hover { background-color: var(--coffee-dark); }

/* Footer */
.footer { background-color: var(--coffee-dark); color: #D6CEC2; padding: 36px 0 24px; text-align: center; }
.footer-brand img { height: 64px; margin-bottom: 12px; border-radius: 50%; }
.footer-bottom { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }

/* WhatsApp flotante */
.whatsapp-float { position: fixed; bottom: 16px; right: 16px; background-color: var(--whatsapp); width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 999; transition: transform 0.2s, background 0.2s; }
.whatsapp-float:hover { transform: scale(1.06); background-color: var(--whatsapp-dark); }

/* ==========================================================================
   ≥ 600px — móvil grande / tablet pequeña
   ========================================================================== */
@media (min-width: 600px) {
    .hero-content { width: 90%; max-width: 640px; margin-left: auto; margin-right: auto; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-actions { flex-direction: row; flex-wrap: wrap; }
    .btn-primary, .btn-secondary { display: inline-block; padding: 14px 28px; }

    .section-header h2, .about-text h2 { font-size: 1.9rem; }
    .about-image img { height: 340px; }
    .gallery-item img { height: 260px; }
    .contact-form { padding: 28px; }
    .map-wrapper h2, .form-wrapper h2 { font-size: 1.7rem; }
    .map-frame iframe { height: 340px; }
}

/* ==========================================================================
   ≥ 860px — escritorio: menú horizontal, grillas en columnas
   ========================================================================== */
@media (min-width: 860px) {
    :root { --nav-height: 88px; }

    /* Navbar */
    .navbar { padding: 12px 0; }
    .brand img { height: 62px; }
    .nav-toggle { display: none; }
    .nav-links { position: static; flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
    .nav-links a:not(.btn-nav) { font-size: 0.95rem; padding: 0; border-bottom: 0; }
    .btn-nav { margin-top: 0; padding: 10px 20px; font-size: 0.9rem; }

    /* Hero */
    .hero { min-height: 540px; min-height: 82vh; }
    .hero-overlay { background: linear-gradient(90deg, rgba(35, 27, 21, 0.82) 0%, rgba(35, 27, 21, 0.45) 100%); }
    .hero-content { width: 90%; max-width: 1140px; padding: 0; }
    .hero-content > * { max-width: 640px; }
    .hero-content h1 { font-size: clamp(2.4rem, 4vw, 3.2rem); }
    .hero-tag { font-size: 0.8rem; letter-spacing: 1.5px; }

    .slider-controls { left: auto; right: 5%; transform: none; bottom: 24px; }
    .slider-controls button { width: 36px; height: 36px; }

    .scroll-hint { display: block; position: absolute; bottom: 24px; left: 50%; z-index: 3; width: 24px; height: 40px; margin-left: -12px; border: 2px solid rgba(255,255,255,0.65); border-radius: 14px; transition: opacity 0.3s; }
    .scroll-hint::before { content: ''; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--white); border-radius: 2px; animation: scrollDot 1.8s ease-in-out infinite; }

    /* Secciones */
    .section { padding: 80px 0; }
    .section-header { margin-bottom: 48px; }
    .section-header h2, .about-text h2 { font-size: 2.2rem; }
    .about-text h2 { margin-bottom: 20px; }

    .about-grid { grid-template-columns: 1.1fr 0.9fr; gap: 50px; }
    .about-image img { height: 440px; }
    .hours-box { margin-top: 28px; padding: 20px 24px; }

    .gallery-grid, .reviews-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .gallery-item img { height: 300px; }
    .review-card { padding: 28px; }

    .contact-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
    .map-wrapper h2, .form-wrapper h2 { font-size: 1.9rem; }
    .map-frame iframe { height: 380px; }

    .whatsapp-float { bottom: 24px; right: 24px; width: 58px; height: 58px; }
}

@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ==========================================================================
   ≥ 1100px — pantallas amplias
   ========================================================================== */
@media (min-width: 1100px) {
    .about-grid { gap: 70px; }
    .gallery-grid, .reviews-grid { gap: 32px; }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-slider .slide.active, .hero-content > *, .scroll-hint::before, .slider-dots span.active::after { animation: none; }
    .hero-content > * { opacity: 1; transform: none; }
    .slider-dots span.active::after { transform: scaleX(1); }
}
