/*
Theme Name: Fundación CIAC
Theme URI: https://www.fciac.es
Author: Fundación CIAC
Description: Tema corporativo para el Centro de Innovación Andaluz para la Construcción Sostenible.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: fciac
*/

:root {
  --ink: #0f172a;
  --muted: #526174;
  --line: #dbe3e8;
  --paper: #ffffff;
  --soft: #f4f7f7;
  --teal: #0f4c4b;
  --teal-dark: #082f34;
  --lime: #c5ee63;
  --radius: 1.6rem;
  --shadow: 0 24px 60px rgba(15, 23, 42, .12);
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.75; }
.container { width: min(calc(100% - 2.5rem), var(--content)); margin-inline: auto; }
.eyebrow {
  margin: 0;
  color: #176c68;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.section-title {
  max-width: 760px;
  margin: .9rem 0 0;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.03;
  letter-spacing: -.04em;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .85rem 1.25rem;
  border-radius: 999px;
  background: var(--teal-dark);
  color: white;
  font-size: .9rem;
  font-weight: 800;
  transition: transform .2s, background .2s;
}
.button:hover { background: var(--teal); transform: translateY(-2px); }
.button--lime { background: var(--lime); color: var(--teal-dark); }
.button--lime:hover { background: #d8f690; }

.topbar { background: #071a22; color: #c9d7dc; font-size: .75rem; }
.topbar__inner { display: flex; justify-content: flex-end; gap: 1.5rem; padding-block: .55rem; }
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(219, 227, 232, .9);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.site-header__inner { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; }
.brand__mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--teal-dark);
  border-radius: 50%;
  color: var(--teal-dark);
  font-weight: 900;
}
.brand__name { display: block; font-size: 1.15rem; font-weight: 900; line-height: 1; }
.brand__tag { display: block; margin-top: .35rem; color: #64748b; font-size: .6rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.custom-logo { max-width: 180px; max-height: 58px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.55rem; }
.nav a { font-size: .86rem; font-weight: 800; color: #334155; }
.nav a:hover, .nav .current-menu-item > a { color: var(--teal); }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 50%; width: 44px; height: 44px; background: white; font-size: 1.15rem; cursor: pointer; }

.hero {
  position: relative;
  display: flex;
  min-height: 76vh;
  align-items: flex-end;
  overflow: hidden;
  background: #071a22;
  color: white;
}
.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(7,26,34,.96), rgba(7,26,34,.68) 58%, rgba(7,26,34,.25)), url("assets/ciac-hero.jpg") center 48% / cover;
}
.hero__inner { position: relative; padding-block: clamp(5rem, 10vw, 8rem); }
.hero .eyebrow { color: var(--lime); }
.hero h1 {
  max-width: 980px;
  margin: 1.25rem 0 0;
  font-family: Georgia, serif;
  font-size: clamp(3.4rem, 8.5vw, 7.4rem);
  line-height: .9;
  letter-spacing: -.055em;
}
.hero__bottom { display: flex; max-width: 920px; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.28); }
.hero__bottom p { max-width: 620px; margin: 0; color: #d8e4e7; font-size: 1.1rem; }
.stats { background: var(--lime); color: var(--teal-dark); }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-block: 2rem; }
.stat { padding-left: 1.15rem; border-left: 1px solid rgba(8,47,52,.25); }
.stat strong { display: block; font-size: 2.4rem; line-height: 1; }
.stat span { display: block; margin-top: .4rem; font-size: .82rem; font-weight: 800; opacity: .72; }

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section--soft { background: var(--soft); }
.section--dark { background: var(--teal-dark); color: white; }
.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 5rem; align-items: center; }
.intro-copy { color: var(--muted); font-size: 1.08rem; }
.intro-copy .text-link { color: var(--teal); font-weight: 900; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 3rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.service-card { min-height: 280px; padding: 2rem; background: white; transition: background .25s, color .25s; }
.service-card:hover { background: var(--teal-dark); color: white; }
.service-card__number { color: #a7b3c0; font-size: .72rem; font-weight: 900; letter-spacing: .18em; }
.service-card h3 { margin: 4.5rem 0 .75rem; font-size: 1.45rem; }
.service-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.service-card:hover p { color: #c7dcdd; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.project-card { min-height: 235px; padding: 1.7rem; border: 1px solid rgba(255,255,255,.12); border-radius: 1.2rem; background: rgba(255,255,255,.045); }
.project-card strong { color: var(--lime); }
.project-card p { color: #c5d9da; font-size: .9rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 3rem; }
.news-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 12px 35px rgba(15,23,42,.05); }
.news-card__image { aspect-ratio: 16/10; overflow: hidden; background: var(--teal-dark); }
.news-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .news-card__image img { transform: scale(1.04); }
.news-card__body { padding: 1.5rem; }
.news-card__date { color: var(--teal); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.news-card h2, .news-card h3 { margin: .85rem 0; font-size: 1.25rem; line-height: 1.2; }
.news-card p { color: var(--muted); font-size: .92rem; }
.empty-state { margin-top: 3rem; padding: 3rem; border: 1px dashed #acbac3; border-radius: var(--radius); background: var(--soft); text-align: center; }
.cta { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: clamp(2rem, 6vw, 4rem); border-radius: 2rem; background: var(--lime); color: var(--teal-dark); }
.cta h2 { max-width: 760px; margin: .8rem 0 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.04em; }

.page-hero { overflow: hidden; background: var(--teal-dark); color: white; }
.page-hero__inner { padding-block: clamp(4.5rem, 9vw, 7rem); background: radial-gradient(circle at 78% 20%, rgba(197,238,99,.16), transparent 32%); }
.page-hero .eyebrow { color: var(--lime); }
.page-hero h1 { max-width: 900px; margin: 1rem 0; font-family: Georgia, serif; font-size: clamp(3rem, 7vw, 5.6rem); line-height: .96; letter-spacing: -.045em; }
.page-hero p:last-child { max-width: 760px; color: #d0e0e1; font-size: 1.12rem; }
.content-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 4rem; }
.content-prose { color: var(--muted); font-size: 1.04rem; }
.check-list { display: grid; gap: .8rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 1rem 1rem 1rem 3.2rem; border: 1px solid var(--line); border-radius: 1rem; color: #334155; line-height: 1.55; }
.check-list li::before { position: absolute; left: 1rem; top: 1rem; display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 50%; background: var(--teal-dark); color: var(--lime); content: "✓"; font-size: .75rem; font-weight: 900; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-card { padding: 2rem; border-radius: var(--radius); background: var(--soft); }
.contact-row { display: block; margin-top: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: white; font-weight: 800; }
.legal-section { padding-block: 2rem; border-bottom: 1px solid var(--line); }
.legal-section h2 { font-size: 1.5rem; }
.legal-section p { color: var(--muted); }

.article-header { padding-block: clamp(4rem, 8vw, 7rem); background: var(--teal-dark); color: white; }
.article-header h1 { max-width: 950px; margin: 1rem 0; font-family: Georgia, serif; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; letter-spacing: -.045em; }
.article-header__date { color: var(--lime); font-size: .75rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.article-image { width: min(calc(100% - 2.5rem), var(--content)); max-height: 650px; margin: 0 auto; object-fit: cover; border-radius: 0 0 var(--radius) var(--radius); }
.article-content { width: min(calc(100% - 2.5rem), 760px); margin: 0 auto; padding-block: 4rem 6rem; }
.article-content > * { max-width: 100%; }
.article-content p, .article-content li { color: var(--muted); font-size: 1.08rem; line-height: 1.9; }
.article-content h2 { margin-top: 2.5rem; font-size: 2rem; }

.site-footer { background: #071a22; color: #bed0d5; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 4rem; padding-block: 4rem; }
.site-footer .brand__mark { border-color: var(--lime); color: var(--lime); }
.site-footer .brand__name { color: white; }
.site-footer h2 { color: var(--lime); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.site-footer ul { margin: 1.2rem 0 0; padding: 0; list-style: none; }
.site-footer li { margin-top: .75rem; font-size: .86rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; padding-block: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); color: #8399a0; font-size: .75rem; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; gap: .5rem; }
.pagination a, .pagination span { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: .6rem; }
.pagination .current { background: var(--teal-dark); color: white; }

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .topbar { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .nav { position: absolute; left: 1.25rem; right: 1.25rem; top: calc(100% + .5rem); display: none; flex-direction: column; align-items: stretch; gap: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav a { display: block; padding: .8rem; }
  .site-header .button { display: none; }
  .intro-grid, .content-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-grid, .project-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .hero { min-height: 72vh; }
  .hero__bottom, .cta, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .stats__grid, .service-grid, .project-grid, .news-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.7rem); }
}
