/* =========================================
   MANCOMUNIDAD CAMPOS GÓTICOS - NUEVO DISEÑO
   Paleta: azul institucional + dorado trigo + crema caliza
   ========================================= */

:root {
  --azul:       #1a3a5c;
  --azul-med:   #2d5f8a;
  --azul-light: #4a8dbf;
  --dorado:     #c8a84b;
  --dorado-light: #e0c980;
  --crema:      #f5f0e8;
  --gris:       #4a5568;
  --gris-light: #8a95a3;
  --gris-bg:    #f0f2f5;
  --blanco:     #ffffff;
  --texto:      #2d3748;
  --sombra:     0 2px 16px rgba(26,58,92,0.10);
  --sombra-lg:  0 8px 40px rgba(26,58,92,0.15);
  --radio:      8px;
  --radio-lg:   16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--texto);
  background: var(--blanco);
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

a { color: var(--azul-med); text-decoration: none; transition: all .2s; }
a:hover { color: var(--dorado); }

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

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

/* ── TOPBAR ── */
.topbar {
  background: var(--azul);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar-left, .topbar-right { display: flex; gap: 20px; }
.topbar span, .topbar a { color: rgba(255,255,255,0.85); font-size: 13px; }
.topbar a:hover { color: var(--dorado-light); }
.topbar i { margin-right: 5px; color: var(--dorado); }

/* ── HEADER ── */
.header {
  background: var(--blanco);
  box-shadow: 0 2px 20px rgba(26,58,92,0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 32px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.logo-img {
  /* Exact original pixel size — never upscale */
  width: 138px;
  height: 34px;
  display: block;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
}
/* .logo-mark kept for fallback only */
.logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--azul), var(--azul-med));
  color: var(--dorado);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 11px; font-weight: 700;
  border-radius: var(--radio);
  flex-shrink: 0;
}
/* Text next to logo is hidden — logo already contains the name */
.logo-text { display: none; }

/* Nav */
.main-nav { flex: 1; }
/* ── NAV LIST ── */
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--texto);
  border-radius: var(--radio);
  white-space: nowrap;
  line-height: 1;
}
.nav-list > li > a:hover,
.nav-list > li > a.active,
.nav-list > li.open > a {
  color: var(--azul);
  background: var(--crema);
}
.nav-list > li > a .chev {
  font-size: 9px;
  transition: transform .2s;
  opacity: .6;
}
.nav-list > li.open > a .chev { transform: rotate(180deg); }

.btn-nav {
  background: var(--dorado) !important;
  color: var(--azul) !important;
  font-weight: 600 !important;
  padding: 9px 18px !important;
  border-radius: var(--radio) !important;
}
.btn-nav:hover { background: var(--azul) !important; color: var(--blanco) !important; }

/* ── DROPDOWN (desktop) ──
   Bridge: invisible pseudo-element fills the gap so moving
   the cursor down into the panel doesn't close the menu.    */
.has-dropdown .drop-panel {
  display: none;
  position: absolute;
  /* flush with bottom of nav item — no gap */
  top: 100%;
  left: 0;
  /* Invisible padding-top acts as the "bridge" */
  padding-top: 6px;
  z-index: 500;
}

/* The visible box sits inside the padding */
.has-dropdown .drop-inner {
  background: var(--blanco);
  box-shadow: var(--sombra-lg);
  border-radius: var(--radio-lg);
  border-top: 3px solid var(--dorado);
  min-width: 220px;
  padding: 10px 0;
  list-style: none;
}

/* Mega variant */
.has-dropdown .drop-inner.mega {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  min-width: 620px;
}

/* Show on hover — stays open while cursor is over bridge or panel */
.has-dropdown:hover > .drop-panel,
.has-dropdown.open > .drop-panel { display: block; }

/* Plain dropdown links */
.drop-inner > li > a {
  display: block;
  padding: 9px 20px;
  font-size: 13.5px;
  color: var(--texto);
  white-space: nowrap;
  transition: background .15s, padding-left .15s;
}
.drop-inner > li > a:hover {
  background: var(--crema);
  color: var(--azul);
  padding-left: 26px;
}

/* Mega columns */
.mega-col {
  padding: 20px 22px;
  border-right: 1px solid var(--crema);
}
.mega-col:last-child { border-right: none; }
.mega-col h5 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gris-light);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--crema);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.mega-col a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: var(--gris);
  line-height: 1.4;
  transition: color .15s, padding-left .15s;
}
.mega-col a:hover { color: var(--azul); padding-left: 6px; }

/* ── MOBILE TOGGLE BUTTON ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 2px solid rgba(26,58,92,0.15);
  border-radius: var(--radio);
  cursor: pointer;
  padding: 8px 10px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--azul);
  border-radius: 2px;
  transition: all .3s;
  transform-origin: center;
}
/* Animated X when open */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 520px;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-med) 50%, #1e4d7a 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/slidergrande/001.jpg') center/cover no-repeat;
  opacity: 0.18;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px 0 100px;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dorado-light);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--blanco);
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-title em {
  color: var(--dorado-light);
  font-style: normal;
}
.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-wheat {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.hero-wheat svg { width: 100%; height: 60px; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--dorado);
  color: var(--azul);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radio);
  transition: all .2s;
  border: 2px solid var(--dorado);
}
.btn-primary:hover {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
  transform: translateY(-2px);
  box-shadow: var(--sombra);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--blanco);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radio);
  border: 2px solid rgba(255,255,255,0.5);
  transition: all .2s;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--blanco);
  color: var(--blanco);
}
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--azul-med);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 0;
}
.btn-text:hover { color: var(--dorado); }

/* ── QUICK ACCESS ── */
.quick-access {
  background: var(--crema);
  padding: 60px 0;
}
.qa-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.qa-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 28px 16px;
  text-align: center;
  transition: all .25s;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: var(--sombra);
}
.qa-card:hover {
  border-color: var(--dorado);
  transform: translateY(-4px);
  box-shadow: var(--sombra-lg);
}
.qa-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--azul), var(--azul-med));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
  color: var(--dorado);
}
.qa-card h3 { font-size: 14px; color: var(--azul); margin-bottom: 4px; font-family: 'Inter', sans-serif; font-weight: 600; }
.qa-card p { font-size: 12px; color: var(--gris-light); }

/* ── SECTION TAGS / HEADERS ── */
.section-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dorado);
  background: rgba(200,168,75,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}
.section-header { margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--azul); margin-top: 8px; }
.section-header.light h2 { color: var(--blanco); }
.section-header.light .section-tag { color: var(--dorado-light); background: rgba(255,255,255,0.15); }
.section-header.light p { color: rgba(255,255,255,0.75); font-size: 17px; margin-top: 12px; }
.section-header.centered { text-align: center; }

/* ── WELCOME ── */
.welcome-section { padding: 100px 0; }
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: center;
}
.welcome-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--azul); margin: 12px 0 20px; }
.welcome-text p { color: var(--gris); margin-bottom: 16px; font-size: 16.5px; }
.welcome-actions { display: flex; gap: 20px; align-items: center; margin-top: 32px; }
.welcome-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--crema);
  border-radius: var(--radio-lg);
  padding: 28px 20px;
  text-align: center;
  border-left: 4px solid var(--dorado);
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--azul);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: var(--gris-light); font-weight: 500; }

/* ── SERVICES ── */
.services-section {
  background: var(--gris-bg);
  padding: 100px 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 40px 32px;
  box-shadow: var(--sombra);
  transition: all .25s;
  position: relative;
  border-top: 4px solid transparent;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--sombra-lg); border-top-color: var(--dorado); }
.service-card.featured { border-top-color: var(--azul); background: linear-gradient(160deg, var(--azul) 0%, var(--azul-med) 100%); color: var(--blanco); }
.service-card.featured h3, .service-card.featured p { color: var(--blanco); }
.service-card.featured .service-icon { background: rgba(255,255,255,0.15); color: var(--dorado-light); }
.service-card.featured .service-links a { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3); }
.service-card.featured .service-links a:hover { color: var(--dorado-light); background: rgba(255,255,255,0.1); }
.service-icon {
  width: 64px; height: 64px;
  background: var(--crema);
  border-radius: var(--radio-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: var(--azul-med);
  margin-bottom: 24px;
}
.service-card h3 { font-size: 1.3rem; color: var(--azul); margin-bottom: 12px; }
.service-card p { color: var(--gris); font-size: 15px; margin-bottom: 24px; }
.service-links { display: flex; gap: 8px; flex-wrap: wrap; }
.service-links a {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--gris-bg);
  border-radius: 20px;
  color: var(--gris);
  font-weight: 500;
}
.service-links a:hover { background: var(--crema); color: var(--azul); border-color: var(--dorado); }

/* ── PUEBLOS ── */
.pueblos-section {
  background: linear-gradient(160deg, var(--azul) 0%, #1e4d7a 100%);
  padding: 100px 0;
}
.pueblos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.pueblo-card {
  text-align: center;
  text-decoration: none;
  transition: all .25s;
}
.pueblo-card:hover { transform: translateY(-6px); }
.pueblo-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radio-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  border: 2px solid rgba(255,255,255,0.1);
  transition: all .25s;
}
.pueblo-card:hover .pueblo-thumb { border-color: var(--dorado); color: var(--dorado); }
.pueblo-card--more .pueblo-thumb {
  background: linear-gradient(135deg, rgba(200,168,75,0.3), rgba(200,168,75,0.1));
  border-color: var(--dorado);
  color: var(--dorado);
}
.pueblo-card span { font-size: 13px; color: rgba(255,255,255,0.85); font-weight: 500; }

/* ── ADMIN SECTION ── */
.admin-section {
  background: var(--crema);
  padding: 60px 0;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.admin-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--blanco);
  border-radius: var(--radio);
  text-decoration: none;
  border: 1px solid rgba(26,58,92,0.08);
  transition: all .2s;
  text-align: center;
}
.admin-link:hover { border-color: var(--dorado); background: var(--azul); }
.admin-link i { font-size: 20px; color: var(--azul-med); transition: all .2s; }
.admin-link:hover i { color: var(--dorado); }
.admin-link span { font-size: 12px; color: var(--gris); font-weight: 500; line-height: 1.3; transition: all .2s; }
.admin-link:hover span { color: rgba(255,255,255,0.9); }

/* ── BAND ── */
.band-section {
  background: linear-gradient(90deg, var(--dorado), var(--dorado-light));
  padding: 48px 0;
}
.band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.band-inner h3 { font-size: 1.5rem; color: var(--azul); }
.band-inner p { color: rgba(26,58,92,0.7); margin-top: 4px; }
.band-inner .btn-primary {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
  flex-shrink: 0;
}
.band-inner .btn-primary:hover { background: var(--blanco); color: var(--azul); border-color: var(--blanco); }

/* ── FOOTER ── */
.footer { background: var(--azul); }
.footer-main { padding: 80px 0 60px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1.2fr;
  gap: 48px;
}
.footer-brand .footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-brand .logo-mark { background: rgba(255,255,255,0.1); }
.footer-brand .logo-title { color: var(--blanco); }
.footer-brand .logo-sub { color: rgba(255,255,255,0.4); }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 14px; line-height: 1.7; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-col ul li a:hover { color: var(--dorado-light); }
.footer-contact p { color: rgba(255,255,255,0.6); font-size: 14px; margin-bottom: 12px; line-height: 1.5; }
.footer-contact i { color: var(--dorado); margin-right: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
}
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { color: rgba(255,255,255,0.4); font-size: 13px; }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--dorado-light); }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px; height: 44px;
  background: var(--azul);
  color: var(--dorado);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  box-shadow: var(--sombra);
  opacity: 0;
  transition: all .3s;
  z-index: 999;
  font-size: 16px;
}
.back-to-top.visible { opacity: 1; }
.back-to-top:hover { background: var(--dorado); color: var(--azul); transform: translateY(-3px); }

/* ── PAGE LAYOUT (para páginas interiores) ── */
.page-hero {
  background: linear-gradient(135deg, var(--azul), var(--azul-med));
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.03) 20px,
    rgba(255,255,255,0.03) 40px
  );
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.breadcrumb a { color: var(--dorado-light); }
.breadcrumb span { color: rgba(255,255,255,0.4); }
.page-hero h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--blanco); }

.page-content { padding: 80px 0; }
.page-content.has-sidebar { padding: 60px 0; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 60px; }
.sidebar h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--azul); margin: 24px 0 12px; }
.sidebar ul { list-style: none; }
.sidebar ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--gris);
  border-radius: var(--radio);
  border-left: 3px solid transparent;
}
.sidebar ul li a:hover, .sidebar ul li a.active {
  background: var(--crema);
  color: var(--azul);
  border-left-color: var(--dorado);
}
article .entry-title h2, article .entry-title h4 { font-size: 1.8rem; color: var(--azul); margin-bottom: 20px; }
article p { color: var(--gris); font-size: 16px; line-height: 1.8; margin-bottom: 16px; }
article h3 { font-size: 1.3rem; color: var(--azul); margin: 28px 0 12px; }
article table { width: 100%; border-collapse: collapse; margin: 20px 0; }
article th { background: var(--azul); color: var(--blanco); padding: 12px 16px; text-align: left; font-size: 14px; }
article td { padding: 10px 16px; border-bottom: 1px solid var(--crema); font-size: 14px; }
article tr:hover td { background: var(--crema); }
article a.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--crema);
  border: 1px solid rgba(26,58,92,0.15);
  border-radius: var(--radio);
  color: var(--azul);
  font-size: 14px;
  font-weight: 500;
  margin: 6px 6px 6px 0;
}
article a.doc-link:hover { background: var(--azul); color: var(--blanco); }
article a.doc-link i { color: var(--dorado); }

/* ── GALERÍA ── */
.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 18px;
  border: 2px solid rgba(26,58,92,0.15);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gris);
  background: var(--blanco);
  cursor: pointer;
  transition: all .2s;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.gallery-thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radio);
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--gris-bg);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.gallery-thumb:hover img { transform: scale(1.08); }
.gallery-thumb .overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,58,92,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}
.gallery-thumb:hover .overlay { opacity: 1; }
.gallery-thumb .overlay i { font-size: 28px; color: var(--dorado); }

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 20px;
}
.lightbox-inner img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radio);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  color: var(--blanco);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color .2s;
}
.lb-close:hover { color: var(--dorado); }
.lb-nav {
  color: var(--blanco);
  font-size: 32px;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.lb-nav:hover { background: var(--dorado); color: var(--azul); }
.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .qa-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: repeat(3, 1fr); }
  .pueblos-grid { grid-template-columns: repeat(3, 1fr); }
}

/* nav-close only visible inside the mobile drawer */
.nav-close { display: none; }

/* ── MOBILE NAV ── */
@media (max-width: 900px) {
  .welcome-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { order: -1; }

  .nav-toggle { display: flex; }

  /* Slide-in drawer */
  .main-nav {
    display: block;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 88vw);
    background: var(--blanco);
    z-index: 1100;
    overflow-y: auto;
    padding: 72px 0 40px;
    box-shadow: -4px 0 40px rgba(26,58,92,0.18);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  .main-nav.open { transform: translateX(0); }

  /* Overlay behind drawer */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1099;
  }
  .nav-overlay.open { display: block; }

  /* Close X inside drawer — hidden on desktop, shown only in mobile drawer */
  .nav-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gris);
    cursor: pointer;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radio);
  }
  .nav-close:hover { background: var(--crema); color: var(--azul); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list > li > a {
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid var(--crema);
    justify-content: space-between;
  }
  .nav-list > li > a:hover { background: var(--crema); }
  .btn-nav {
    margin: 16px 16px 0 !important;
    border-radius: var(--radio) !important;
    justify-content: center !important;
  }

  /* Mobile dropdowns — accordion style */
  .has-dropdown > .drop-panel {
    display: none;
    position: static;
    padding-top: 0;
  }
  .has-dropdown.open > .drop-panel { display: block; }
  /* Disable hover on mobile */
  .has-dropdown:hover > .drop-panel { display: none; }
  .has-dropdown.open > .drop-panel { display: block !important; }

  .drop-inner {
    background: #f8f9fb;
    border-top: none;
    border-radius: 0;
    box-shadow: none;
    padding: 6px 0 6px 16px !important;
    min-width: unset !important;
    border-left: 3px solid var(--dorado);
    margin: 0 16px 8px;
  }
  .drop-inner > li > a {
    padding: 9px 14px;
    font-size: 13.5px;
    white-space: normal;
    border-bottom: 1px solid rgba(26,58,92,0.06);
  }
  .drop-inner > li:last-child > a { border-bottom: none; }
  .drop-inner > li > a:hover { padding-left: 20px; }

  /* Mega mobile: stack columns */
  .drop-inner.mega {
    display: block !important;
    grid-template-columns: unset;
    min-width: unset;
  }
  .mega-col {
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid rgba(26,58,92,0.06);
  }
  .mega-col:last-child { border-bottom: none; }
  .mega-col h5 { font-size: 10px; }
  .mega-col a { padding: 7px 0; font-size: 13.5px; }
}

@media (max-width: 600px) {
  .topbar .container { flex-direction: column; gap: 4px; }
  .topbar-right { display: none; }
  .qa-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .pueblos-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-stats { grid-template-columns: 1fr 1fr; }
  .band-inner { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .hero-actions { flex-direction: column; }
}
