/* ===== CERRAJEROS CAIC — Design System ===== */

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

/* --- Variables --- */
:root {
  --color-primary: #1a2332;
  --color-primary-light: #243044;
  --color-primary-dark: #111827;
  --color-gold: #c9a84c;
  --color-gold-light: #d4b96a;
  --color-accent: #e63946;
  --color-accent-dark: #c62d39;
  --color-bg: #f8f9fa;
  --color-bg-alt: #eef1f5;
  --color-text: #1a1a2e;
  --color-text-muted: #555;
  --color-text-light: #f0f0f0;
  --color-border: #ddd;
  --color-success: #2ecc71;
  --color-white: #fff;
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.15);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 80px;
  --transition: .3s ease;
}

/* --- Base --- */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, iframe { max-width: 100%; height: auto; }
a { color: var(--color-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-gold-light); }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

/* --- Utilities --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.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; }
.skip-link { position: absolute; top: -100%; left: 50%; transform: translateX(-50%); background: var(--color-accent); color: #fff; padding: .5rem 1rem; border-radius: var(--radius); z-index: 10000; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title span { color: var(--color-gold); }
.text-accent { color: var(--color-accent); }
.text-gold { color: var(--color-gold); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.8rem; border: none; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
  min-height: 44px; line-height: 1.2;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--color-gold); color: var(--color-primary); }
.btn-gold:hover { background: var(--color-gold-light); color: var(--color-primary); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-text-light); border: 2px solid rgba(255,255,255,.3); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-sm { padding: .6rem 1.2rem; font-size: .85rem; }

/* --- Top Bar --- */
.top-bar {
  background: var(--color-primary-dark);
  color: var(--color-text-light);
  font-size: .85rem;
  padding: .4rem 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.top-bar a { color: var(--color-gold); }
.top-bar__info { display: flex; gap: 1.5rem; align-items: center; }

/* --- Header --- */
.header {
  background: var(--color-primary);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-md);
}
.header .container { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); }
.header__logo img { height: 50px; width: auto; }
.header__nav { display: flex; align-items: center; gap: .25rem; }
.header__nav a {
  color: var(--color-text-light); padding: .5rem .9rem;
  font-size: .9rem; font-weight: 500; border-radius: var(--radius);
  transition: all var(--transition);
}
.header__nav a:hover, .header__nav a[aria-current="page"] { color: var(--color-gold); background: rgba(255,255,255,.05); }
.header__cta { display: flex; align-items: center; gap: .75rem; }
.header__phone {
  display: flex; align-items: center; gap: .4rem;
  color: var(--color-gold); font-weight: 700; font-size: 1.05rem;
  white-space: nowrap;
}
.header__phone:hover { color: var(--color-gold-light); }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: none; border: none; color: var(--color-text-light);
  font-size: 1.5rem; cursor: pointer; padding: .5rem; min-height: 44px; min-width: 44px;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-primary-dark) 100%);
  color: var(--color-text-light);
  padding: 4rem 0 3.5rem;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0;
  width: 40%; background: url('/assets/img/hero/cerrajero-barcelona-hero.webp') center/cover no-repeat;
  opacity: .15; mask-image: linear-gradient(to left, rgba(0,0,0,.6), transparent);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.6), transparent);
}
.hero .container { position: relative; z-index: 1; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--color-accent); color: #fff;
  padding: .4rem 1rem; border-radius: 50px;
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  margin-bottom: 1.25rem; letter-spacing: .5px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(230,57,70,.4); } 50% { box-shadow: 0 0 0 8px rgba(230,57,70,0); } }
.hero h1 { margin-bottom: 1rem; max-width: 700px; }
.hero h1 span { color: var(--color-gold); }
.hero__subtitle { font-size: 1.1rem; opacity: .9; max-width: 600px; margin-bottom: 1.75rem; line-height: 1.7; }
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero__features { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero__feature { display: flex; align-items: center; gap: .5rem; font-size: .9rem; opacity: .85; }
.hero__feature strong { color: var(--color-gold); font-size: 1.1rem; }

/* --- Sections --- */
.section { padding: 4rem 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-primary); color: var(--color-text-light); }

/* --- Benefits Bar --- */
.benefits-bar { background: var(--color-gold); padding: 1.25rem 0; }
.benefits-bar .container { display: flex; justify-content: center; flex-wrap: wrap; gap: 2rem; }
.benefit-item {
  display: flex; align-items: center; gap: .6rem;
  color: var(--color-primary); font-weight: 600; font-size: .95rem;
}
.benefit-item__icon { font-size: 1.4rem; }

/* --- Service Cards --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.services-grid--even { grid-template-columns: repeat(2, 1fr); }
.service-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  padding: 2rem 1.5rem; box-shadow: var(--shadow-sm);
  transition: all var(--transition); border: 1px solid var(--color-border);
  text-align: center;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-gold); }
.service-card__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.service-card h3 { margin-bottom: .75rem; color: var(--color-primary); }
.service-card p { color: var(--color-text-muted); font-size: .9rem; margin-bottom: 1.25rem; }
.service-card__link { color: var(--color-accent); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .3rem; }
.service-card__link:hover { color: var(--color-accent-dark); }

/* --- Why Choose Us --- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.why-card {
  background: var(--color-primary-light); border-radius: var(--radius-lg);
  padding: 2rem 1.5rem; text-align: center;
  border-left: 3px solid var(--color-gold);
}
.why-card__icon { font-size: 2rem; margin-bottom: .75rem; }
.why-card h3 { color: var(--color-gold); margin-bottom: .5rem; font-size: 1.1rem; }
.why-card p { opacity: .85; font-size: .9rem; }

/* --- Zones --- */
.zones-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.zone-card {
  background: var(--color-white); border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
  border: 1px solid var(--color-border);
  transition: all var(--transition); text-decoration: none; color: var(--color-text);
}
.zone-card:hover { border-color: var(--color-gold); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--color-primary); }
.zone-card__name { font-weight: 600; font-size: .95rem; }
.zone-card__tag { font-size: .75rem; color: var(--color-text-muted); margin-top: .25rem; }

/* --- FAQ --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item__question {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; font-size: 1rem; font-weight: 600;
  color: var(--color-text); text-align: left;
  font-family: var(--font-primary);
}
.faq-item__question:hover { color: var(--color-gold); }
.faq-item__icon { font-size: 1.25rem; transition: transform var(--transition); color: var(--color-gold); }
.faq-item[open] .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer { padding: 0 0 1.25rem; color: var(--color-text-muted); font-size: .95rem; line-height: 1.7; }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff; text-align: center; padding: 3.5rem 0;
}
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { opacity: .9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-section .btn { background: #fff; color: var(--color-accent); font-weight: 700; }
.cta-section .btn:hover { background: var(--color-gold); color: var(--color-primary); }

/* --- Contact Form --- */
.contact-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-size: .95rem; font-family: var(--font-primary);
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.form-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; color: var(--color-text-muted); }
.form-consent input { margin-top: 3px; accent-color: var(--color-gold); }
.form-status { margin-top: 1rem; padding: 1rem; border-radius: var(--radius); font-weight: 500; }
.form-status--success { background: rgba(46,204,113,.1); color: var(--color-success); }
.form-status--error { background: rgba(230,57,70,.1); color: var(--color-accent); }

/* --- Breadcrumbs --- */
.breadcrumbs { padding: 1rem 0; font-size: .85rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumbs li::after { content: '›'; margin-left: .3rem; color: rgba(255,255,255,.4); }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a { color: rgba(255,255,255,.6); }
.breadcrumbs a:hover { color: var(--color-gold); }
.breadcrumbs span { color: var(--color-gold); font-weight: 500; }

/* --- Footer --- */
.footer { background: var(--color-primary-dark); color: var(--color-text-light); padding: 3.5rem 0 0; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-bottom: 2.5rem; }
.footer__col-title { color: var(--color-gold); margin-bottom: 1rem; font-size: 1.1rem; font-weight: 700; }
.footer__col p, .footer__col li { font-size: .9rem; opacity: .8; margin-bottom: .5rem; }
.footer__col a { color: var(--color-text-light); opacity: .8; }
.footer__col a:hover { color: var(--color-gold); opacity: 1; }
.footer__contact-item { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.5rem 0; text-align: center; font-size: .8rem; opacity: .6; }

/* --- Sticky CTA Mobile --- */
.sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--color-primary); padding: .75rem 1rem;
  z-index: 999; box-shadow: 0 -4px 12px rgba(0,0,0,.2);
}
.sticky-cta .container { display: flex; gap: .75rem; }
.sticky-cta .btn { flex: 1; justify-content: center; font-size: .85rem; padding: .7rem; }

/* --- Page Header (internal pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-text-light); padding: 3rem 0 2.5rem;
}
.page-header h1 { margin-bottom: .5rem; }
.page-header p { opacity: .8; max-width: 600px; }

/* --- Content Sections --- */
.content-section { padding: 2.5rem 0; }
.content-section h2 { color: var(--color-primary); margin-bottom: 1rem; }
.content-section p { margin-bottom: 1rem; color: var(--color-text-muted); }
.content-section ul { margin: 1rem 0; padding-left: 1.5rem; }
.content-section li { margin-bottom: .5rem; color: var(--color-text-muted); list-style: disc; }

/* --- Process Steps --- */
.process-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; counter-reset: step; }
.process-step {
  text-align: center; padding: 1.5rem; background: var(--color-white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  position: relative;
}
.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--color-gold);
  color: var(--color-primary); font-weight: 700; border-radius: 50%;
  margin: 0 auto 1rem;
}
.process-step h3 { font-size: 1rem; margin-bottom: .5rem; }
.process-step p { font-size: .85rem; color: var(--color-text-muted); }

/* --- Related Links --- */
.related-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.related-links a {
  padding: .5rem 1rem; background: var(--color-bg-alt);
  border-radius: 50px; font-size: .85rem; color: var(--color-text);
  border: 1px solid var(--color-border); transition: all var(--transition);
}
.related-links a:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* --- Legal Pages --- */
.legal-content { max-width: 800px; margin: 0 auto; padding: 2rem 0; }
.legal-content h2 { margin-top: 2rem; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.legal-content th, .legal-content td { padding: .6rem; border: 1px solid var(--color-border); font-size: .9rem; text-align: left; }
.legal-content th { background: var(--color-bg-alt); font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header__nav { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; background: var(--color-primary); flex-direction: column; padding: 1rem; box-shadow: var(--shadow-lg); }
  .header__nav.is-open { display: flex; }
  .header__nav a { padding: .75rem 1rem; width: 100%; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .header__cta .btn { display: none; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero::after { display: none; }
  .hero__features { flex-direction: column; gap: 1rem; }
  .sticky-cta { display: block; }
  body { padding-bottom: 70px; }
  .top-bar__info span:not(:first-child) { display: none; }
}

@media (max-width: 600px) {
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .benefits-bar .container { flex-direction: column; align-items: center; gap: 1rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .services-grid--even { grid-template-columns: 1fr; }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: var(--color-primary); color: var(--color-text-light); border-top: 2px solid var(--color-gold); box-shadow: 0 -4px 20px rgba(0,0,0,.3); animation: cookieSlideUp .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.1rem; margin: 0 0 .5rem; font-weight: 700; }
.cookie-banner__text { font-size: .9rem; line-height: 1.5; margin: 0 0 1rem; opacity: .9; }
.cookie-banner__text a { color: var(--color-gold); text-decoration: underline; }
.cookie-banner__settings { margin: 1rem 0; padding: 1rem; background: rgba(255,255,255,.05); border-radius: 8px; }
.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: .75rem; padding: .6rem 0; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.08); }
.cookie-banner__option:last-child { border-bottom: none; }
.cookie-banner__option--disabled { opacity: .6; cursor: default; }
.cookie-banner__option input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--color-gold); }
.cookie-banner__label strong { display: block; font-size: .95rem; }
.cookie-banner__label small { display: block; font-size: .8rem; opacity: .7; margin-top: 2px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.cookie-banner__btn { padding: .7rem 1.4rem; border: none; border-radius: 6px; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s ease; min-height: 44px; }
.cookie-banner__btn--accept { background: var(--color-gold); color: var(--color-primary); }
.cookie-banner__btn--reject { background: rgba(255,255,255,.15); color: var(--color-text-light); border: 1px solid rgba(255,255,255,.3); }
.cookie-banner__btn--config { background: transparent; color: var(--color-text-light); text-decoration: underline; padding: .7rem .5rem; }
.cookie-banner__btn--save { background: var(--color-gold); color: var(--color-primary); }
.cookie-banner__btn--save[hidden] { display: none; }
.cookie-footer-link { background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; font-size: inherit; padding: 0; opacity: .7; }
.cookie-footer-link:hover { opacity: 1; }
@media (max-width: 600px) {
  .cookie-banner__container { padding: 1rem; }
  .cookie-banner__actions { flex-direction: column; }
  .cookie-banner__btn { width: 100%; text-align: center; }
}
