/* ============================================================
   Uniclima — Footer NATIVO de Astra (#colophon)
   Responsive con icon-circles grandes + accordion exclusivo + active-state rojo.
   ============================================================ */

:root {
  --ucn-red: #C8102E;
  --ucn-red-light: #e41d38;
  --ucn-red-dark: #9c0c24;
  --ucn-red-glow: rgba(200, 16, 46, 0.45);
  --ucn-ease: cubic-bezier(.2,.8,.2,1);
}

/* ── Wrapper ── */
#colophon.site-footer {
  background: #0a0a0a;
  color: #ffffff;
  font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: block;
}
#colophon *, #colophon *::before, #colophon *::after {
  box-sizing: border-box;
}

/* ── Fila primaria (widgets) ── */
#colophon .site-primary-footer-wrap {
  background: #0a0a0a;
  padding: 48px 0 40px;
  display: block;
}
#colophon .ast-builder-grid-row-container-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
#colophon .ast-builder-footer-grid-columns {
  display: grid !important;
  grid-template-columns: 1.3fr 1fr 1fr 0.75fr !important;
  gap: 40px !important;
  align-items: flex-start;
}
@media (min-width: 1280px) {
  #colophon .ast-builder-footer-grid-columns { gap: 56px !important; }
}
#colophon .site-footer-section {
  min-width: 0;
}

/* ── Col 1: logo + contacto con icon-circles GRANDES ── */
#colophon .ucn-colophon__logo-link {
  display: inline-block;
  margin-bottom: 28px;
  transition: transform 180ms var(--ucn-ease);
}
#colophon .ucn-colophon__logo-link:hover {
  transform: scale(1.03);
}
#colophon .ucn-colophon__logo {
  display: block;
  height: auto;
  filter: brightness(0) invert(1);
}
#colophon .ucn-colophon__contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#colophon .ucn-colophon__contact-list li {
  margin: 0;
  padding: 0;
  line-height: 1;
}
#colophon .ucn-colophon__contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #ffffff;
  transition: color 180ms ease;
}
#colophon a.ucn-colophon__contact-item:hover {
  color: #ffffff;
}
#colophon a.ucn-colophon__contact-item:hover .ucn-colophon__icon-circle {
  transform: scale(1.06);
  box-shadow: 0 8px 20px var(--ucn-red-glow), inset 0 1px 0 rgba(255,255,255,.2);
}
#colophon .ucn-colophon__icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e41d38 0%, #C8102E 60%, #9c0c24 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(200,16,46,.3), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform 180ms var(--ucn-ease), box-shadow 180ms ease;
}
#colophon .ucn-colophon__icon-circle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.8;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
#colophon .ucn-colophon__contact-text {
  display: flex;
  flex-direction: column;
}
#colophon .ucn-colophon__contact-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 2px;
}
#colophon .ucn-colophon__contact-value {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

/* ── Headings con barra vertical roja ── */
#colophon .widget-title,
#colophon .widgettitle,
#colophon .ucn-colophon__heading,
#colophon .wp-block-heading,
#colophon h2,
#colophon h3,
#colophon h4 {
  position: relative;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 18px 0;
  padding: 0 0 14px 16px;
  line-height: 1.2;
  transition: color 180ms ease;
}
#colophon .widget-title::before,
#colophon .ucn-colophon__heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 16px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--ucn-red-light), var(--ucn-red));
  box-shadow: 0 0 10px var(--ucn-red-glow);
}
#colophon .widget-title::after,
#colophon .ucn-colophon__heading::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ucn-red) 0%, rgba(200,16,46,0) 100%);
}

/* ── Listas de enlaces ── */
#colophon .ucn-colophon__links,
#colophon .menu,
#colophon ul.wp-block-list,
#colophon ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#colophon .ucn-colophon__links li,
#colophon .menu li {
  margin: 0;
  padding: 0;
}
#colophon a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
  transition: color 160ms ease;
  display: inline-block;
}
#colophon a:hover {
  color: var(--ucn-red-light);
}

/* ── YouTube button ── */
#colophon .ucn-colophon__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e41d38 0%, #C8102E 60%, #9c0c24 100%);
  color: #ffffff;
  text-decoration: none;
  margin-top: 20px;
  box-shadow: 0 6px 16px rgba(200,16,46,.3), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform 180ms var(--ucn-ease), box-shadow 180ms ease;
}
#colophon .ucn-colophon__social:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 24px rgba(200,16,46,.5), inset 0 1px 0 rgba(255,255,255,.2);
  color: #ffffff;
}
#colophon .ucn-colophon__social svg {
  width: 22px;
  height: 22px;
}

/* ── Accordion button (plano en desktop, interactivo en mobile) ── */
#colophon .ucn-colophon__accordion-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: default;
  font-family: inherit;
  text-align: left;
}
#colophon .ucn-colophon__accordion-btn .ucn-colophon__heading {
  margin: 0 0 18px 0;
  flex: 0 0 auto;
  text-align: left;
}
#colophon .ucn-colophon__accordion-line {
  display: none;
}
#colophon .ucn-colophon__chevron {
  display: none;
  flex-shrink: 0;
  color: rgba(255,255,255,0.6);
  transition: transform 200ms var(--ucn-ease), color 200ms ease;
}
#colophon .ucn-colophon__accordion-body {
  display: block;
}

/* ── Fila below (copyright) ── */
/* Copyright strip — sin líneas divisoras, mismo fondo que el resto */
#colophon .site-below-footer-wrap {
  background: #0a0a0a;
  border: none;
  padding: 8px 0 20px;
  display: block;
}
#colophon .site-below-footer-inner-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  border: none;
}
#colophon .ast-footer-copyright {
  display: block;
  border: none;
  margin: 0;
  padding: 0;
}
#colophon .ast-footer-copyright,
#colophon .ast-footer-copyright p {
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  margin: 0;
  text-align: center;
}
#colophon .ast-footer-copyright a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 12.5px;
  font-weight: 400;
}

/* ============================================================
   RESPONSIVE
   ── Large desktop (>=1280px):  4 cols con gap amplio (default)
   ── Desktop (1024-1279px):     4 cols compactos
   ── Tablet (768-1023px):       2 cols (contact full-width + 3 links en 3 cols)
   ── Mobile (<768px):           1 col con accordion exclusivo
   ============================================================ */

/* Desktop estándar */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  #colophon .ast-builder-footer-grid-columns {
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr !important;
    gap: 32px !important;
  }
  #colophon .site-primary-footer-wrap {
    padding: 40px 0 32px;
  }
}

/* Tablet landscape (768-1023px): contacto full-width, 3 link-cols abajo */
@media (min-width: 768px) and (max-width: 1023.98px) {
  #colophon .site-primary-footer-wrap {
    padding: 36px 0 28px;
  }
  #colophon .ast-builder-footer-grid-columns {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 28px !important;
    row-gap: 32px !important;
  }
  #colophon .ucn-colophon__col--contact {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px 40px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  #colophon .ucn-colophon__col--contact .ucn-colophon__logo-link {
    margin-bottom: 0;
  }
  #colophon .ucn-colophon__contact-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px 32px;
  }
  #colophon .ucn-colophon__col--account {
    display: flex;
    flex-direction: column;
  }
}

/* Mobile + accordion (<768px) */
@media (max-width: 767.98px) {
  #colophon .site-primary-footer-wrap {
    padding: 32px 0 20px;
  }
  #colophon .ast-builder-footer-grid-columns {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  #colophon .ucn-colophon__col--contact {
    padding-bottom: 22px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  /* Columnas con accordion */
  #colophon .ucn-colophon__col--links {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0;
  }
  #colophon .ucn-colophon__col--links:first-of-type,
  #colophon .ucn-colophon__col--contact + .ucn-colophon__col--links {
    border-top: none;
  }

  /* Botón accordion: heading + línea flex-grow + chevron */
  #colophon .ucn-colophon__accordion-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 4px;
    cursor: pointer;
    gap: 12px;
    transition: background-color 150ms ease;
  }
  #colophon .ucn-colophon__accordion-btn:hover {
    background-color: rgba(255,255,255,0.02);
  }
  #colophon .ucn-colophon__accordion-btn .ucn-colophon__heading {
    margin: 0;
    padding: 0 0 0 16px;
    flex: 0 0 auto;
    font-size: 12.5px;
    letter-spacing: 0.22em;
    font-weight: 700;
  }
  #colophon .ucn-colophon__accordion-btn .ucn-colophon__heading::after {
    display: none;
  }
  #colophon .ucn-colophon__accordion-btn .ucn-colophon__heading::before {
    top: 0;
    bottom: 0;
    transition: background 180ms ease, box-shadow 180ms ease;
  }

  /* Línea estética hasta la flecha */
  #colophon .ucn-colophon__accordion-line {
    display: block;
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 0 10px;
    transition: background 180ms ease;
  }

  /* Chevron visible */
  #colophon .ucn-colophon__chevron {
    display: inline-block;
    flex-shrink: 0;
    color: rgba(255,255,255,0.5);
    stroke-width: 2.8;
  }

  /* ── ACTIVE STATE (aria-expanded=true → todo rojo) ── */
  #colophon .ucn-colophon__accordion-btn[aria-expanded="true"] .ucn-colophon__heading {
    color: var(--ucn-red-light);
  }
  #colophon .ucn-colophon__accordion-btn[aria-expanded="true"] .ucn-colophon__heading::before {
    background: linear-gradient(180deg, var(--ucn-red-light), var(--ucn-red-light));
    box-shadow: 0 0 14px var(--ucn-red-glow);
  }
  #colophon .ucn-colophon__accordion-btn[aria-expanded="true"] .ucn-colophon__accordion-line {
    background: rgba(228,29,56,0.55);
  }
  #colophon .ucn-colophon__accordion-btn[aria-expanded="true"] .ucn-colophon__chevron {
    transform: rotate(180deg);
    color: var(--ucn-red-light);
  }

  /* Body collapse animation — más rápida y fluida */
  #colophon .ucn-colophon__accordion-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms var(--ucn-ease);
    overflow: hidden;
  }
  #colophon .ucn-colophon__accordion-body.is-open {
    grid-template-rows: 1fr;
  }
  #colophon .ucn-colophon__accordion-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 16px;
    transition: padding 220ms ease;
  }
  #colophon .ucn-colophon__accordion-body.is-open .ucn-colophon__accordion-inner {
    padding: 4px 16px 18px;
  }
  #colophon .ucn-colophon__accordion-inner > ul {
    gap: 12px;
  }

  /* YouTube en col Cuenta: mantener visible fuera del accordion */
  #colophon .ucn-colophon__col--account .ucn-colophon__social {
    margin: 14px 0 4px 16px;
  }
}

/* Mobile pequeño — contacto compacto */
@media (max-width: 640px) {
  #colophon .ast-builder-grid-row-container-inner {
    padding: 0 16px;
  }
  #colophon .ucn-colophon__icon-circle {
    width: 44px;
    height: 44px;
  }
  #colophon .ucn-colophon__icon-circle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.8;
  }
  #colophon .ucn-colophon__contact-value {
    font-size: 14.5px;
  }
  #colophon .site-below-footer-inner-wrap {
    padding: 0 16px;
  }
  #colophon .ast-footer-copyright p {
    font-size: 12px;
  }
}
