/* ============================================================
   CASAS CÓRDOBA — styles.css
   Portal informativo de subastas públicas en Córdoba
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
  --primary:        #1b3a5c;
  --primary-light:  #2a5a8c;
  --primary-dark:   #112440;
  --accent:         #c49a35;
  --accent-dark:    #a07d22;
  --text:           #1a1a2e;
  --text-light:     #5a6473;
  --bg:             #f7f8fa;
  --white:          #ffffff;
  --border:         #dce3ed;
  --shadow-sm:      0 1px 4px rgba(0,0,0,.08);
  --shadow:         0 2px 10px rgba(0,0,0,.11);
  --shadow-lg:      0 6px 24px rgba(0,0,0,.14);
  --radius:         8px;
  --radius-lg:      12px;
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width:      1200px;
  --whatsapp-color: #25d366;
  --iniciada-color: #16a34a;
  --finalizada-color: #dc2626;
  --proxima-color:  #2563eb;
  --sinfecha-color: #64748b;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; color: var(--primary-dark); font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.85rem); margin-bottom: .85rem; }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); margin-bottom: .65rem; }
h4 { font-size: 1.05rem; margin-bottom: .5rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--primary); color: var(--white); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--white); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.25rem; }

.text-center { text-align: center; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header p { color: var(--text-light); max-width: 600px; margin: .5rem auto 0; }
.lead { font-size: 1.1rem; color: var(--text-light); max-width: 800px; margin-bottom: 1.5rem; }

/* ===== HEADER ===== */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img { width: 36px; height: 36px; }

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.3px;
  line-height: 1;
}

.logo-text span { color: var(--accent); }

/* ===== NAVIGATION ===== */
.main-nav > ul { display: flex; gap: .25rem; align-items: center; }
.main-nav a {
  color: rgba(255,255,255,.88);
  font-size: .88rem;
  font-weight: 500;
  padding: .45rem .75rem;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.12); color: var(--white); }
.main-nav li.active > a { color: var(--accent); }

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a { cursor: pointer; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: .5rem 0;
  z-index: 200;
}
.dropdown li a {
  color: var(--text) !important;
  display: block;
  padding: .5rem 1.1rem;
  font-size: .9rem;
  border-radius: 0;
}
.dropdown li a:hover { background: var(--bg); color: var(--primary) !important; }
.has-dropdown:hover .dropdown { display: block; }

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--radius);
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1e4a7a 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(196,154,53,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: .88; margin-bottom: 1.75rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  border: 2px solid transparent;
  line-height: 1.3;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--primary-dark); }

.btn-outline   { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }

.btn-outline-dark { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: var(--white); }

.btn-whatsapp  { background: var(--whatsapp-color); color: var(--white); border-color: var(--whatsapp-color); }
.btn-whatsapp:hover { background: #1da851; border-color: #1da851; color: var(--white); }

.btn-contactar { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-contactar:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.btn-sm { padding: .4rem .9rem; font-size: .82rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* ===== FILTROS ===== */
.filtros-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}
.filtros-section h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--primary); }
.filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 1rem;
  align-items: end;
}
.filtro-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .4rem;
}
.filtro-group select {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6473' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  cursor: pointer;
  transition: border-color .15s;
}
.filtro-group select:focus { outline: none; border-color: var(--primary); }

/* ===== TARJETAS DE SUBASTAS ===== */
.tarjetas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 1.75rem; }

.tarjeta-subasta {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.tarjeta-subasta:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.tarjeta-imagen {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #c8d8e8;
}
.tarjeta-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.tarjeta-subasta:hover .tarjeta-imagen img { transform: scale(1.04); }

/* Badges */
.badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.badge-iniciada   { background: var(--iniciada-color); }
.badge-finalizada { background: var(--finalizada-color); }
.badge-proxima    { background: var(--proxima-color); }
.badge-sin-fecha  { background: var(--sinfecha-color); }

.tarjeta-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tarjeta-titulo {
  font-size: 1.05rem;
  margin-bottom: .85rem;
  line-height: 1.3;
}
.tarjeta-titulo a { color: var(--primary-dark); text-decoration: none; }
.tarjeta-titulo a:hover { color: var(--accent-dark); }

.tarjeta-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .75rem;
  margin-bottom: 1rem;
  font-size: .82rem;
}
.meta-label { color: var(--text-light); display: block; font-size: .74rem; font-weight: 600; text-transform: uppercase; }
.meta-valor { color: var(--text); font-weight: 500; }

.tarjeta-importes {
  display: flex;
  gap: .75rem;
  background: var(--bg);
  border-radius: var(--radius);
  padding: .75rem;
  margin-bottom: 1rem;
}
.importe-item { flex: 1; text-align: center; }
.importe-label { display: block; font-size: .7rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; margin-bottom: .2rem; }
.importe-valor { display: block; font-size: .88rem; font-weight: 700; color: var(--primary); }

.tarjeta-descripcion { font-size: .88rem; color: var(--text-light); margin-bottom: .5rem; }
.tarjeta-fuente { font-size: .78rem; color: var(--text-light); margin-bottom: 1rem; }

.tarjeta-acciones {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tarjeta-acciones .btn { flex: 1 1 auto; justify-content: center; font-size: .8rem; padding: .5rem .75rem; }

.sin-resultados {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  color: var(--text-light);
}
.sin-resultados p { font-size: 1rem; }

/* ===== FICHA INDIVIDUAL ===== */
.ficha-wrap { max-width: 900px; margin: 0 auto; }
.ficha-hero {
  position: relative;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
  background: #c8d8e8;
}
.ficha-hero img { width: 100%; height: 100%; object-fit: cover; }
.ficha-hero .badge { top: 1rem; left: 1rem; font-size: .85rem; padding: .4rem 1rem; }

.ficha-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.ficha-datos {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.ficha-datos h2 { font-size: 1.05rem; color: var(--primary); border-bottom: 2px solid var(--border); padding-bottom: .5rem; margin-bottom: 1rem; }

.datos-tabla { width: 100%; }
.datos-tabla tr { border-bottom: 1px solid var(--border); }
.datos-tabla tr:last-child { border-bottom: none; }
.datos-tabla th { text-align: left; font-size: .8rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; padding: .55rem .5rem .55rem 0; width: 40%; }
.datos-tabla td { font-size: .9rem; font-weight: 500; padding: .55rem 0; }

.ficha-sidebar {
  position: sticky;
  top: 80px;
}
.sidebar-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-box h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--primary); }
.sidebar-box .btn { width: 100%; justify-content: center; margin-bottom: .6rem; }
.sidebar-box .btn:last-child { margin-bottom: 0; }

.importes-ficha { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-bottom: 1rem; }
.importe-ficha-item { background: var(--bg); border-radius: var(--radius); padding: .75rem 1rem; }
.importe-ficha-label { font-size: .75rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; display: block; margin-bottom: .2rem; }
.importe-ficha-valor { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.aviso-ficha {
  background: #fff8e6;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .88rem;
  color: #5c4a1a;
}

.ficha-checklist { padding-left: 0; }
.ficha-checklist li {
  position: relative;
  padding: .4rem 0 .4rem 1.5rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.ficha-checklist li:last-child { border-bottom: none; }
.ficha-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== BLOQUES DE CATEGORÍA ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 1rem; }
.cat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: block;
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--primary); }
.cat-icon { font-size: 2rem; margin-bottom: .5rem; display: block; }
.cat-label { font-size: .9rem; font-weight: 600; display: block; }

/* ===== LOCALIDADES GRID ===== */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: .75rem; }
.loc-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: .85rem 1rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
  transition: background .15s, border-color .15s;
  display: block;
}
.loc-card:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== BLOG ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.75rem; }
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-meta { font-size: .78rem; color: var(--text-light); margin-bottom: .5rem; }
.blog-cat { background: var(--bg); color: var(--primary); padding: .2rem .6rem; border-radius: 20px; font-size: .74rem; font-weight: 600; }
.blog-card h3 { font-size: 1rem; margin-bottom: .6rem; }
.blog-card h3 a { color: var(--primary-dark); }
.blog-card h3 a:hover { color: var(--accent-dark); }
.blog-card p { font-size: .88rem; color: var(--text-light); flex: 1; }
.blog-card .btn { margin-top: 1rem; align-self: flex-start; }

/* Artículo de blog */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-wrap .article-meta { color: var(--text-light); font-size: .88rem; margin-bottom: 1.75rem; }
.article-wrap h2 { margin-top: 2rem; margin-bottom: .75rem; color: var(--primary); }
.article-wrap h3 { margin-top: 1.5rem; margin-bottom: .6rem; }
.article-wrap ul, .article-wrap ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-wrap li { margin-bottom: .35rem; }
.article-wrap strong { color: var(--primary-dark); }
.article-aviso {
  background: #fff8e6;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
  font-size: .9rem;
}
.article-relacionados {
  border-top: 2px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: .75rem 0;
  font-size: .82rem;
  color: var(--text-light);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: 0; }
.breadcrumb li { display: flex; align-items: center; gap: .4rem; }
.breadcrumb li::after { content: '›'; color: var(--border); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li:last-child { color: var(--text); font-weight: 500; }

/* ===== FORMULARIO ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group.checkbox-group { flex-direction: row; align-items: flex-start; gap: .75rem; }
.form-group.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); }
.form-group.checkbox-group label { font-weight: 400; font-size: .85rem; cursor: pointer; }

/* ===== CONTACTO CARDS ===== */
.contacto-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
.contacto-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: block;
  border: 2px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.contacto-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.contacto-card .ic { font-size: 2rem; margin-bottom: .5rem; }
.contacto-card strong { display: block; font-size: 1rem; margin-bottom: .25rem; color: var(--primary); }
.contacto-card span { font-size: .88rem; color: var(--text-light); }

/* ===== CTA ===== */
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: var(--white);
}
.cta-box h2 { color: var(--white); margin-bottom: 1rem; }
.cta-box p { opacity: .88; max-width: 550px; margin: 0 auto 1.75rem; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== AVISO ===== */
.aviso-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: .85rem;
  color: var(--text-light);
  margin: 2rem 0 0;
}
.aviso-box p { margin: 0; }

/* ===== PÁGINAS LEGALES ===== */
.legal-wrap { max-width: 800px; margin: 0 auto; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 2.5rem; }
.legal-wrap h1 { margin-bottom: .5rem; }
.legal-wrap .legal-date { color: var(--text-light); font-size: .85rem; margin-bottom: 2rem; }
.legal-wrap h2 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.15rem; color: var(--primary); }
.legal-wrap ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-wrap li { margin-bottom: .35rem; }

/* ===== GUÍA ===== */
.guia-wrap { max-width: 820px; margin: 0 auto; }
.guia-wrap h2 { color: var(--primary); margin-top: 2rem; }
.guia-wrap ul, .guia-wrap ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.guia-wrap li { margin-bottom: .4rem; }
.guia-step {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
}
.guia-step h3 { color: var(--primary); margin-bottom: .5rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 3.5rem 0 0;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo-text { color: var(--white); font-size: 1.3rem; display: block; margin-bottom: .75rem; }
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p { font-size: .88rem; margin-bottom: .6rem; }
.footer-aviso { font-size: .8rem !important; opacity: .75; font-style: italic; margin-top: .75rem !important; }
.footer-col h4 { color: var(--white); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.footer-col li { margin-bottom: .45rem; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .88rem; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding: 1.25rem 0;
  text-align: center;
  font-size: .8rem;
  opacity: .55;
}

/* ===== PÁGINA DE LOCALIDAD/TIPO - BANNER ===== */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 3rem 0;
}
.page-banner h1 { color: var(--white); margin-bottom: .5rem; }
.page-banner p { opacity: .85; font-size: 1.05rem; margin: 0; }
.page-banner .breadcrumb { margin-bottom: .75rem; }
.page-banner .breadcrumb a { color: rgba(255,255,255,.7); }
.page-banner .breadcrumb li:last-child { color: rgba(255,255,255,.95); }
.page-banner .breadcrumb li::after { color: rgba(255,255,255,.4); }

/* ===== RELACIONADOS / INTERNAL LINKS ===== */
.related-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.related-links a {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .45rem 1rem;
  font-size: .85rem;
  color: var(--primary);
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.related-links a:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== NÚMERO CONTADOR ===== */
.counter-badge { background: var(--accent); color: var(--primary-dark); border-radius: 20px; padding: .1rem .6rem; font-size: .78rem; font-weight: 700; margin-left: .35rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ficha-grid { grid-template-columns: 1fr; }
  .ficha-sidebar { position: static; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    padding: 1rem 0;
    z-index: 99;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: 0 1rem; }
  .main-nav a { display: block; padding: .65rem .75rem; border-radius: var(--radius); }
  .dropdown { position: static; box-shadow: none; background: rgba(255,255,255,.06); display: none; border-radius: var(--radius); margin-top: .25rem; }
  .dropdown li a { color: rgba(255,255,255,.8) !important; }
  .dropdown li a:hover { background: rgba(255,255,255,.1); color: var(--white) !important; }
  .dropdown-open .dropdown { display: block; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.dropdown-open .dropdown { display: block; }

  .hero { padding: 3rem 0 2.5rem; }
  .tarjetas-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .filtros-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 2rem 1.25rem; }
  .section { padding: 2.5rem 0; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .tarjeta-meta-grid { grid-template-columns: 1fr; }
  .tarjeta-importes { flex-direction: column; gap: .5rem; }
  .tarjeta-importes .importe-item { text-align: left; display: flex; justify-content: space-between; align-items: center; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-btns { flex-direction: column; }
  .cta-btns { flex-direction: column; align-items: center; }
  .legal-wrap { padding: 1.5rem; }
}
