:root {
  --petrol: #173b4d;
  --petrol-dark: #0b2a39;
  --petrol-mid: #0b3347;
  --gold: #d8b36a;
  --gold-light: #f1c55b;
  --cream: #faf9f6;
  --ink: #24282b;
  --muted: #66747c;
  --line: #e9e3d9;
  --white: #fff;
  --shadow: 0 12px 34px rgba(20, 48, 61, .1);
}

.cookie-banner[hidden], .cookie-modal[hidden] { display: none; }
.cookie-banner { position: fixed; z-index: 1000; left: 1rem; right: 1rem; bottom: 1rem; background: #fff; color: #17202a; border: 1px solid #d7d7d7; border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,.24); }
.cookie-banner__content { max-width: 1180px; margin: 0 auto; padding: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cookie-banner h2, .cookie-modal h2 { margin: 0 0 .35rem; font-size: 1.3rem; }
.cookie-banner p, .cookie-option p { margin: 0; }
.cookie-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; flex-shrink: 0; }
.cookie-actions .btn, .cookie-modal__actions .btn { min-height: 44px; padding: .7rem 1rem; border: 1px solid #b8892d; cursor: pointer; }
.cookie-accept, .cookie-save { background: #b8892d; color: #111; }
.cookie-reject { background: #fff; color: #17202a; }
.cookie-settings-link, .cookie-reopen { background: transparent; border: 0; color: #17202a; text-decoration: underline; cursor: pointer; padding: .65rem; }
.cookie-reopen { display: block; margin: .5rem auto 6rem; color: inherit; }
.cookie-modal { position: fixed; z-index: 1100; inset: 0; background: rgba(0,0,0,.62); display: grid; place-items: center; padding: 1rem; }
.cookie-modal__panel { width: min(620px, 100%); max-height: 90vh; overflow: auto; position: relative; background: #fff; color: #17202a; border-radius: 16px; padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.cookie-modal__close { position: absolute; top: .7rem; right: .8rem; background: transparent; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; }
.cookie-option { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid #ddd; }
.cookie-option p { margin-top: .25rem; font-size: .92rem; }
.cookie-option input { width: 22px; height: 22px; flex: 0 0 auto; }
.cookie-modal__actions { margin-top: 1rem; text-align: right; }
.cookie-modal-open { overflow: hidden; }

@media (max-width: 760px) {
  .cookie-banner__content { align-items: stretch; flex-direction: column; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-actions .cookie-settings-link { grid-column: 1 / -1; }
  .cookie-actions .btn { width: 100%; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.wrap { width: min(1160px, calc(100% - 36px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; transform: translateY(-150%); background: white; color: var(--petrol); padding: 10px 14px; border-radius: 6px; }
.skip-link:focus { transform: none; }
:where(a, button, input, textarea, select):focus-visible { outline: 3px solid #efc15a; outline-offset: 3px; }

.topbar { background: var(--petrol-mid); color: #eef5f7; font-size: 14px; }
.topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar a { font-weight: 800; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(23, 59, 77, .1); backdrop-filter: blur(12px); }
.nav-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand svg { width: 76px; height: 54px; }
.brand-copy { display: block; color: var(--petrol); }
.brand-copy strong { display: block; font-size: 24px; line-height: 1; letter-spacing: .04em; }
.brand-copy > span { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .22em; }
.brand-copy small { display: block; margin-top: 4px; color: #59727e; font-size: 10px; letter-spacing: .13em; }
.main-menu { display: flex; align-items: center; gap: 24px; }
.main-menu a { color: #27404b; font-size: 14px; font-weight: 700; }
.main-menu a:hover, .main-menu a:focus-visible { color: #a97c2a; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 10px; background: #edf4f6; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--petrol); }

.btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.gold { color: var(--petrol); background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 9px 25px rgba(216, 179, 106, .18); }
.btn.ghost { color: white; border-color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .05); }

.hero { position: relative; min-height: 610px; color: white; background: linear-gradient(90deg, rgba(8, 42, 58, .97) 0%, rgba(10, 49, 67, .9) 38%, rgba(9, 47, 65, .53) 62%, rgba(9, 47, 65, .17) 100%), url("assets/images/toldo-hero-sierra-madrid.jpg") center / cover no-repeat; }
.hero-inner { min-height: 610px; display: flex; align-items: center; }
.hero-copy { max-width: 700px; padding: 58px 0 48px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: #efc15a; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::after { width: 80px; height: 2px; background: currentColor; content: ""; opacity: .85; }
.gold-text { color: #c8973b; }
.dark-gold { color: #9b742a; }
h1 { margin: 12px 0 16px; font-size: clamp(50px, 6vw, 72px); line-height: .94; letter-spacing: -.045em; }
h1 span { color: #efc15a; }
.lead { max-width: 650px; margin: 0 0 15px; font-size: 25px; font-weight: 800; line-height: 1.14; }
.sub { max-width: 610px; margin: 0 0 24px; color: #deeaee; font-size: 16px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 28px; }
.trust { display: flex; flex-wrap: wrap; gap: 27px; }
.trust div { color: #d8e6eb; font-size: 13px; }
.trust strong { display: block; color: white; font-size: 14px; }
.trust span { display: block; margin-top: 3px; }

main section { padding: 76px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-head h2, .why-copy h2, .areas h2, .contact h2 { margin: 7px 0 0; color: var(--petrol); font-size: 44px; line-height: 1.04; letter-spacing: -.035em; }
.section-head > p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.55; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.service-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 28px rgba(20, 48, 61, .07); }
.service-card > img { width: 100%; height: 190px; object-fit: cover; }
.service-icon { position: absolute; top: 168px; left: 18px; display: grid; width: 45px; height: 45px; place-items: center; color: white; border: 3px solid white; border-radius: 13px; background: #0c4259; font-size: 20px; }
.card-body { padding: 32px 19px 22px; }
.card-body h3 { margin: 0 0 7px; color: var(--petrol); font-size: 19px; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.process { background: #f2f6f7; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.process-grid li { padding: 24px 21px; border: 1px solid #dbe6ea; border-radius: 20px; background: white; box-shadow: 0 8px 24px rgba(20, 48, 61, .06); }
.process-grid li > span { display: grid; width: 40px; height: 40px; place-items: center; color: white; border-radius: 50%; background: var(--petrol); font-weight: 900; }
.process-grid h3 { margin: 16px 0 8px; color: var(--petrol); font-size: 18px; }
.process-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.process-cta { margin-top: 25px; text-align: center; }

.why { background: white; }
.two-columns { display: grid; grid-template-columns: 1.08fr .92fr; gap: 38px; align-items: center; }
.why-image { display: flex; min-height: 420px; align-items: end; padding: 32px; color: white; border-radius: 26px; background: linear-gradient(180deg, rgba(11, 51, 71, .08), rgba(11, 51, 71, .78)), url("assets/images/asesoramiento-proteccion-solar.jpg") center / cover; }
.why-image h3 { margin: 7px 0; font-size: 29px; line-height: 1.08; }
.why-image p:last-child, .why-copy > p:last-of-type { line-height: 1.6; }
.why-copy > p:last-of-type { color: var(--muted); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 24px; }
.checks span { display: flex; align-items: flex-start; gap: 9px; color: #34464f; font-size: 14px; }
.checks i { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; color: #0d536d; border-radius: 8px; background: #edf4f6; font-style: normal; font-weight: 900; }

.projects { color: white; background: var(--petrol-mid); }
.light-head h2 { color: white; }
.light-head > p { color: #c5d7de; }
.project-grid { display: grid; grid-template-columns: 1.25fr .75fr .75fr; grid-template-rows: repeat(4, 215px); gap: 13px; }
.project { position: relative; min-height: 215px; margin: 0; overflow: hidden; border-radius: 19px; background: #123d50; }
.project.featured { grid-row: 1 / 3; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project:hover img { transform: scale(1.035); }
.project::after { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 27, 37, .82), transparent 63%); content: ""; }
.project figcaption { position: absolute; z-index: 2; bottom: 17px; left: 18px; }
.project figcaption strong, .project figcaption span { display: block; }
.project figcaption span { margin-top: 3px; color: #d5e3e8; font-size: 12px; }

.stats { padding: 28px 0; color: white; background: #082a3a; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid div { padding: 7px 21px; border-right: 1px solid rgba(255, 255, 255, .15); }
.stats-grid div:last-child { border-right: 0; }
.stats-grid strong, .stats-grid span { display: block; }
.stats-grid strong { font-size: 22px; }
.stats-grid span { margin-top: 3px; color: #c4d5dc; font-size: 12px; }

.areas > .two-columns { grid-template-columns: 1.08fr .92fr; }
.areas h2, .contact h2 { font-size: 48px; }
.areas p { color: var(--muted); line-height: 1.6; }
.towns { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.towns span { padding: 8px 12px; color: #3a515c; border: 1px solid var(--line); border-radius: 999px; background: white; font-size: 13px; font-weight: 700; }
.quote-card { padding: 34px; color: white; border-radius: 26px; background: linear-gradient(145deg, var(--petrol), var(--petrol-dark)); box-shadow: var(--shadow); }
.quote-card h3 { margin: 0 0 11px; font-size: 29px; line-height: 1.06; }
.quote-card p { color: #d8e5ea; line-height: 1.55; }

.contact { background: linear-gradient(135deg, #f1e3c2, #fbf7ed); }
.contact p { color: #5f6d74; line-height: 1.6; }
.contact address { font-style: normal; }
.contact address a { color: var(--petrol); font-weight: 800; }
.contact-form { padding: 24px; border-radius: 23px; background: white; box-shadow: 0 14px 36px rgba(20, 48, 61, .12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid label { display: block; margin-bottom: 5px; color: #2d4651; font-size: 12px; font-weight: 800; }
.form-grid input, .form-grid textarea, .form-grid select { width: 100%; min-height: 48px; padding: 12px 13px; color: var(--ink); border: 1px solid #dad4ca; border-radius: 12px; background: #fcfbf9; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { border-color: #b1812f; outline: 3px solid rgba(216, 179, 106, .25); }
.form-grid textarea { min-height: 110px; resize: vertical; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid small { display: block; margin-top: 5px; color: var(--muted); }
.consent label { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; line-height: 1.45; }
.consent input { width: 20px; min-height: 20px; flex: 0 0 auto; margin: 0; }
.consent a, .form-alternative a, .legal-links a { text-decoration: underline; text-underline-offset: 3px; }
.form-hint { margin: 10px 0 0; color: #59727e; font-size: 13px; }
.form-alternative { margin: 7px 0 0 !important; font-size: 13px; }

footer { padding: 42px 0 22px; color: #dbe6ea; background: #082532; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 26px; }
footer h2, footer h3 { margin: 0 0 10px; color: white; font-size: 16px; }
footer p { margin: 7px 0; color: #bdd0d7; font-size: 13px; }
.copyright { margin-top: 25px; padding-top: 17px; color: #8fa8b3; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 11px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; color: #dbe6ea; font-size: 13px; }
.legal-links .cookie-reopen { display: inline; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; appearance: none; }

.legal-page { min-height: 70vh; padding: 64px 0; background: white; }
.legal-copy { max-width: 860px; }
.legal-copy h1 { color: var(--petrol); font-size: clamp(38px, 6vw, 58px); line-height: 1; }
.legal-copy h2 { margin-top: 34px; color: var(--petrol); font-size: 24px; }
.legal-copy p, .legal-copy li { color: #4b5b63; line-height: 1.7; }
.legal-copy a { color: #075a7a; text-decoration: underline; text-underline-offset: 3px; }
.legal-back { display: inline-flex; margin-bottom: 18px; color: var(--petrol); font-weight: 800; }
.whatsapp-float { position: fixed; z-index: 25; right: 20px; bottom: 20px; display: grid; width: 58px; height: 58px; place-items: center; color: white; border: 3px solid white; border-radius: 50%; background: #25d366; box-shadow: 0 8px 25px rgba(0, 0, 0, .25); font-size: 26px; }
.mobile-actions { display: none; }

.seo-content { background: white; }
.local-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 54px; align-items: start; }
.seo-content h2 { margin: 7px 0 18px; color: var(--petrol); font-size: 44px; line-height: 1.05; letter-spacing: -.035em; }
.seo-content p { color: var(--muted); line-height: 1.65; }
.faq-list { display: grid; gap: 11px; }
.faq-list details { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--cream); }
.faq-list summary { min-height: 54px; padding: 16px 46px 16px 18px; color: var(--petrol); cursor: pointer; font-weight: 800; list-style-position: inside; }
.faq-list details p { margin: 0; padding: 0 18px 18px; }

@media (max-width: 980px) {
  .nav-cta { display: none; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-menu { position: absolute; top: 86px; right: 18px; left: 18px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
  .main-menu.open { display: flex; }
  .main-menu a { padding: 13px 15px; border-radius: 9px; }
  .main-menu a:hover { background: #f5f2eb; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .two-columns { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 260px; grid-auto-rows: 220px; }
  .project.featured { grid-column: 1 / -1; grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .local-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 24px); }
  .topbar-inner { min-height: 42px; padding: 7px 0; justify-content: center; font-size: 12px; }
  .topbar-location { display: none; }
  .topbar-right { display: inline; text-align: center; }
  .nav-inner { min-height: 70px; }
  .brand svg { width: 58px; height: 42px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy > span { font-size: 10px; }
  .brand-copy small { display: none; }
  .main-menu { top: 70px; }
  .hero, .hero-inner { min-height: 610px; }
  .hero { background-position: 64% center; }
  .hero-inner { align-items: end; }
  .hero-copy { padding: 82px 0 38px; }
  h1 { font-size: 47px; }
  .lead { font-size: 19px; }
  .sub { font-size: 14px; }
  .actions { display: grid; grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .trust { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  main section { padding: 56px 0; }
  .section-head { display: block; }
  .section-head h2, .why-copy h2, .areas h2, .contact h2 { font-size: 36px; }
  .section-head > p { margin-top: 14px; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .areas > .two-columns { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .project-grid { display: flex; gap: 12px; margin-right: -12px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 0 12px 12px 0; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .project, .project.featured { min-width: min(82vw, 340px); min-height: 260px; grid-column: auto; grid-row: auto; scroll-snap-align: start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid div { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .seo-content h2 { font-size: 36px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .whatsapp-float { display: none; }
  .mobile-actions { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 1fr 1fr; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; border-top: 1px solid rgba(23, 59, 77, .14); background: rgba(255, 255, 255, .97); box-shadow: 0 -7px 24px rgba(8, 42, 58, .12); backdrop-filter: blur(12px); }
  .mobile-actions a { display: flex; min-height: 48px; align-items: center; justify-content: center; border-radius: 999px; font-weight: 800; }
  .mobile-actions a:first-child { color: var(--petrol); background: #edf4f6; }
  .mobile-actions a:last-child { color: white; background: #138c43; }
}

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