
:root {
    --color-primary: #e63946;
    --color-primary-dark: #d62828;
    --color-secondary: #1d3557;
    --color-bg: #f8f9fa;
    --color-text: #333;
    --color-text-muted: #666;
    --color-white: #fff;
    --color-border: #eee;
    --color-gold: #f4a261;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link { position: absolute; top: -40px; left: 0; background: var(--color-primary); color: #fff; padding: 8px; z-index: 100; }
.skip-link:focus { top: 0; }

.top-bar { background: var(--color-secondary); color: var(--color-white); font-size: 0.9rem; padding: 8px 0; }
.top-bar .container { display: flex; justify-content: space-between; }
.top-bar a { color: var(--color-gold); font-weight: bold; text-decoration: none; }

.header { background: var(--color-white); padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 50; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.header__nav { display: flex; gap: 20px; }
.header__nav a { color: var(--color-text); font-weight: 500; text-decoration: none; }
.header__nav a:hover, .header__nav a[aria-current="page"] { color: var(--color-primary); }

.btn { display: inline-block; padding: 12px 24px; border-radius: 6px; font-weight: bold; text-align: center; text-decoration: none !important; border: none; cursor: pointer; transition: all 0.3s ease; }
.btn-primary { background: var(--color-primary); color: var(--color-white) !important; box-shadow: 0 4px 6px rgba(230, 57, 70, 0.2); }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(230, 57, 70, 0.3); }
.btn-gold { background: var(--color-gold); color: var(--color-secondary) !important; }

.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

.page-header { background: var(--color-secondary); color: var(--color-white); padding: 40px 0; text-align: center; }
.hero-header { padding: 120px 0; background: linear-gradient(rgba(29, 53, 87, 0.8), rgba(29, 53, 87, 0.8)), url('/assets/img/hero/cerrajero-hero.webp') no-repeat center center/cover; }
.page-header h1 { margin-top: 10px; font-size: 2.5rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.5); }
.page-header p { font-size: 1.2rem; color: #f0f0f0; margin-top: 15px; max-width: 800px; margin-inline: auto; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.breadcrumbs { font-size: 0.9rem; margin-bottom: 10px; }
.breadcrumbs ol { list-style: none; display: flex; justify-content: center; gap: 10px; }
.breadcrumbs a { color: rgba(255,255,255,0.8); text-decoration: none; }
.breadcrumbs span { color: var(--color-gold); }
.breadcrumbs li::after { content: "/"; margin-left: 10px; color: rgba(255,255,255,0.4); }
.breadcrumbs li:last-child::after { content: ""; }

.section { padding: 70px 0; }
.section-alt { background: var(--color-white); }
.section h2 { text-align: center; margin-bottom: 40px; font-size: 2.2rem; color: var(--color-secondary); }
.section h3 { margin-top: 30px; margin-bottom: 15px; color: var(--color-secondary); font-size: 1.6rem; }
.section p { margin-bottom: 20px; font-size: 1.05rem; }

/* SEO Interlinking lists */
.interlinking-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; list-style: none; margin-top: 20px; }
.interlinking-list li a { display: block; padding: 15px 20px; background: #fff; border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-secondary); font-weight: 500; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.interlinking-list li a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); transform: translateX(5px); text-decoration: none; }

/* FAQ Schema Styling */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 15px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; padding: 20px; }
.faq-item h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.2rem; color: var(--color-secondary); display: flex; align-items: center; }
.faq-item h3::before { content: "❓"; margin-right: 10px; }
.faq-item p { margin-bottom: 0; color: var(--color-text-muted); }

.grid-services, .grid-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: var(--color-white); padding: 35px 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; border: 1px solid transparent; transition: all 0.3s ease; }
.card:hover { border-color: var(--color-gold); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card__icon { font-size: 3.5rem; margin-bottom: 20px; }
.card h3 { margin-bottom: 15px; color: var(--color-secondary); font-size: 1.4rem; }
.card p { margin-bottom: 25px; color: var(--color-text-muted); font-size: 1rem; }

.footer { background: var(--color-secondary); color: var(--color-white); padding: 60px 0 20px; margin-top: 60px; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer__col-title { font-weight: bold; font-size: 1.2rem; margin-bottom: 20px; color: var(--color-gold); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul a { color: #ccc; text-decoration: none; transition: color 0.2s; }
.footer ul a:hover { color: var(--color-white); text-decoration: underline; }
.footer__bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #888; font-size: 0.9rem; }
.cookie-footer-link { background: none; border: none; color: #ccc; cursor: pointer; text-decoration: underline; padding: 0; font: inherit; }

.sticky-cta { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--color-white); padding: 10px 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 100; border-top: 2px solid var(--color-primary); }
.sticky-cta .container { display: flex; gap: 10px; }
.sticky-cta .btn { flex: 1; margin: 0; font-size: 0.9rem; padding: 12px; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .header__nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--color-white); flex-direction: column; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .header__nav.active { display: flex; }
    .header__cta { display: none; }
    .sticky-cta { display: flex; }
    body { padding-bottom: 60px; }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-white, #fff);
  color: var(--color-text, #333);
  border-top: 3px solid var(--color-primary, #e63946);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  font-family: system-ui, -apple-system, sans-serif;
  animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.cookie-banner__title {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  color: var(--color-secondary, #1d3557);
}

.cookie-banner__text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  color: var(--color-text-muted, #666);
}

.cookie-banner__text a {
  color: var(--color-primary, #e63946);
  text-decoration: underline;
}

.cookie-banner__settings {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  border: 1px solid var(--color-border, #eee);
  text-align: left;
}

.cookie-banner__settings[hidden] {
  display: none;
}

.cookie-banner__fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.cookie-banner__option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border, #eee);
  text-align: left;
}

.cookie-banner__option:last-child {
  border-bottom: none;
}

.cookie-banner__option--disabled {
  opacity: 0.6;
  cursor: default;
}

.cookie-banner__option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--color-primary, #e63946);
}

.cookie-banner__label strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-secondary, #1d3557);
}

.cookie-banner__label small {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted, #666);
  margin-top: 2px;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cookie-banner__btn {
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  min-height: 44px;
}

.cookie-banner__btn:hover {
  transform: translateY(-1px);
}

.cookie-banner__btn:focus-visible {
  outline: 2px solid var(--color-primary, #e63946);
  outline-offset: 2px;
}

.cookie-banner__btn--accept {
  background: var(--color-primary, #e63946);
  color: #fff !important;
}

.cookie-banner__btn--accept:hover {
  background: var(--color-primary-dark, #d62828);
}

.cookie-banner__btn--reject {
  background: #f1f3f5;
  color: var(--color-text, #333) !important;
  border: 1px solid #dee2e6;
}

.cookie-banner__btn--reject:hover {
  background: #e9ecef;
}

.cookie-banner__btn--config {
  background: transparent;
  color: var(--color-text-muted, #666) !important;
  text-decoration: underline;
  padding: 0.7rem 0.5rem;
}

.cookie-banner__btn--config:hover {
  color: var(--color-text, #333) !important;
}

.cookie-banner__btn--save {
  background: var(--color-secondary, #1d3557);
  color: #fff !important;
}

.cookie-banner__btn--save:hover {
  background: #11223b;
}

.cookie-banner__btn--save[hidden] {
  display: none;
}

.cookie-footer-link {
  background: none;
  border: none;
  color: #ccc;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  opacity: 0.7;
}

.cookie-footer-link:hover {
  opacity: 1;
}

@media (max-width: 600px) {
  .cookie-banner__container {
    padding: 1rem;
  }

  .cookie-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-banner__btn {
    width: 100%;
    text-align: center;
  }
}

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