/*
Theme Name:   CESA-GT Theme
Theme URI:    https://www.cesa-gt.com
Description:  Tema oficial de CESA-GT — Centro de Estudios para la Sostenibilidad Ambiental
Author:       CESA-GT
Author URI:   https://www.cesa-gt.com
Template:     hello-elementor
Version:      1.0.0
Text Domain:  cesa-gt-theme
*/

/* =========================================================
   VARIABLES GLOBALES — Paleta CESA-GT
   ========================================================= */
:root {
  --sd: #1C2B3A;
  --sm: #2E4A62;
  --sl: #4A6B84;
  --sg: #8A9BAA;
  --c:  #1A1916;
  --g:  #3C3830;
  --ge: #6B6558;
  --gs: #9E9890;
  --w:  #FFFFFF;
  --cr: #F5F3EF;
  --li: #EAE8E2;
  --si: #C8C2B8;
  --gb: #E8F0F5;
}

/* =========================================================
   FIX CRÍTICO: Elementor — eliminar restricción de ancho
   Los contenedores de Elementor limitan el ancho a 1140px.
   Este bloque los anula para que el contenido CESA sea
   siempre full-width (bordes a bordes del navegador).
   ========================================================= */

/* Contenedor boxed de Elementor Flex (versión nueva) */
.cesa-main .e-con-boxed,
.cesa-main .elementor.e-con-boxed,
.cesa-main .e-con.e-con-boxed {
  --container-max-width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  width: 100% !important;
}

.cesa-main .e-con-inner {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Widget HTML de Elementor */
.cesa-main .elementor-widget-container {
  padding: 0 !important;
}

/* Contenedores clásicos de Elementor (versión antigua) */
.cesa-main .elementor-section-boxed > .elementor-container {
  max-width: 100% !important;
}

.cesa-main .elementor-section {
  padding: 0 !important;
}

/* Asegurarse de que el div raíz de Elementor ocupe todo el ancho */
.cesa-main .elementor {
  width: 100% !important;
}

/* =========================================================
   RESET BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Jost', system-ui, sans-serif;
  color: var(--c);
  background: var(--w);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  transition: color .2s;
}

/* =========================================================
   CONTENEDOR CENTRAL
   ========================================================= */
.cx {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================================
   BOTONES GLOBALES
   ========================================================= */
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sm);
  color: var(--w) !important;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 15px 30px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.btn-p:hover { background: #3d6080; }

.btn-s {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--cr) !important;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 30px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.2);
  transition: border-color .2s;
}
.btn-s:hover {
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.07);
}

/* =========================================================
   NAVEGACIÓN — NAV CESA
   ========================================================= */
.cesa-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(28,43,58,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.cesa-nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cesa-nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cesa-nav__logo-svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.cesa-nav__logo-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cr);
}

.cesa-nav__logo-tagline {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--sg);
}

.cesa-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cesa-nav__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--sg);
  letter-spacing: .03em;
}

.cesa-nav__links a:hover {
  color: var(--cr);
}

.cesa-nav__cta {
  background: var(--sm) !important;
  color: var(--w) !important;
  padding: 9px 20px !important;
  border-radius: 4px;
}

.cesa-nav__cta:hover {
  background: #3d6080 !important;
}

/* Hamburger móvil */
.cesa-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.cesa-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sg);
  border-radius: 2px;
  transition: all .25s;
}

.cesa-nav__mobile {
  display: none;
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  background: rgba(28,43,58,.99);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}

.cesa-nav__mobile.is-open {
  display: flex;
}

.cesa-nav__mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--sg);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: block;
}

.cesa-nav__mobile a:last-child { border-bottom: none; }
.cesa-nav__mobile a:hover { color: var(--cr); }

.cesa-nav__mobile .cesa-nav__cta {
  margin-top: 8px;
  text-align: center;
  border-radius: 4px;
  border-bottom: none !important;
}

/* =========================================================
   FOOTER CESA
   ========================================================= */
.cesa-footer {
  background: #111820;
  padding: 56px 0 30px;
}

.cesa-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 44px;
}

.cesa-footer__brand-logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cr);
  margin-bottom: 14px;
  display: block;
}

.cesa-footer__brand p {
  font-size: 14px;
  font-weight: 300;
  color: var(--sg);
  line-height: 1.7;
  max-width: 270px;
  margin: 0;
}

.cesa-footer__col h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cr);
  margin: 0 0 16px;
}

.cesa-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cesa-footer__col ul a {
  font-size: 13px;
  font-weight: 300;
  color: var(--sg);
  transition: color .2s;
}

.cesa-footer__col ul a:hover { color: var(--cr); }

.cesa-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.cesa-footer__bottom p {
  font-size: 12px;
  font-weight: 300;
  color: #555;
  margin: 0;
}

/* =========================================================
   LAYOUT DE CONTENIDO (páginas y posts)
   ========================================================= */
.cesa-main {
  min-height: 60vh;
}

/* =========================================================
   BLOG — Estilos para posts y archivo
   ========================================================= */
.cesa-blog-header {
  background: var(--sd);
  padding: 72px 0 56px;
}

.cesa-blog-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  color: var(--w);
  letter-spacing: -.02em;
  margin: 0 0 10px;
}

.cesa-blog-header p {
  font-size: 16px;
  font-weight: 300;
  color: var(--sg);
  margin: 0;
}

.cesa-blog-grid {
  padding: 60px 0 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cesa-post-card {
  border: 1px solid var(--li);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s;
  background: var(--w);
}

.cesa-post-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.cesa-post-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.cesa-post-card__body {
  padding: 22px 24px 26px;
}

.cesa-post-card__cat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sl);
  margin-bottom: 8px;
}

.cesa-post-card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--sd);
  line-height: 1.25;
  margin: 0 0 10px;
}

.cesa-post-card__title a {
  color: inherit;
}

.cesa-post-card__title a:hover { color: var(--sm); }

.cesa-post-card__excerpt {
  font-size: 14px;
  font-weight: 300;
  color: var(--ge);
  line-height: 1.65;
  margin: 0 0 16px;
}

.cesa-post-card__meta {
  font-size: 11px;
  color: var(--gs);
  letter-spacing: .04em;
}

/* Single post */
.cesa-single {
  padding: 60px 0 80px;
}

.cesa-single__inner {
  max-width: 720px;
  margin: 0 auto;
}

.cesa-single__cat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sl);
  margin-bottom: 14px;
}

.cesa-single h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  color: var(--sd);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 18px;
}

.cesa-single__meta {
  font-size: 13px;
  color: var(--gs);
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--li);
}

.cesa-single .entry-content {
  font-size: 17px;
  font-weight: 300;
  color: var(--g);
  line-height: 1.78;
}

.cesa-single .entry-content h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--sd);
  margin: 40px 0 16px;
  letter-spacing: -.015em;
}

.cesa-single .entry-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--sd);
  margin: 32px 0 12px;
}

.cesa-single .entry-content p { margin: 0 0 20px; }

.cesa-single .entry-content ul,
.cesa-single .entry-content ol {
  margin: 0 0 20px 24px;
}

.cesa-single .entry-content li { margin-bottom: 8px; }

.cesa-single .entry-content a {
  color: var(--sm);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cesa-single .entry-content img {
  width: 100%;
  border-radius: 8px;
  margin: 32px 0;
}

.cesa-single .entry-content blockquote {
  border-left: 3px solid var(--sm);
  padding: 12px 20px;
  margin: 28px 0;
  background: var(--cr);
  border-radius: 0 6px 6px 0;
  font-style: normal;
  color: var(--sd);
  font-weight: 400;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .cesa-nav__links { display: none; }
  .cesa-nav__hamburger { display: flex; }
  .cesa-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cesa-blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .cx { padding: 0 20px; }
  .cesa-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cesa-blog-grid { grid-template-columns: 1fr; }
  .cesa-nav__inner { padding: 0 20px; }
}
