/* ============================================
   COBIJO — SISTEMA DE DISEÑO GLOBAL
   ============================================ */

/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --amarillo-sol:    #F8F031;
  --verde-selva:     #08200E;
  --verde-vivo:      #118D2E;
  --verde-oliva:     #606D56;
  --amarillo-claro:  #FFF5C4;
  --blanco:          #FFFFFF;

  --font-h1:   'Pinyon Script', cursive;
  --font-h2:   'Instrument Serif', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1200px;
  --section-pad: 96px 24px;
  --section-pad-sm: 64px 20px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--verde-selva);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--verde-vivo); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- ACCESIBILIDAD ---- */
*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--amarillo-sol);
  outline-offset: 2px;
  border-radius: 2px;
}
#cobijo-nav *:focus-visible,
.cobijo-footer *:focus-visible,
.hero *:focus-visible,
.bg-selva *:focus-visible {
  outline-color: var(--amarillo-sol);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--amarillo-sol);
  color: var(--verde-selva);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  left: 16px;
  top: 16px;
  outline: 3px solid var(--verde-selva);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- TYPOGRAPHY ---- */
.t-h1 {
  font-family: var(--font-h1);
  font-size: clamp(48px, 7vw, 72px);
  line-height: 1.1;
  font-weight: 400;
  text-wrap: balance;
}
.t-h2 {
  font-family: var(--font-h2);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.2;
  font-weight: 400;
  text-wrap: balance;
}
.t-h3 {
  font-family: var(--font-h2);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.3;
  font-weight: 400;
  text-wrap: balance;
}
.t-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.t-body { font-family: var(--font-body); font-size: 16px; line-height: 1.7; }

/* ---- COLORS ---- */
.bg-selva    { background-color: var(--verde-selva); }
.bg-blanco   { background-color: var(--blanco); }
.bg-claro    { background-color: var(--amarillo-claro); }
.bg-sol      { background-color: var(--amarillo-sol); }
.c-blanco    { color: var(--blanco); }
.c-selva     { color: var(--verde-selva); }
.c-sol       { color: var(--amarillo-sol); }
.c-oliva     { color: var(--verde-oliva); }
.t-label.c-oliva { color: var(--verde-vivo); }
.c-claro     { color: var(--amarillo-claro); }
.c-vivo      { color: var(--verde-vivo); }

/* ---- COOKIE CONSENT BANNER ---- */
#cobijo-consent-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 720px;
  width: calc(100% - 32px);
  background: var(--verde-selva);
  color: rgba(255,255,255,0.92);
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid rgba(248,240,49,0.18);
  box-shadow: 0 16px 48px rgba(8,32,14,0.35);
  z-index: 9999;
  font-family: var(--font-body);
  animation: cobijoConsentIn 0.32s cubic-bezier(.2,.8,.2,1) both;
}
#cobijo-consent-banner.is-hiding {
  animation: cobijoConsentOut 0.28s ease-in both;
}
#cobijo-consent-banner .consent-inner {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
#cobijo-consent-banner .consent-text {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
#cobijo-consent-banner .consent-text a {
  color: var(--amarillo-sol);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cobijo-consent-banner .consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
#cobijo-consent-banner .consent-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
#cobijo-consent-banner .consent-reject {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.25);
}
#cobijo-consent-banner .consent-reject:hover {
  color: var(--blanco);
  border-color: rgba(255,255,255,0.55);
}
#cobijo-consent-banner .consent-accept {
  background: var(--amarillo-sol);
  color: var(--verde-selva);
  font-weight: 600;
}
#cobijo-consent-banner .consent-accept:hover {
  background: var(--verde-vivo);
  color: white;
}
@keyframes cobijoConsentIn {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes cobijoConsentOut {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, 30px); }
}
@media (max-width: 600px) {
  #cobijo-consent-banner {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 16px 18px;
  }
  #cobijo-consent-banner .consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  #cobijo-consent-banner .consent-actions {
    justify-content: flex-end;
  }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--amarillo-sol);
  color: var(--verde-selva);
}
.btn-secondary {
  background: transparent;
  color: var(--verde-vivo);
  border: 2px solid var(--verde-vivo);
}
.btn-selva {
  background: var(--verde-selva);
  color: var(--amarillo-sol);
}
.btn-selva-white {
  background: var(--verde-selva);
  color: var(--blanco);
}
.btn-outline-white {
  background: transparent;
  color: var(--blanco);
  border: 2px solid rgba(255,255,255,0.6);
}

/* ---- LAYOUT HELPERS ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-pad); }
.section-sm { padding: var(--section-pad-sm); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

/* ---- NAVBAR ---- */
#cobijo-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}
#cobijo-nav.scrolled {
  background: var(--verde-selva);
  padding: 12px 32px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
body.nav-open .nav-logo { display: none; }
.nav-logo-img {
  height: 88px;
  width: auto;
  display: block;
}
#cobijo-nav.scrolled .nav-logo-img { height: 72px; }
.footer-logo-img {
  height: 160px;
  width: auto;
  display: block;
  margin-bottom: -24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amarillo-sol); text-decoration: none; }
.nav-links a.active { color: var(--amarillo-sol); }
.nav-cta { padding: 10px 22px; font-size: 13px; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  transition: all 0.3s;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--verde-selva);
  padding: 32px 32px 40px;
  gap: 4px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  padding-top: 120px;
  overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-mobile a:hover { color: var(--amarillo-sol); text-decoration: none; }
.nav-mobile a.active { color: var(--amarillo-sol); }
.nav-mobile-cta {
  margin-top: 12px;
  text-align: center;
  justify-content: center;
}

/* ---- FOOTER ---- */
.cobijo-footer {
  background: var(--verde-selva);
  color: white;
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-wordmark {
  display: block;
  font-family: var(--font-h1);
  font-size: 32px;
  color: var(--blanco);
  line-height: 1;
  margin-bottom: 16px;
}
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 0;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--amarillo-sol); text-decoration: none; }
.footer-tagline-detail {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 380px;
}
.footer-contact-label {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.footer-contact-item a {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact-item a:hover { color: var(--amarillo-sol); text-decoration: none; }
.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}
.footer-social a {
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.footer-social a:hover { border-color: var(--amarillo-sol); background: rgba(248,240,49,0.1); text-decoration: none; }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.08em;
}

/* ---- HERO BASE ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--verde-selva);
  overflow: hidden;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

/* Hero background images por página: desktop por defecto, mobile vía media query.
   Cada página usa una de estas clases en el div .hero-bg-img.
   El navegador solo descarga la imagen del breakpoint activo. */
.hero-bg--servicios { background-image: url('assets/Hero/3.jpg'); }
.hero-bg--portafolio { background-image: url('assets/Hero/4.jpg'); }
.hero-bg--blog { background-image: url('assets/Hero/5.jpg'); }
.hero-bg--contacto { background-image: url('assets/Hero/6.jpg'); }
.hero-bg--sobre-nosotras { background-image: url('assets/Paisajes/2.jpg'); }
@media (max-width: 768px) {
  .hero-bg--servicios { background-image: url('assets/Hero/mobile/3.jpg'); }
  .hero-bg--portafolio { background-image: url('assets/Hero/mobile/4.jpg'); }
  .hero-bg--blog { background-image: url('assets/Hero/mobile/5.jpg'); }
  .hero-bg--contacto { background-image: url('assets/Hero/mobile/6.jpg'); }
  .hero-bg--sobre-nosotras { background-image: url('assets/Paisajes/mobile/2.jpg'); }
}
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--verde-selva);
  opacity: 0.55;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 140px 24px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

/* ---- SECTION DIVIDER ---- */
.divider {
  width: 48px;
  height: 2px;
  background: var(--amarillo-sol);
  margin-bottom: 24px;
}
.divider-center { margin: 0 auto 24px; }

/* ---- PILAR CARDS ---- */
.pilar-icon {
  width: 52px; height: 52px;
  background: var(--amarillo-claro);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}

/* ---- METRIC BADGE ---- */
.metric-badge {
  display: inline-block;
  background: var(--amarillo-sol);
  color: var(--verde-selva);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  letter-spacing: 0.05em;
}

/* ---- CARD BASE ---- */
.card {
  background: white;
  padding: 40px;
  border-top: 3px solid var(--amarillo-sol);
}
.card-shadow { box-shadow: 0 4px 32px rgba(8,32,14,0.08); }

/* ---- ACCORDION ---- */
.accordion-item {
  border-bottom: 1px solid rgba(96,109,86,0.2);
}
.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-h2);
  font-size: 18px;
  color: var(--verde-selva);
  text-align: left;
  gap: 16px;
}
.accordion-trigger:hover { color: var(--verde-vivo); }
.accordion-icon {
  font-size: 20px;
  font-weight: 300;
  color: var(--verde-vivo);
  flex-shrink: 0;
  transition: transform 0.25s;
}
.accordion-trigger.open .accordion-icon { transform: rotate(45deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s;
}
.accordion-body.open {
  max-height: 400px;
  padding-bottom: 20px;
}
.accordion-body p {
  font-size: 15px;
  color: var(--verde-oliva);
  line-height: 1.7;
}

/* ---- BLOG CARD ---- */
.blog-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(96,109,86,0.12);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(8,32,14,0.1);
}
.blog-card-img {
  aspect-ratio: 3/2;
  overflow: hidden;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.blog-card-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verde-vivo);
}
.blog-card-title {
  font-family: var(--font-h2);
  font-size: 20px;
  color: var(--verde-selva);
  line-height: 1.35;
  flex: 1;
  transition: color 0.2s;
}
.blog-card:hover .blog-card-title { color: var(--verde-vivo); }
.blog-card-excerpt {
  font-size: 14px;
  color: var(--verde-oliva);
  line-height: 1.65;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--verde-oliva);
  letter-spacing: 0.06em;
}
.blog-card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--verde-vivo);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.blog-card-link:hover { text-decoration: none; color: var(--verde-selva); }

/* ---- FORM STYLES ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-oliva);
}
.form-input, .form-select, .form-textarea {
  background: white;
  border: 1.5px solid rgba(96,109,86,0.3);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--verde-selva);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--verde-vivo);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --section-pad: 64px 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  /* Footer en móvil: logo arriba full width centrado, páginas + contacto en 2 columnas paralelas centradas debajo */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
    text-align: center;
  }
  .footer-grid > *:first-child { grid-column: 1 / -1; }
  .footer-logo-img { margin: 0 auto; }
  .footer-tagline-detail { margin-left: auto; margin-right: auto; }
  .footer-col ul { align-items: center; }
  .footer-contact-item { align-items: center; }
  .footer-social { justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  #cobijo-nav { padding: 16px 20px; }
  #cobijo-nav.scrolled { padding: 12px 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-cta { display: none; }
  .hero-content { padding: 120px 20px 64px; }
  /* En móvil los heros ocupan exactamente la pantalla visible del celular
     (no más, no menos). 100dvh ajusta cuando aparece/desaparece la barra de Chrome.
     Fallback a 100vh para navegadores que no soportan dvh.
     !important para sobreescribir los min-height inline de cada página. */
  .hero,
  section.hero { min-height: 100vh !important; min-height: 100dvh !important; }

  /* Centrar contenido del hero en móvil */
  .hero-content { text-align: center; }
  .hero-content > * { margin-left: auto !important; margin-right: auto !important; }
  /* Los botones del hero (div con display:flex) necesitan justify-content para centrar */
  .hero-content > div[style*="flex"] { justify-content: center !important; }

  /* Texto del hero más grande en móvil (overriding inline clamp) */
  .hero h1,
  .hero .t-h1 { font-size: clamp(34px, 8vw, 42px) !important; }
  .hero .t-h3 { font-size: clamp(26px, 6.5vw, 32px) !important; }

  /* Centrar eyebrow + título de cada sección (hijos directos de .container) */
  .section > .container > .t-label,
  .section > .container > h1,
  .section > .container > h2,
  .section > .container > .t-h2 {
    text-align: center;
  }
}
