/* ================================================================
   ILC · Propuesta visual estilo RIDEA
   Paleta: verde institucional #2A5C3F · crema #F7F5F0
           blanco #FFFFFF · dorado tierra #B8860B
   Tipografía: Libre Baskerville (serif editorial) + Nunito Sans (UI)
================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --green:       #2A5C3F;
  --green-dark:  #1C3D2A;
  --green-mid:   #3A7A56;
  --green-light: #EBF3EE;
  --gold:        #8A6820;
  --gold-light:  #F5EDD8;
  --cream:       #F7F5F0;
  --white:       #FFFFFF;
  --border:      #DDD8CC;
  --border-lt:   #EDEAE3;
  --text:        #1E1E1E;
  --text-mid:    #444444;
  --text-light:  #767676;
  --serif:       'Libre Baskerville', Georgia, serif;
  --sans:        'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
}

body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================================================
   BARRA INSTITUCIONAL
================================================================ */
.topbar {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  font-family: var(--sans);
  font-size: 0.73rem;
  padding: 0.5rem 0;
  letter-spacing: 0.02em;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar-links {
  display: flex;
  gap: 1.5rem;
}
.topbar-links a {
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}
.topbar-links a:hover { color: #fff; }

/* ================================================================
   CABECERA
================================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; }
.site-logo {
  height: 80px;
  width: auto;
  /* Logo original sobre fondo blanco — sin filtros, se ve tal cual */
}

.search-wrap {
  display: flex;
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}
.search-wrap:focus-within { border-color: var(--green); }
.search-input {
  border: none;
  background: var(--cream);
  padding: 0.55rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  min-width: 200px;
  outline: none;
  color: var(--text);
}
.search-btn {
  border: none;
  background: var(--green);
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--green-dark); }

/* ================================================================
   NAVEGACIÓN PRINCIPAL
================================================================ */
.main-nav {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.nav-list li { position: relative; }
.nav-list li a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 1.05rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-list li a:hover,
.nav-list li a:focus { color: #fff; background: rgba(255,255,255,0.1); }
.arrow-dn { font-size: 0.65rem; opacity: 0.7; }

/* Subnav */
.subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-top: 3px solid var(--green);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  min-width: 230px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 200;
}
.subnav li a {
  color: var(--text-mid) !important;
  background: none !important;
  padding: 0.7rem 1.2rem !important;
  font-size: 0.82rem !important;
  border-bottom: 1px solid var(--border-lt);
}
.subnav li:last-child a { border-bottom: none; }
.subnav li a:hover { color: var(--green) !important; background: var(--green-light) !important; }
.has-sub:hover .subnav { display: block; }

/* ================================================================
   HERO
================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  height: clamp(360px, 50vh, 520px);
  background: var(--green-dark);
}
.hero-img-wrap {
  position: absolute;
  inset: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.8);
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(28,61,42,0.82) 0%,
    rgba(28,61,42,0.4) 60%,
    rgba(28,61,42,0.1) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}
.hero-text { max-width: 580px; color: #fff; }
.hero-pre {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.6rem;
  display: block;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1rem;
}
.hero-sub {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  margin-bottom: 2rem;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ================================================================
   LAYOUT PRINCIPAL: 2 columnas estilo RIDEA
================================================================ */
.main-content { padding: 2.5rem 0 4rem; }
.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 960px) { .main-grid { grid-template-columns: 1fr; } }

/* ================================================================
   BLOQUES COMUNES
================================================================ */
.block { margin-bottom: 2.5rem; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.3rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--green);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.block-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}
.block-more {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.block-more:hover { opacity: 0.7; }

/* BIENVENIDA */
.block-welcome {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--green);
  padding: 2rem;
  margin-bottom: 2.5rem;
}
.block-welcome .block-title {
  font-size: 1.45rem;
  margin-bottom: 1rem;
  color: var(--green-dark);
}
.lead-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.9rem;
}
.block-welcome p {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}
.block-links {
  display: flex;
  gap: 2rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.text-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--green);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.text-link:hover { opacity: 0.7; }

/* ================================================================
   PUBLICACIONES
================================================================ */
.pubs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
@media (max-width: 700px) { .pubs-grid { grid-template-columns: repeat(2, 1fr); } }

.pub-item {
  display: block;
  transition: transform 0.25s;
  background: var(--white);
  border: 1px solid var(--border-lt);
}
.pub-item:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.pub-cover {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.pub-cover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gold);
}
.pc-1 { background: linear-gradient(145deg, #1C3D2A 0%, #2A5C3F 100%); }
.pc-2 { background: linear-gradient(145deg, #2c1a00 0%, #5a3800 100%); }
.pc-3 { background: linear-gradient(145deg, #1a1a2e 0%, #2d2d5a 100%); }
.pc-4 { background: linear-gradient(145deg, #1a0d00 0%, #3d2000 100%); }
.pc-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.pc-tit {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-style: italic;
  color: #fff;
  line-height: 1.3;
}
.pc-yr {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.45);
  font-family: var(--sans);
}
.pub-meta {
  padding: 0.7rem 0.8rem;
}
.pub-meta strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}
.pub-meta span {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ================================================================
   ÁREAS
================================================================ */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
@media (max-width: 600px) { .areas-grid { grid-template-columns: 1fr; } }

.area-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-lt);
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.area-card:hover { box-shadow: 0 6px 20px rgba(42,92,63,0.12); }
.area-img { height: 160px; overflow: hidden; }
.area-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.area-card:hover .area-img img { transform: scale(1.04); }
.area-body {
  padding: 1.2rem;
  border-top: 3px solid var(--green);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.area-body h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.area-body p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 0.8rem;
}
.area-link {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.area-card:hover .area-link { opacity: 0.7; }

/* ================================================================
   NOTICIAS
================================================================ */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex;
  gap: 1.2rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border-lt);
  transition: background 0.15s;
  align-items: flex-start;
}
.news-item:hover { background: var(--green-light); padding-left: 0.5rem; }
.news-item--text { display: block; }
.news-img {
  width: 130px;
  flex-shrink: 0;
  height: 90px;
  overflow: hidden;
}
.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.news-item:hover .news-img img { transform: scale(1.04); }
.news-body { flex: 1; }
.news-body--full { flex: 1; }
.news-cat {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--green);
  color: #fff;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.3rem;
}
.news-date {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 0.35rem;
  margin-left: 0.3rem;
  display: inline-block;
  margin-left: 0.5rem;
}
.news-body h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.news-item:hover .news-body h3 { color: var(--green-dark); }
.news-body p {
  font-size: 0.84rem;
  color: var(--text-mid);
  line-height: 1.55;
}

/* ================================================================
   SIDEBAR
================================================================ */
.side-block {
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.side-block--green { background: var(--green); border-color: var(--green-dark); }

.side-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  background: var(--green);
  border-bottom: 1px solid var(--green-mid);
  flex-wrap: wrap;
  gap: 0.3rem;
}
.side-block-head--light { background: var(--green-dark); }
.side-block-head h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
.side-block-head a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
}
.side-block-head a:hover { color: #fff; }

/* Agenda sidebar */
.agenda-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-lt);
  transition: background 0.15s;
}
.agenda-item:last-child { border-bottom: none; }
.agenda-item:hover { background: var(--green-light); }
.ag-date {
  text-align: center;
  min-width: 44px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-lt);
  padding-right: 1rem;
}
.ag-day {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.ag-month {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.15rem;
}
.ag-tipo {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.2rem;
}
.ag-body h4 {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
  transition: color 0.2s;
}
.agenda-item:hover .ag-body h4 { color: var(--green-dark); }
.ag-body p {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Sede foto */
.sede-foto { position: relative; }
.sede-foto img { width: 100%; height: 150px; object-fit: cover; }
.sede-foto-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(28,61,42,0.82);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.4rem 0.8rem;
  letter-spacing: 0.04em;
}

/* Sedes list */
.sedes-list { padding: 0.5rem 0; }
.sedes-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.2rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-lt);
  transition: background 0.15s, color 0.15s;
}
.sedes-list li:last-child a { border-bottom: none; }
.sedes-list li a:hover { background: var(--green-light); color: var(--green-dark); }
.sedes-list li a span {
  font-size: 0.73rem;
  font-weight: 400;
  color: var(--text-light);
}

/* Servicios institucionales */
.servicios-list { padding: 0.5rem 0; }
.servicios-list li a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.2rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background 0.15s;
}
.servicios-list li:last-child a { border-bottom: none; }
.servicios-list li a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.servicios-list li a svg { opacity: 0.8; flex-shrink: 0; }

/* Redes sociales */
.redes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.red {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid var(--border-lt);
  border-right: 1px solid var(--border-lt);
  transition: opacity 0.2s;
}
.red:hover { opacity: 0.85; }
.red:nth-child(even) { border-right: none; }
.red:nth-last-child(-n+2) { border-bottom: none; }
.facebook  { background: #1877F2; }
.twitter   { background: #1a1a1a; }
.instagram { background: #C13584; }
.youtube   { background: #FF0000; }

/* ================================================================
   FOOTER
================================================================ */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,0.65); }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  padding: 3.5rem 1.5rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; } }

.footer-logo {
  height: 70px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  margin-bottom: 1.2rem;
}
.footer-addr {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.85;
}
.footer-addr a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-addr a:hover { color: #fff; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
@media (max-width: 700px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }

.footer-col h5 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  background: var(--green-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.3);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  .main-nav .nav-list { overflow-x: auto; flex-wrap: nowrap; }
  .main-nav .nav-list li a { white-space: nowrap; }
  .hero-title { font-size: 2rem; }
  .pubs-grid { grid-template-columns: repeat(2, 1fr); }
  .news-img { width: 100px; height: 75px; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-btns { flex-direction: column; }
  .pubs-grid { grid-template-columns: repeat(2, 1fr); }
  .news-item { flex-direction: column; }
  .news-img { width: 100%; height: 160px; }
}
