@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --green: #087d59;
  --green-dark: #075a43;
  --blue: #1786ad;
  --ink: #292d2e;
  --muted: #657071;
  --line: #e6eceb;
  --paper: #ffffff;
  --mist: #f3f7f6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: 'Source Sans 3', sans-serif; font-size: 18px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--green); color: white; padding: .5rem 1rem; }

#site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { width: calc(100% - 4rem); min-height: 164px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand img { width: min(680px, 37vw); height: auto; }
.header-tools { display: flex; align-items: center; gap: 3rem; flex: 0 0 auto; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); align-items: center; gap: .75rem; font: 600 1rem 'Source Sans 3', sans-serif; cursor: pointer; }
.menu-icon { font-size: 1.45rem; line-height: 1; }
.climalit img { width: 280px; }
#main-navigation { display: block; }
#main-navigation ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: clamp(1rem, 1.4vw, 2rem); }
#main-navigation a, #main-navigation .submenu-toggle { text-decoration: none; font-size: .95rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
#main-navigation a:hover, #main-navigation a:focus-visible,
#main-navigation .submenu-toggle:hover, #main-navigation .submenu-toggle:focus-visible { color: var(--green); }
#main-navigation .submenu-toggle { display: inline-block; border: 0; background: transparent; color: inherit; font-family: inherit; padding: 0; cursor: pointer; }
#main-navigation > ul > .has-submenu { position: relative; }
#main-navigation > ul > .has-submenu > .submenu-toggle::after { content: '⌄'; display: inline-block; margin-left: .45rem; font-size: .9em; }
#main-navigation .submenu { position: absolute; z-index: 10; top: 100%; left: 50%; display: none; min-width: 255px; padding: .35rem 0; background: white; box-shadow: 0 8px 18px rgb(0 0 0 / 12%); transform: translateX(-50%); }
#main-navigation .submenu li { border-bottom: 1px solid var(--line); }
#main-navigation .submenu li:last-child { border-bottom: 0; }
#main-navigation .submenu a { display: block; padding: .75rem 1.2rem; white-space: nowrap; font-size: .85rem; }
#main-navigation .has-submenu:hover .submenu, #main-navigation .has-submenu:focus-within .submenu { display: block; }

.hero { position: relative; overflow: hidden; background: #c9d4d5; }
.hero-track { aspect-ratio: 3 / 1.4; min-height: 360px; position: relative; }
.hero-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .7s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 1rem 2rem; text-align: center; color: white; background: rgb(35 42 42 / 52%); font: 600 clamp(2.2rem, 5vw, 4.6rem) 'Barlow Condensed', sans-serif; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: white; cursor: pointer; font-size: 4rem; line-height: 1; text-shadow: 0 1px 5px rgb(0 0 0 / 35%); }
.hero-arrow--prev { left: 1.5rem; }
.hero-arrow--next { right: 1.5rem; }

.climalit-hero, .page-hero { min-height: 290px; display: grid; place-items: center; background: linear-gradient(rgb(27 44 53 / 20%), rgb(27 44 53 / 20%)), url('../img/climalit-hero.jpg') center / cover; }
.climalit-hero h1, .page-hero h1 { color: white; font-size: clamp(3rem, 6vw, 5rem); text-align: center; text-shadow: 0 2px 8px rgb(0 0 0 / 30%); }
.page-hero--contacto { background-image: linear-gradient(rgb(27 44 53 / 20%), rgb(27 44 53 / 20%)), url('../img/hero-contacto.jpg'); }
.page-hero--descargas { background-image: linear-gradient(rgb(27 44 53 / 20%), rgb(27 44 53 / 20%)), url('../img/hero-contacto.jpg'); }
.page-hero--calidad { background-image: linear-gradient(rgb(27 44 53 / 20%), rgb(27 44 53 / 20%)), url('../img/hero-calidad.jpg'); }
.page-hero--climalit-plus { background-image: linear-gradient(rgb(27 44 53 / 20%), rgb(27 44 53 / 20%)), url('../img/hero-climalit-plus.jpg'); }
.page-hero--trabajos-interior { background-image: linear-gradient(rgb(27 44 53 / 20%), rgb(27 44 53 / 20%)), url('../img/hero-trabajos-interior.jpg'); }
.page-hero--noticias { background: var(--green); }
.catalog-grid { padding-top: 4rem; padding-bottom: 6rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem 2rem; }
.catalog-grid article { text-align: center; }
.catalog-grid article a { display: block; overflow: hidden; background: var(--mist); }
.catalog-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .35s ease; }
.catalog-grid article a:hover img, .catalog-grid article a:focus-visible img { transform: scale(1.03); }
.catalog-grid p { margin: .8rem 0 0; color: var(--green-dark); font: 600 1.15rem/1.15 'Barlow Condensed', sans-serif; }

.section-wrap { width: min(1100px, calc(100% - 4rem)); margin: auto; }
.intro { padding: 5.5rem 0 4rem; }
h1, h2 { margin: 0; color: var(--green-dark); font-family: 'Barlow Condensed', sans-serif; font-weight: 600; line-height: 1.05; }
h1 { max-width: 850px; font-size: clamp(2.3rem, 4vw, 4.5rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 3vw, 3rem); }
.story { display: grid; grid-template-columns: 1fr 260px; gap: 5rem; align-items: start; margin-top: 3rem; }
.story p { margin: 1.1rem 0 0; color: var(--muted); }
.story img { width: 100%; margin-top: .5rem; }
.institutional { padding: 2rem 0 6rem; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.institutional img { width: 100%; max-width: 900px; margin: 0 auto; object-fit: contain; }
.institutional img:nth-child(n + 2) { max-width: 700px; }
.page-content { padding: 5rem 0 7rem; min-height: 60vh; }
.page-content > h1 { margin-bottom: 3rem; }
.document-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.document-grid--2col { grid-template-columns: repeat(2, 1fr); max-width: 700px; margin-top: 3rem; }
.document-grid a { display: block; color: var(--green-dark); text-decoration: none; }
.document-grid .doc-thumb { display: block; overflow: hidden; background: var(--mist); aspect-ratio: 3 / 4; border: 1px solid var(--line); }
.document-grid .doc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.document-grid a:hover .doc-thumb img { transform: scale(1.05); }
.document-grid .doc-thumb--logo { display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.document-grid .doc-thumb--logo img { width: 100%; height: auto; object-fit: contain; }
.document-grid--2col .doc-thumb { aspect-ratio: auto; height: 260px; border: 1px solid var(--line); background: var(--mist); padding: 1.25rem; display: flex; align-items: center; justify-content: center; }
.document-grid--2col .doc-thumb img { width: 100%; height: 100%; object-fit: contain; transform: none; }
.document-grid--2col a:hover .doc-thumb { border-color: var(--green); }
.document-grid--2col a:hover .doc-thumb img { transform: scale(1.03); }
.document-grid .doc-title { display: block; margin-top: .7rem; font: 600 1.1rem/1.2 'Barlow Condensed', sans-serif; }
.document-grid a:hover .doc-title { color: var(--green); }
.resource-links a { display: flex; align-items: center; min-height: 110px; padding: 1.3rem; background: var(--mist); border-left: 4px solid var(--green); color: var(--green-dark); font: 600 1.25rem/1.15 'Barlow Condensed', sans-serif; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.resource-links a:hover { background: #dcece7; transform: translateY(-3px); }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.photo-grid a { display: block; overflow: hidden; background: var(--mist); aspect-ratio: 4 / 3; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-grid a:hover img, .photo-grid a:focus-visible img { transform: scale(1.04); }
.prose { max-width: 820px; color: var(--muted); }

.faq { padding: 1rem 0 6rem; }
.faq h2 { margin-bottom: 1.5rem; }
.faq-list { max-width: 820px; display: flex; flex-direction: column; gap: .75rem; }
.faq-item { border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; background: var(--paper); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; font: 600 1.05rem/1.3 'Barlow Condensed', sans-serif; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; flex-shrink: 0; width: 9px; height: 9px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { margin-top: .75rem; color: var(--muted); }

.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(20, 24, 24, .92); opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.lightbox.is-open { opacity: 1; visibility: visible; }
body.lightbox-open { overflow: hidden; }
.lightbox-img { max-width: min(90vw, 1200px); max-height: 88vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox-close { position: absolute; top: 1.2rem; right: 1.5rem; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .2s ease; }
.lightbox-close:hover, .lightbox-close:focus-visible { background: rgba(255, 255, 255, .25); }
.lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; transition: background .2s ease; display: flex; align-items: center; justify-content: center; }
.lightbox-arrow:hover, .lightbox-arrow:focus-visible { background: rgba(255, 255, 255, .25); }
.lightbox-arrow--prev { left: 1rem; }
.lightbox-arrow--next { right: 1rem; }
@media (max-width: 640px) {
  .lightbox-arrow { width: 42px; height: 42px; font-size: 1.8rem; }
  .lightbox-arrow--prev { left: .4rem; }
  .lightbox-arrow--next { right: .4rem; }
  .lightbox-close { top: .6rem; right: .6rem; }
}

.back-to-top { position: fixed; bottom: 24px; right: 24px; z-index: 998; width: 44px; height: 44px; background: var(--green); color: #fff; border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 20px rgb(0 0 0 / 22%); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .3s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green-dark); }
.back-to-top svg { width: 20px; height: 20px; }
body.cookie-banner-open .back-to-top { bottom: calc(1.5rem + var(--cookie-banner-height, 0px) + 1rem); }
@media (max-width: 520px) {
  .back-to-top { width: 40px; height: 40px; bottom: 16px; right: 16px; }
  .back-to-top svg { width: 18px; height: 18px; }
}
.resource-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; }
.contact-map { position: relative; width: 100%; aspect-ratio: 16 / 5; margin: 2rem 0; overflow: hidden; }
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .contact-map { aspect-ratio: 4 / 3; } }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 4rem; }
.contact-grid h2, .contact-form h2 { font-size: 2rem; }
.contact-grid p { color: var(--muted); }
.contact-grid a, .social-label a { color: var(--green); }
.contact-grid .icon { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; vertical-align: middle; margin-right: .4rem; color: var(--green); }
.contact-grid .icon-svg svg { width: 1rem; height: 1rem; }
.contact-form { max-width: 700px; padding-top: 2rem; border-top: 1px solid var(--line); }
.contact-form form { display: grid; gap: .5rem; margin-top: 1.5rem; }
.contact-form label { color: var(--muted); font-weight: 600; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid #cbd9d6; padding: .8rem; font: inherit; }
.contact-form button { border: 0; padding: .8rem 1.4rem; background: var(--green); color: white; font: 600 1rem 'Source Sans 3', sans-serif; cursor: pointer; }
.contact-form button:hover { background: var(--green-dark); }

.captcha-row { display: flex; align-items: center; gap: .75rem; }
.captcha-row img { border: 1px solid #cbd9d6; background: var(--mist); }
.captcha-row button { border: 1px solid #cbd9d6; background: white; color: var(--ink); padding: .5rem .8rem; font-size: 1.1rem; cursor: pointer; }
.captcha-row button:hover { background: var(--mist); }

.form-legal { font-size: .82rem; color: var(--muted); line-height: 1.55; background: var(--mist); border: 1px solid var(--line); padding: .85rem 1rem; margin: .5rem 0; }
.form-legal a { color: var(--green-dark); text-decoration: underline; }

.form-check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .9rem; font-weight: 400; color: var(--ink); }
.form-check input { width: auto; margin-top: .2rem; accent-color: var(--green); flex-shrink: 0; }
.form-check a { color: var(--green-dark); text-decoration: underline; }

.form-check-group { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: .5rem; }
.form-check--inline { font-size: .85rem; }

.form-submit { display: flex; justify-content: center; margin-top: .5rem; }

#form-status { min-height: 1.4em; font-weight: 600; }
#form-status[data-state="error"] { color: #c0392b; }
#form-status[data-state="success"] { color: var(--green-dark); }
.social-label { margin-top: 1rem; color: var(--muted); font-weight: 600; }
.news-list { display: grid; gap: 2rem; max-width: 900px; }
.news-list article { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.news-list h2 { font-size: 2.2rem; }
.news-list h2 a { text-decoration: none; }
.news-list p { color: var(--muted); }
#site-footer { padding: 4rem 2rem 1.2rem; background: var(--green-dark); color: white; font-size: .95rem; }
.footer-columns { width: min(1100px, 100%); margin: 0 auto 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; }
.footer-columns h2 { margin: 0 0 1.2rem; color: white; font: 600 1.05rem 'Source Sans 3', sans-serif; text-transform: lowercase; }
.footer-columns ul { margin: 0; padding: 0; list-style: none; }
.footer-columns li { margin: .4rem 0; }
#site-footer a { color: white; text-decoration: none; }
#site-footer a:hover, #site-footer a:focus-visible { color: #9ed7c4; }
.footer-contact li { display: flex; align-items: flex-start; gap: .6rem; }
.footer-contact li span { width: 1.2rem; margin: 0; color: #9ed7c4; text-align: center; }
.footer-contact li .icon-fax,
.footer-contact li .icon-instagram { display: inline-flex; align-items: center; justify-content: center; }
.footer-contact li .icon-fax svg,
.footer-contact li .icon-instagram svg { width: 1rem; height: 1rem; }
.footer-bottom { padding-top: 1.2rem; border-top: 1px solid rgb(255 255 255 / 24%); text-align: center; }
.footer-bottom p { margin: 0; }
.footer-bottom p span { margin-left: 1rem; }

.cookie-banner { position: fixed; z-index: 30; right: 1.5rem; bottom: 1.5rem; width: min(540px, calc(100% - 3rem)); padding: 1.5rem 1.5rem 1.2rem; background: white; box-shadow: 0 12px 40px rgb(0 0 0 / 22%); border-radius: 8px; font-size: .95rem; line-height: 1.45; }
.cookie-banner h2 { margin: 0 2rem 1rem 0; color: var(--ink); font: 600 1.1rem 'Source Sans 3', sans-serif; text-align: center; }
.cookie-banner p { margin: 0; }
.cookie-close { position: absolute; top: .65rem; right: .8rem; border: 0; background: transparent; font-size: 1.6rem; cursor: pointer; }
.cookie-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.4rem; }
.cookie-actions button { padding: .75rem .5rem; border: 0; border-radius: 4px; background: #237dbd; color: white; font: 600 .95rem 'Source Sans 3', sans-serif; cursor: pointer; }
.cookie-links { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; font-size: .85rem; }

@media (max-width: 1100px) {
  body { font-size: 16px; }
  .header-inner, .section-wrap { width: min(100% - 2rem, 1100px); }
  .header-inner { min-height: 118px; align-items: flex-start; padding: 1.25rem 0; flex-direction: column; gap: 1rem; }
  .brand img { width: min(430px, 82vw); }
  .header-tools { width: 100%; justify-content: space-between; gap: 1rem; }
  .menu-toggle { display: inline-flex; }
  .climalit img { width: 180px; }
  #main-navigation { display: none; width: 100%; order: 3; background: var(--mist); border-top: 1px solid var(--line); }
  #main-navigation.is-open { display: block; }
  #main-navigation ul { display: grid; gap: .4rem; padding: .8rem 0 1rem; }
  #main-navigation a, #main-navigation .submenu-toggle { display: block; width: 100%; text-align: left; padding: .3rem 0; }
  #main-navigation > ul > .has-submenu > .submenu-toggle::after { float: right; }
  #main-navigation .submenu { position: static; display: block; min-width: 0; padding: 0 0 0 1rem; background: transparent; box-shadow: none; transform: none; }
  #main-navigation .submenu a { padding: .3rem 0; white-space: normal; font-size: .9rem; }
  #main-navigation .submenu li { border-bottom: 0; }
  .hero-track { aspect-ratio: 1 / 1.05; min-height: 0; }
  .hero-caption { top: 50%; padding: .8rem 2.8rem; font-size: 2.45rem; }
  .hero-arrow { font-size: 3rem; }
  .hero-arrow--prev { left: .4rem; }
  .hero-arrow--next { right: .4rem; }
  .climalit-hero, .page-hero { min-height: 230px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; padding-top: 2.5rem; padding-bottom: 4rem; }
  .catalog-grid p { font-size: 1rem; }
  .intro { padding: 3rem 0 2rem; }
  h1 { font-size: 2.65rem; }
  .story { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 2rem; }
  .story img { max-width: 300px; }
  .institutional { grid-template-columns: 1fr; padding-bottom: 3rem; }
  .faq { padding-bottom: 3rem; }
  .page-content { padding: 3rem 0 4rem; }
  .resource-links, .contact-grid { grid-template-columns: 1fr; }
  .document-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .document-grid--2col .doc-thumb { height: 190px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .contact-grid { gap: 1rem; margin-bottom: 3rem; }
  #site-footer { padding: 3rem 1rem 1rem; }
  .footer-columns { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
  .footer-bottom p span { display: block; margin: .25rem 0 0; }
  .cookie-banner { right: 1rem; bottom: 1rem; width: calc(100% - 2rem); padding: 1.2rem; }
  .cookie-actions { grid-template-columns: 1fr; }
}
