/* ==========================================================================
   Restaurante El Cordero — redesign stylesheet
   Palette derived from the brand: deep Canarian green, warm ember orange,
   cream parchment. Typography uses system fonts for reliability.
   ========================================================================== */

:root {
  --green-950: #12241b;
  --green-900: #1a3326;
  --green-800: #23422f;
  --green-700: #2e563c;
  --orange-600: #d96c1f;
  --orange-500: #e07b2e;
  --orange-400: #ff9c3f;
  --orange-soft: #fde9d6;
  --cream-50: #fbf6ec;
  --cream-100: #f6eddc;
  --cream-200: #efe0c8;
  --ink: #2b231a;
  --ink-soft: #5c5144;
  --white: #ffffff;
  --line: rgba(43, 35, 26, 0.14);
  --shadow-sm: 0 1px 2px rgba(18, 36, 27, 0.08), 0 4px 14px rgba(18, 36, 27, 0.06);
  --shadow-md: 0 2px 6px rgba(18, 36, 27, 0.10), 0 14px 34px rgba(18, 36, 27, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1160px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-50);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--green-900);
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-900);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange-500); color: var(--white); }
.btn-primary:hover { background: var(--orange-600); color: var(--white); }
.btn-whatsapp { background: #1faa53; color: var(--white); }
.btn-whatsapp:hover { background: #178f45; color: var(--white); }
.btn-outline { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-800); color: var(--white); }
.btn-light { background: var(--white); color: var(--green-900); }
.btn-light:hover { background: var(--cream-100); color: var(--green-900); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 236, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green-900);
  min-width: 0;
}
.brand-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; line-height: 1.05; }
.brand-name small { display: block; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-600); font-family: var(--font-body); font-weight: 700; margin-top: 2px; }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.primary-nav a {
  display: block;
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: var(--cream-200); color: var(--green-900); }

.nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-item > a {
  padding: 9px 8px 9px 13px;
}
.nav-caret {
  background: none;
  border: 0;
  width: 24px;
  height: 36px;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
  color: var(--ink);
  margin-right: 2px;
}
.nav-caret::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  padding: 2.5px;
  transform: translate(-60%, -70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.nav-caret:hover { background: var(--cream-200); color: var(--green-900); }
.nav-item[data-open="true"] .nav-caret::after { transform: translate(-60%, -30%) rotate(-135deg); }
.nav-item[data-open="true"] .nav-caret { color: var(--green-900); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 90;
}
.nav-item[data-open="true"] .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { border-radius: 6px; padding: 9px 12px; display: block; }
.dropdown a:hover { background: var(--cream-100); }

.header-cta { flex: none; }
.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 120;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-900);
  margin: 5px auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62vh;
  padding: 80px 0;
  color: var(--white);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,36,27,0.55) 0%, rgba(18,36,27,0.35) 45%, rgba(18,36,27,0.72) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-400);
  font-weight: 700;
  margin-bottom: 14px;
  background: rgba(18,36,27,0.5);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
}
.hero h1 { color: var(--white); font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 16px; }
.hero h1 .accent { color: var(--orange-400); }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255,255,255,0.92); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--white); }
.section-green { background: var(--green-900); color: rgba(255,255,255,0.92); }
.section-green h2, .section-green h3 { color: var(--white); }

.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow-text {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-600);
  font-weight: 700;
  margin-bottom: 10px;
}

.lead-copy { font-size: 1.08rem; color: var(--ink-soft); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-200); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin-bottom: 0; }
.card-body p { margin-bottom: 0; color: var(--ink-soft); }
.card-link { margin-top: auto; padding-top: 10px; font-weight: 700; text-decoration: none; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-media img, .split-media video { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.split-media .media-frame { border-radius: var(--radius); overflow: hidden; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(18,36,27,0.78));
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Hours ---------- */
.hours-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hours-table th, .hours-table td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.hours-table th { background: var(--green-800); color: var(--white); font-weight: 700; }
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table td:last-child { text-align: right; font-weight: 700; color: var(--green-800); }

/* ---------- Contact cards ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.contact-card .icon { font-size: 1.6rem; margin-bottom: 6px; }
.contact-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.contact-card a { font-weight: 600; }
.contact-card .muted { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Map ---------- */
.map-frame {
  border: 0;
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: block;
  background: var(--cream-200);
}

/* ---------- Menu pages ---------- */
.menu-lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lang-card { text-align: center; }
.menu-image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--white);
  border: 1px solid var(--line);
}
.menu-image-wrap img { width: 100%; height: auto; cursor: zoom-in; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 22px 0 8px; }

/* ---------- Notice (guided visits) ---------- */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--orange-soft);
  border: 1px solid rgba(217, 108, 31, 0.35);
  color: #7a3c10;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 30px;
}
.notice strong { display: block; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--green-900);
  color: var(--white);
  border-radius: var(--radius);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.88); max-width: 620px; margin: 0 auto 24px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: rgba(255,255,255,0.85); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding: 52px 0 36px; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--orange-400); }
.footer-contact li, .footer-hours li { list-style: none; margin: 0 0 8px; padding: 0; }
.footer-contact ul, .footer-hours ul { margin: 0; padding: 0; }
.social-links { display: flex; gap: 10px; margin-top: 14px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  text-decoration: none;
  transition: background-color 0.18s ease;
}
.social-links a:hover { background: var(--orange-500); color: var(--white); }
.social-links svg { width: 20px; height: 20px; fill: currentColor; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 18px 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1faa53;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(31, 170, 83, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.wa-float:hover { background: #178f45; color: var(--white); transform: translateY(-2px); }
.wa-float svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 8px; }
.breadcrumb a { color: var(--green-700); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: var(--green-900); color: var(--white); padding: 56px 0 40px; }
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 720px; margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 18, 0.92);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,0.15);
  border: 0;
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { background: var(--orange-500); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-lang-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .menu-toggle { display: block; }
  .primary-nav {
    position: fixed;
    inset: 0;
    background: var(--cream-50);
    z-index: 110;
    padding: 90px 24px 30px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .primary-nav a, .nav-caret { font-size: 1.12rem; padding: 13px 16px; }
  .primary-nav .nav-item > a { padding: 13px 16px; }
  .nav-item { width: 100%; display: flex; align-items: center; }
  .nav-item > a { flex: 1; }
  .nav-caret { width: 44px; height: 44px; flex: none; margin: 0; }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 6px 12px;
    display: none;
  }
  .nav-item[data-open="true"] .dropdown { display: block; }
  .header-cta { display: none; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; padding: 60px 0; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .menu-lang-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 22px; }
  .wa-float .wa-label { display: none; }
  .wa-float { padding: 15px; }
}
