:root {
  /* Reduce tipografía global ~20% (afecta a unidades rem). */
  font-size: 80%;
  --header-height: 7rem;
  /* altura aproximada del header sticky */
  --page-top-overlap: 0.8rem;
  /* solapa el main bajo el header para que los fondos se toquen */
  --footer-min-height: 18rem;
  /* altura minima del footer */

  /* Hero (logo): control de animación */
  --hero-logo-offset-desktop: 0rem;
  --hero-logo-float-desktop: 4.5rem;
  --hero-logo-gap-desktop: 1rem;
  --hero-logo-offset-mobile: -2rem;
  --hero-logo-float-mobile: 3rem;
  --hero-logo-gap-mobile: 3rem;
  --hero-logo-float-duration: 10s;

  /* Hero: separación del conjunto (logo+título) respecto al footer */
  --hero-to-footer-gap-desktop: 6rem;
  --hero-to-footer-gap-mobile: 3.5rem;
  --hero-to-footer-gap: 1rem;

  /* Hero: tamaños (logo y tipografías) */
  --hero-logo-size-desktop: 24rem;
  --hero-logo-size-mobile: 16rem;
  --hero-logo-size: var(--hero-logo-size-desktop);

  --hero-desc-font-size-desktop: 1.5rem;
  --hero-desc-font-size-mobile: 0.7rem;
  --hero-desc-font-size: var(--hero-desc-font-size-desktop);

  /* Colores claros con buen contraste */
  --color-bg-deep: #f0f4f8;
  --color-bg-dark: #f8fafc;
  --color-bg-mid: #ffffff;
  --color-bg-soft: #e8f0f7;
  --color-panel: rgba(255, 255, 255, 0.95);
  --color-panel-alt: rgba(248, 250, 252, 0.92);
  --color-border: rgba(100, 116, 139, 0.2);
  --color-text-base: #1e293b;
  --color-text-soft: #475569;
  --color-accent-warm: #f97316;
  --color-accent-bright: #fbbf24;
  --color-accent-cool: #0ea5e9;

  /* Transiciones consistentes */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Sombras para tema claro */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 25px 45px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 32px 58px rgba(0, 0, 0, 0.12);
}

/* AMPA.css: Estilos principales para la web del AMPA Julian Nieto Tapia */
body {
  background: linear-gradient(150deg, #f0f9ff 0%, #e0f2fe 60%, #dbeafe 100%);
  background-attachment: fixed;
  color: var(--color-text-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
}

main.page-content {
  background: linear-gradient(150deg, #f0f9ff 0%, #e0f2fe 60%, #dbeafe 100%);
  flex: 1 1 auto;
  /* ocupa el espacio disponible entre header y footer */
  display: flex;
  flex-direction: column;
  margin-top: calc(-1 * var(--page-top-overlap));
  padding-top: 0;
  min-height: 0;
  /* permite que los hijos flex ajusten su altura sin forzar scroll extra */
}

body.home-page {
  --page-top-overlap: 0rem;
  /* Fondo home: escritorio ajusta al ancho; móvil ajusta al alto */
  --home-bg-image-size: 100% auto;
  /* y=100% => anclado abajo: si falta alto, se recorta por arriba */
  --home-bg-y: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.1)),
    url('../images/current/Fondo Pagina Principal.png');
  /* Capa 1 (gradiente): auto | Capa 2 (imagen): controlada por variable */
  background-size: auto, var(--home-bg-image-size);
  background-repeat: no-repeat, no-repeat;
  background-position: center center, 50% var(--home-bg-y);
  background-attachment: scroll, fixed;
  animation: home-bg-pan 18s ease-in-out infinite alternate;
  margin: 0;
}

@media (max-width: 768px) {
  body.home-page {
    /* En móvil: ajusta al alto (sin recorte vertical) */
    --home-bg-image-size: auto 100%;
    /* Mantener el encuadre y la animación como antes */
    --home-bg-y: 45%;
  }
}

@keyframes home-bg-pan {
  0% {
    background-position: center center, 15% var(--home-bg-y);
  }
  100% {
    background-position: center center, 100% var(--home-bg-y);
  }
}

.home-page main.page-content {
  background: transparent;
}

.gradient-bg {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 55%, rgba(240, 244, 248, 0.85) 100%);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

.card-hover {
  transition: all var(--transition-normal);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.text-gradient {
  background: linear-gradient(145deg, var(--color-accent-bright), var(--color-accent-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ---------- Ajustes responsive adicionales ---------- */
* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

.header-fixed,
.container-nav,
.page-content,
.news-section,
footer {
  max-width: 100vw;
}

@media (max-width: 1024px) {
  .container-nav {
    padding: 0.75rem 1rem;
  }

  .header-flex {
    gap: 0.75rem;
  }

  .nav-desktop {
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    font-size: 12px;
    --hero-to-footer-gap: var(--hero-to-footer-gap-mobile);
    --hero-logo-size: var(--hero-logo-size-mobile);
    --hero-title-font-size: var(--hero-title-font-size-mobile);
    --hero-desc-font-size: var(--hero-desc-font-size-mobile);
  }

  .container-nav {
    padding: 0.65rem 1rem;
    width: 100%;
  }

  .buscador-desktop {
    display: none;
  }

  .nav-desktop {
    display: none;
  }

  .nav-auth {
    display: none;
  }

  .menu-mobile-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }

  /* En algunos Android el SVG no se renderiza; usamos el icono CSS. */
  .menu-mobile-icon {
    display: none;
  }

  .mobile-menu {
    width: 100%;
    left: 0;
    right: 0;
  }

  .header-flex {
    align-items: center;
  }

  .header-logo-group {
    gap: 0.35rem;
  }

  .header-title-ampa {
    font-size: 0.8rem;
  }

  .header-title-colegio {
    font-size: 0.72rem;
  }

  /* Hero y secciones principales */
  .hero,
  .hero-section,
  .news-section,
  .page-content {
    padding-inline: auto;
  }

  .hero {
    text-align: center;
  }

  .hero-grid,
  .hero-content {
    grid-template-columns: 1fr !important;
  }

  .hero-cta,
  .hero-buttons {
    justify-content: center;
  }

  /* Tarjetas y rejillas */
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .site-footer {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.nav-link {
  transition: all var(--transition-normal);
}

.nav-link.nav-link--with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  background: rgb(255, 0, 0);
  color: #ffffff;
  border: 1px solid rgba(66, 0, 0, 0.877);
}

.nav-link:hover {
  color: var(--color-accent-warm);
  transform: translateY(-2px);
}

.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(-40px);
  }

  50% {
    transform: translateY(-80px);
  }
}

@keyframes float-mobile {

  0%,
  100% {
    transform: translateY(-3.5rem);
  }

  50% {
    transform: translateY(-2.5rem);
  }
}

/* Hero logo: animación para escritorio */
@keyframes hero-logo-float-desktop {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(calc(-1 * var(--hero-logo-float-desktop, 1.5rem)));
  }
}

/* Hero logo: animación para móvil */
@keyframes hero-logo-float-mobile {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(calc(-1 * var(--hero-logo-float-mobile, 1rem)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-floating {
    animation: none;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header y navegacion principal */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-fixed.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.container-nav {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.85rem 1rem;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeDown 0.7s cubic-bezier(.4, 0, .2, 1);
}

.header-logo-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-bg {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.logo-bg:hover {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
}

.logo-img {
  object-fit: contain;
  width: 4rem;
  height: 4rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-title-ampa {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1e293b;
}

@media (min-width: 768px) {
  .header-title-ampa {
    font-size: 1.44rem;
  }
}

.header-title-colegio {
  font-size: 0.84rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.1em;
  white-space: nowrap;
}

.buscador-desktop {
  display: none;
}

.nav-desktop {
  display: none;
}

.menu-mobile-btn {
  background: none;
  border: none;
  color: #1e293b;
  cursor: pointer;
  display: block;
  border-radius: 0.5rem;
  padding: 0.5rem;
  transition: background var(--transition-normal);
}

.menu-mobile-bars {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  position: relative;
  display: block;
  font-size: 0; /* si el CSS no carga, el span muestra '☰' como fallback */
  line-height: 0;
  overflow: visible;
}

.menu-mobile-bars::before,
.menu-mobile-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.menu-mobile-bars::before {
  top: -6px;
}

.menu-mobile-bars::after {
  top: 6px;
}

.menu-mobile-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.menu-mobile-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-menu {
  display: none;
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-top: 1px solid rgba(100, 116, 139, 0.15);
  animation: fadeDown 0.4s cubic-bezier(.4, 0, .2, 1);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 0 0 1rem 1rem;
  box-shadow: none;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
}

.mobile-menu-links a {
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu-links a:hover {
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #ffffff;
}

@media (min-width: 768px) {
  .buscador-desktop {
    display: block;
    margin-left: 2rem;
  }

  .nav-desktop {
    display: flex;
    gap: 1rem;
  }

  .menu-mobile-btn {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}

.buscador-input {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  color: var(--color-text-base);
  border: 1px solid rgba(100, 116, 139, 0.2);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.buscador-input:focus {
  border-color: var(--color-accent-warm);
  box-shadow: 0 0 0 2px rgba(255, 138, 76, 0.35);
}

/* Ajuste para que el logotipo en el hero tenga mas margen superior en movil y no se corte con el menu */
@media (max-width: 768px) {
  #inicio .floating.mb-8 {
    margin-top: 7rem;
  }

  #inicio .w-64.h-64 {
    margin-top: 7rem;
  }
}

@media (max-width: 480px) {
  #inicio .floating.mb-8 {
    margin-top: 9rem;
  }

  #inicio .w-64.h-64 {
    margin-top: 9rem;
  }
}

/* Ajuste para que el desplazamiento ancle las secciones por debajo del header fijo */
section[id] {
  scroll-margin-top: 0 !important;
}

@media (max-width: 768px) {
  section[id] {
    scroll-margin-top: 7.5rem;
  }
}

@media (max-width: 480px) {
  section[id] {
    scroll-margin-top: 9.5rem;
  }
}

/* Mobile menu: oculto por defecto y visible solo cuando se abre */
#mobile-menu {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#mobile-menu.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.menu-open {
  overflow: hidden;
}

/* En móvil el menú puede ser más alto que la pantalla: hacerlo scrollable sin “cortar” el header. */
@media (max-width: 768px) {
  #mobile-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    max-height: calc(100vh - (var(--header-height) + env(safe-area-inset-top, 0px)));
    max-height: calc(100dvh - (var(--header-height) + env(safe-area-inset-top, 0px)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1150;
    margin-top: 0;
  }
}

/* HERO SECTION */
.hero-section {
  flex: 1 1 auto;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding-bottom: var(--hero-to-footer-gap, 0rem);
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-container {
  max-width: 100%;
  margin: 0px auto;
  padding: 0rem;
  text-align: center;
  position: relative;
  z-index: 10;
  min-height: min(72vh, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.hero-logo-floating {
  margin-top: var(--hero-logo-offset-desktop, 0.5rem);
  margin-bottom: var(--hero-logo-gap-desktop, 1rem);
  animation-name: hero-logo-float-desktop;
  animation-duration: var(--hero-logo-float-duration, 6s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  max-height: calc(60vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-logo-bg {
  width: 19rem;
  height: 19rem;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
  isolation: isolate;
  border-radius: 3.5rem;
  background: transparent;
  box-shadow: none;
}

.hero-logo-img {
  border-radius: 3rem;
  background: transparent;
  object-fit: contain;
  width: var(--hero-logo-size, 12rem);
  height: var(--hero-logo-size, 12rem);
  filter:
    drop-shadow( 2px  0px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(-2px  0px 0 rgba(255, 255, 255, 0.95))
    drop-shadow( 0px  2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow( 0px -2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow( 2px  2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow( 2px -2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(-2px  2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(-2px -2px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.65))
    drop-shadow(0 0 44px rgba(255, 255, 255, 0.40));
  position: relative;
  z-index: 1;
  box-shadow: none;
}

.hero-logo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: none;
  filter: none;
  z-index: 0;
  pointer-events: none;
}

.hero-title {
  padding: 0rem 0.5rem;
  border-radius: 5rem;
  background: transparent;
  font-size: var(--hero-title-font-size, 1.28rem);
  font-weight: bold;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  color: #1e293b;
  position: relative;
  isolation: isolate;
  box-shadow: none;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(255, 255, 255, 0.80),
    0 0 28px rgba(255, 255, 255, 0.55),
    0 0 60px rgba(255, 255, 255, 0.35);
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.95);
}

.hero-title .text-gradient {
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(255, 255, 255, 0.80),
    0 0 28px rgba(255, 255, 255, 0.55),
    0 0 60px rgba(255, 255, 255, 0.35);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.907);
  paint-order: stroke fill;
}

.hero-desc {
  display: inline-block;
  padding: 0.5rem 2rem;
  border-radius: var(--radius-full, 9999px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #1e293b;
  max-width: 900px;
  margin-inline: auto;
  margin-top: 0;
  margin-bottom: 1rem;
  position: relative;
  isolation: isolate;
  box-shadow: 
    0 0 30px 10px rgba(255, 255, 255, 0.9),
    0 0 10px 2px rgba(255, 255, 255, 0.5);
  text-shadow: none;
  -webkit-text-stroke: 0;
  font-size: var(--hero-desc-font-size, 0.7rem);
  border: none;
}

.hero-btns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-btns {
    flex-direction: row;
  }
}

.btn-primary {
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-weight: 600;
  transition: background 0.3s;
  border: none;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 12px 32px rgba(255, 138, 76, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--color-accent-warm), var(--color-accent-bright));
  box-shadow: 0 16px 40px rgba(255, 138, 76, 0.45);
}

.btn-outline {
  border: 2px solid var(--color-accent-warm);
  color: var(--color-accent-warm);
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--color-accent-warm);
  color: #0b1526;
  box-shadow: 0 12px 32px rgba(255, 138, 76, 0.35);
}

.hero-floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.hero-shape {
  position: absolute;
  width: var(--hero-shape-base, 5rem);
  height: var(--hero-shape-base, 5rem);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  --hero-shadow: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  filter: var(--hero-shadow) blur(0px);
  transform: translate(-50%, -50%);
  opacity: 1;
  visibility: hidden;
  animation: rise var(--hero-duration, 12s) ease-in-out infinite;
  animation-delay: var(--hero-delay, 0s);
  will-change: transform, opacity, filter;
}

.hero-shape.ready {
  opacity: 1;
  visibility: visible;
}

.hero-shape--orange {
  background-image: url('../images/current/Globo_shape_Naranja.png');
}

.hero-shape--green {
  background-image: url('../images/current/Globo_shape_Verde.png');
}

@keyframes rise {
  0% {
    top: var(--hero-start-top, 110%);
    opacity: 1;
    filter: var(--hero-shadow) blur(0px);
  }

  25% {
    filter: var(--hero-shadow) blur(0px);
    opacity: 1;
  }

  40% {
    filter: var(--hero-shadow) blur(4px);
    opacity: 0.75;
  }

  55% {
    filter: var(--hero-shadow) blur(8px);
    opacity: 0.35;
  }

  65% {
    filter: var(--hero-shadow) blur(12px);
    opacity: 0.1;
  }

  70% {
    filter: var(--hero-shadow) blur(14px);
    opacity: 0;
  }

  100% {
    top: var(--hero-end-top, -120%);
    filter: var(--hero-shadow) blur(12px);
    opacity: 0;
  }
}

@media (max-width: 768px) {

  .hero-logo-floating {
    margin-top: var(--hero-logo-offset-mobile, 0.5rem);
    margin-bottom: var(--hero-logo-gap-mobile, 1rem);
    animation-name: hero-logo-float-mobile;
  }

  .hero-logo-bg {
    margin-top: 0;
    width: clamp(9rem, 60vw, 13rem);
    height: clamp(9rem, 60vw, 13rem);
  }
}

@media (max-width: 480px) {
  .hero-logo-bg {
    margin-top: 0rem;
    width: clamp(8rem, 70vw, 12rem);
    height: clamp(8rem, 70vw, 12rem);
  }
}

/* SECCION NOTICIAS */
.news-section {
  width: 85vw;
  margin-inline: auto;
  padding: 3.5rem 0 2.75rem;
}

.news-title {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.35rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1e293b;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
  background: var(--color-panel);
  border-radius: 1rem;
  padding: 1.1rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.news-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(100, 116, 139, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex: 1 1 auto;
  min-height: 11rem;
}

@media (min-width: 768px) {
  .news-card-cover {
    aspect-ratio: auto;
    min-height: 13.5rem;
  }
}

.news-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.news-card-icon {
  width: 100%;
  height: 12rem;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #1e293b;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.news-card-icon.orange {
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
}

.news-card-icon.green {
  background: linear-gradient(135deg, var(--color-accent-cool), var(--color-accent-bright));
  color: #0b1526;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.news-card-desc {
  color: var(--color-text-soft);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.news-card-date {
  font-size: 0.875rem;
  color: var(--color-accent-cool);
}

.news-card-date.orange {
  color: var(--color-accent-warm);
}

.news-card-date.green {
  color: var(--color-accent-bright);
}

/* SECCION QUIENES SOMOS */
.about-section {
  padding: clamp(2rem, 4vw, 3.5rem) 1rem;
}

.about-section .container {
  max-width: min(1200px, 92vw);
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .about-section {
    margin-block: auto;
    
  }

  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
    width: min(1200px, 90vw);
    align-items: start;
  }
}

.about-title {
  font-size: clamp(1.85rem, 2.6vw, 2.4rem);
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.about-desc {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: #475569;
  margin-bottom: 1rem;
  max-width: 60ch;
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.about-list-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1rem;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.about-list-icon.blue {
  background: linear-gradient(135deg, var(--color-accent-cool), var(--color-bg-soft));
}

.about-list-icon.orange {
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent-warm));
}

.about-list-icon.green {
  background: linear-gradient(135deg, var(--color-accent-cool), var(--color-accent-bright));
}

.about-contact-card {
  background: var(--color-panel);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .about-contact-card {
    max-width: 520px;
    margin-inline: auto;
  }
}

.about-contact-title {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #1e293b;
}

.about-contact-subtitle {
  color: var(--color-text-soft);
  margin-bottom: 1.25rem;
}

.about-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.about-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  justify-content: center;
  padding: 0.85rem 1rem;
  background: var(--color-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
}

.about-contact-item .about-contact-label,
.about-contact-item .about-contact-value {
  text-align: center;
}

.about-contact-item .about-contact-label {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.about-contact-item .about-contact-value {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.about-contact-cta {
  display: inline-block;
  margin-top: 0.5rem;
  border-width: 2px;
}

.about-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .about-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-stat-card {
  background: var(--color-panel-alt);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 38px rgba(3, 7, 18, 0.35);
}

.about-stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.about-stat-number.blue {
  color: var(--color-accent-cool);
}

.about-stat-number.orange {
  color: var(--color-accent-warm);
}

.about-stat-number.green {
  color: var(--color-accent-bright);
}

.about-stat-number.purple {
  color: #c7d6eb;
}

.about-stat-label {
  color: var(--color-text-soft);
}

/* SECCION FILTRO Y ARTICULOS DE NOTICIAS */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.news-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-soft);
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.news-filter-btn.active,
.news-filter-btn:hover {
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
  border-color: rgba(255, 255, 255, 0.12);
}

.news-articles {
  max-width: 64rem;
  margin: 0 auto;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.03), transparent 65%);
  border-radius: 1.5rem;
  padding: 0 1rem;
}

.news-article {
  background: var(--color-panel);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 40px rgba(3, 7, 18, 0.4);
}

.news-article:last-child {
  margin-bottom: 0;
}

.news-article-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.news-article-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.news-article-category {
  font-size: 0.875rem;
  color: var(--color-accent-cool);
}

.news-article-category.orange {
  color: var(--color-accent-warm);
}

.news-article-category.green {
  color: var(--color-accent-bright);
}

.news-article-icon {
  font-size: 2rem;
}

.news-article-desc {
  color: var(--color-text-soft);
}

/* SECCION EVENTOS */
.events-section {
  padding: 1.5rem 0;
}

.events-section .container {
  max-width: 85vw;
  width: 85vw;
  margin: 0 auto;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.events-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.events-desc {
  color: #475569;
}

.nav-buttons {
  display: flex;
  gap: 0.75rem;
}

.nav-button {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(100, 116, 139, 0.2);
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-button:hover {
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
  border-color: transparent;
}

.events-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  align-items: stretch;
  margin-bottom: 2.5rem;
}

@media (max-width: 1200px) {
  .events-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 960px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

/* MÃ³vil: tarjetas en filas (1 columna) y ~95% del viewport */
@media (max-width: 768px) {
  .events-section .container {
    max-width: 100%;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  .events-grid {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .event-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
}

.event-card {
  background: var(--color-panel);
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 48px rgba(3, 7, 18, 0.45);
  transition: transform 0.25s, box-shadow 0.25s;
  display: grid;
  grid-template-rows: 210px 1fr;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 56px rgba(3, 7, 18, 0.55);
}

.event-cover {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.event-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(7, 17, 31, 0.85) 100%);
}

.event-cover-1 {
  background-image: linear-gradient(135deg, rgba(126, 212, 255, 0.4), rgba(7, 17, 31, 0.9)), url('../images/current/Globo_shape_Verde.png');
}

.event-cover-2 {
  background-image: linear-gradient(135deg, rgba(255, 209, 102, 0.45), rgba(7, 17, 31, 0.9)), url('../images//Globo_shape_Naranja.png');
}

.event-cover-3 {
  background-image: linear-gradient(135deg, rgba(255, 138, 76, 0.35), rgba(7, 17, 31, 0.9)), url('../images/Globo_shape_Verde.png');
}

.event-content {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-category {
  font-weight: 700;
  color: var(--color-accent-bright);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.event-category.orange {
  color: var(--color-accent-warm);
}

.event-category.green {
  color: #16a34a;
}

.event-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.event-desc {
  color: var(--color-text-soft);
  line-height: 1.6;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

.events-footer {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.events-footer-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.events-footer-row .events-desc {
  margin: 0;
}

.alert {
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-text-base);
}

.alert code {
  background: rgba(15, 23, 42, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
}

.events-calendar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--color-panel);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  box-sizing: border-box;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.event-item:focus {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.event-date-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.event-date {
  width: 4rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 0.75rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--color-border);
}

.event-date-day {
  font-size: 1.5rem;
  font-weight: 800;
}

.event-date-day.orange {
  color: var(--color-accent-warm);
}

.event-date-day.green {
  color: #16a34a;
}

.event-date-month {
  font-size: 0.875rem;
  color: var(--color-text-soft);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.event-date-group.is-range .event-date {
  width: 3.6rem;
  padding: 0.65rem 0.4rem;
}

.event-date-separator {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text-soft);
  line-height: 1;
}

.event-date-end {
  opacity: 0.92;
}

.event-info-title {
  font-weight: 700;
}

.event-info-desc {
  font-size: 0.95rem;
  color: var(--color-text-soft);
}

.event-form {
  background: var(--color-panel-alt);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

.event-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.event-form label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.event-form input,
.event-form select {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  color: var(--color-text-base);
  margin-bottom: 0.9rem;
  outline: none;
}

.event-form button {
  width: 100%;
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
  font-weight: 700;
  padding: 0.9rem 0;
  border-radius: 0.6rem;
  border: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.event-form button:hover {
  background: linear-gradient(120deg, var(--color-accent-warm), var(--color-accent-bright));
  box-shadow: 0 16px 38px rgba(255, 138, 76, 0.45);
}

/* SECCION CONTACTO */
.contact-title {
  font-size: 2.25rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 3rem;
  color: #1e293b;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 80rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1e293b;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
  border: 1px solid rgba(100, 116, 139, 0.15);
  background: #8b5cf6;
}

.contact-info-icon.blue {
  background: linear-gradient(135deg, var(--color-accent-cool), var(--color-bg-soft));
}

.contact-info-icon.orange {
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent-warm));
}

.contact-info-icon.green {
  background: linear-gradient(135deg, var(--color-accent-cool), var(--color-accent-bright));
}

.contact-info-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1e293b;
}

.contact-info-value {
  color: #475569;
}

.contact-social {
  margin-top: 2rem;
}

.contact-social-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1e293b;
}

.contact-social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info-icon.instagram {
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent-warm));
}

.contact-social-icon-link {
  text-decoration: none;
}

.contact-info-icon.instagram svg {
  width: 1.6rem;
  height: 1.6rem;
}

.contact-info-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.contact-social-handle-link {
  color: inherit;
  text-decoration: none;
}

.contact-social-handle-link:hover {
  text-decoration: underline;
}

.contact-social-link {
  height: 3rem;
  min-width: 3rem;
  padding: 0 0.9rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  gap: 0.55rem;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent-warm));
  transition: box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}

.contact-social-link:hover {
  box-shadow: 0 14px 30px rgba(255, 138, 76, 0.45);
}

.contact-form {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(100, 116, 139, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.contact-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1e293b;
}

.contact-form label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #1e293b;
  margin-bottom: 1rem;
  outline: none;
}

.contact-form button {
  width: 100%;
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 0;
  border-radius: 0.5rem;
  border: none;
  transition: background 0.2s;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}

.contact-form button:hover {
  background: linear-gradient(120deg, var(--color-accent-warm), var(--color-accent-bright));
  box-shadow: 0 16px 38px rgba(255, 138, 76, 0.45);
}

/* SECCION FOOTER */
.footer {
  background: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 100%);
  border-top: 1px solid rgba(100, 116, 139, 0.15);
  padding-block: 0.5rem;
  padding-inline: 10rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* Quita márgenes por defecto (p) que hacen el footer más alto. */
.footer p {
  margin: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer {
    padding-inline: 0;
  }

  .footer .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.35rem;
    max-width: 360px;
    margin: 0 auto;
  }

  .footer-grid>div:first-child {
    display: none;
  }

  /* Enlaces Rápidos - alineado a la derecha */
  .footer-grid>div:nth-child(2) {
    text-align: center;
  }

  /* Recursos - alineado a la izquierda */
  .footer-grid>div:nth-child(3) {
    text-align: center;
  }

  /* Contacto - centrado y ocupa ambas columnas */
  .footer-grid>div:nth-child(4) {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-section-title {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
  }

  .footer-links {
    font-size: 0.875rem;
    gap: 0.4rem;
  }

  .footer-contact-list {
    font-size: 0.875rem;
    gap: 0.3rem;
    align-items: center;
  }
}

@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.footer-logo-bg {
  width: 5rem;
  height: 5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1e293b;
}

.footer-section-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #1e293b;
  line-height: 1.1;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.6rem;
}

.footer-link {
  color: #475569;
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.2;
}

.footer-link:hover {
  color: var(--color-accent-warm);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.6rem;
  color: var(--color-text-soft);
  line-height: 1.25;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.6rem;
  color: var(--color-text-soft);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.footer {
  margin-top: auto;
}

/* se mantiene al fondo cuando el contenido es corto */

/* --- MEJORAS DINAMICAS Y MODERNAS PARA EL MENU --- */
.header-fixed {
  box-shadow: 0 6px 28px 0 rgba(6, 12, 24, 0.55);
  transition: background 0.3s, box-shadow 0.3s;
}

.header-fixed.scrolled {
  box-shadow: 0 12px 38px 0 rgba(3, 7, 18, 0.65);
}

.nav-link {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  color: var(--color-text-base);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-link:after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-cool), var(--color-accent-warm));
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent-warm);
}

.nav-link:hover:after,
.nav-link.active:after {
  transform: scaleX(1);
}

.menu-mobile-btn {
  border-radius: 0.5rem;
  padding: 0.5rem;
  transition: background 0.2s;
}

.menu-mobile-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu {
  animation: fadeDown 0.4s cubic-bezier(.4, 0, .2, 1);
  border-radius: 0 0 1rem 1rem;
  box-shadow: none;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-links a {
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.4rem 0.5rem;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu-links a:hover {
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
}

/* Sombra sutil al pasar el mouse por el header-logo */
.logo-bg {
  transition: box-shadow 0.2s;
}

.logo-bg:hover {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.32));
}

/* Animacion de entrada para el header */
.header-flex {
  animation: fadeDown 0.7s cubic-bezier(.4, 0, .2, 1);
}

/* Mejora de buscador */
.buscador-input:focus {
  border-color: var(--color-accent-warm);
  box-shadow: 0 0 0 2px rgba(255, 138, 76, 0.35);
}

/* Responsive: mejora el padding del nav en movil */
@media (max-width: 767px) {
  .container-nav {
    padding: 0.5rem 0.5rem;
  }
}

/* Mejora de separacion entre buscador y menu */
@media (min-width: 768px) {
  .nav-desktop {
    margin-left: 0.5rem;
  }

  .buscador-desktop {
    margin-left: 0.5rem;
    min-width: 220px;
  }
}

/* Evita salto de linea en enlaces del menu */
.nav-desktop {
  white-space: nowrap;
}

/* Ajuste para evitar que "Quienes Somos" se parta en dos lineas */
.nav-link {
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SECCION AREA PRIVADA */
.private-section {
  padding: 3rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.private-container {
  width: 95%;
  max-width: 550px;
  margin: 0 auto;
  background: var(--color-panel);
  border-radius: 1.5rem;
  box-shadow: 0 25px 48px 0 rgba(3, 7, 18, 0.45);
  padding: 2rem;
  text-align: center;
  position: relative;
  border: 1px solid var(--color-border);
}

.private-icon {
  font-size: 3rem;
  margin-bottom: 1.2rem;
  color: #f97316;
  filter: drop-shadow(0 2px 8px #f9731633);
}

.private-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #4a4a4a;
}

.private-desc {
  color: var(--color-text-soft);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.private-soon {
  color: var(--color-accent-warm);
  font-weight: 600;
  font-size: 1.1em;
}

.private-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.private-form label {
  font-weight: 500;
  color: #464646;
  text-align: left;
}

.private-form input,
.private-form select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--color-text-base);
  box-sizing: border-box;
}

.private-form select {
  appearance: none;
  background-color: rgb(15 23 42 / 28%);
  background-image: linear-gradient(45deg, transparent 50%, #f8fafc 50%),
    linear-gradient(135deg, #f8fafc 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.private-form select:focus {
  border-color: var(--color-accent-bright);
  box-shadow: 0 0 0 1px rgba(255, 138, 76, 0.35);
}

.private-field {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.private-field label {
  flex: 0 0 auto;
  text-align: right;
  margin-bottom: 0;
}

.private-field input,
.private-field select {
  flex: 1;
}

.private-field+.private-field {
  margin-top: 0.25rem;
}

.private-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.private-form-actions button,
.private-form-actions input[type="submit"] {
  flex: 1;
}

@media (max-width: 768px) {
  .private-container {
    width: 90%;
    max-width: 100%;
    margin: 1rem auto;
    padding: 1.5rem 1rem;
  }

  .private-form-actions {
    flex-direction: column;
  }

  .private-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .private-field label {
    flex: unset;
    width: 100%;
    text-align: left;
  }

  .private-field input,
  .private-field select {
    width: 100%;
  }
}

.private-form input.input-valid,
.private-form select.input-valid {
  border-color: var(--color-success);
  box-shadow:
    0 0 0 2px rgba(16, 185, 129, 0.55),
    0 0 18px rgba(16, 185, 129, 0.25);
}

.private-form input.input-invalid,
.private-form select.input-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.private-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.private-remember input {
  accent-color: var(--color-accent-warm);
  cursor: pointer;
}

.private-form button,
.private-form .btn-primary {
  background: linear-gradient(120deg, var(--color-accent-bright), var(--color-accent-warm));
  color: #0b1526;
  font-weight: 600;
  padding: 0.5rem 0;
  border-radius: 1rem;
  border: none;
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: 0 12px 30px rgba(255, 138, 76, 0.35);
}

.private-form .btn-primary {
  width: 100%;
}

.private-form .btn-primary:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

/* SECCION FAQ */
.faq-section {
  padding: 2rem 0;
}

.faq-title {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2.5rem;
  color: #3d3d3d;
}

.faq-list {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  background: var(--color-panel);
  border-radius: 1rem;
  box-shadow: 0 18px 40px 0 rgba(3, 7, 18, 0.45);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  transition: box-shadow 0.2s;
  border-left: 5px solid var(--color-accent-warm);
  position: relative;
  border: 1px solid var(--color-border);
}

.faq-item:hover {
  box-shadow: 0 24px 48px 0 rgba(3, 7, 18, 0.6);
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-accent-cool);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--color-accent-warm);
}

.faq-answer {
  color: var(--color-text-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Ajuste de margenes para centrar el contenido y evitar solapamiento con el header sticky */
section {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (max-width: 768px) {
  section {
    padding-top: 4rem;
    padding-bottom: 1rem;
  }
}


/* Footer: logotipo y nombre igual de grande que en el header */
.footer-logo-img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.32));
}

.footer-logo-title-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.footer-logo-title-ampa {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}

@media (min-width: 768px) {
  .footer-logo-title-ampa {
    font-size: 1.44rem;
  }
}

.footer-logo-title-colegio {
  font-size: 0.84rem;
  font-weight: 500;
  color: #797f85;
  margin-top: 0.1em;
  white-space: nowrap;
}

/* Header: nombre del colegio en una sola linea */
.header-title-colegio {
  font-size: 1rem;
  font-weight: 500;
  color: #797f85;
  margin-top: 0.1em;
  white-space: nowrap;
}

/* Nota: las rutas a recursos se gestionan ahora desde assets/css/AMPA.css */

.section-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* --- Overrides de layout del header para buscador arriba y login a la derecha --- */
.header-fixed {
  z-index: 1200;
}

.container-nav {
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.header-flex {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.4rem 1rem;
  width: 100%;
  max-width: 100%;
}

.header-top {
  display: contents;
}

.header-utilities {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.header-logo-group {
  grid-row: 1 / span 2;
  grid-column: 1;
}

.header-utilities {
  grid-column: 2 / 3;
  grid-row: 1;
}

.menu-mobile-btn {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.buscador-desktop {
  width: min(320px, 100%);
}

.nav-desktop {
  grid-column: 2 / 4;
  grid-row: 2;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
}

.header-utilities .nav-auth {
  margin-left: auto;
}

.header-utilities .nav-user-name {
  order: 0;
}

.header-utilities .nav-auth-btn {
  order: 1;
}

@media (max-width: 1024px) {
  .header-flex {
    gap: 0.7rem;
  }

  .nav-desktop {
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .header-utilities {
    display: none;
  }

  .header-flex {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
  }

  .header-logo-group {
    grid-row: 1;
  }

  .nav-desktop {
    display: none;
  }
}

/* Foro de sugerencias */
.suggestion-thread {
  padding: 2rem 1rem 3rem;
}

.thread-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.thread-back {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1f3ba2, #3b5bda);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(31, 59, 162, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.thread-back:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(31, 59, 162, 0.35);
  opacity: 0.95;
}

.thread-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem;
}

.thread-stats-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.thread-mini-totals {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.mini-pill.up {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
}

.mini-pill.down {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.thread-meta.inline {
  margin: 0;
}

.thread-hero-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  margin-bottom: 0.4rem;
}

.thread-breadcrumb {
  margin: 0;
  color: var(--color-text-soft);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
}

.thread-back {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .thread-hero-top {
    flex-wrap: wrap;
  }
}

.thread-headline {
  flex: 1;
  min-width: 260px;
}

.thread-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.thread-title {
  margin: 0;
  font-size: 2rem;
}

.thread-meta {
  color: var(--color-text-soft);
  margin: 0.25rem 0 0;
}

.thread-totals {
  display: none;
}

.thread-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: center;
  min-width: 300px;
}

.vote-tally {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.02);
}

.vote-tally .emoji {
  font-size: 1.6rem;
}

.vote-tally .count {
  margin: 0;
  font-weight: 700;
  font-size: 1.3rem;
}

.vote-tally .label {
  margin: 0;
  color: var(--color-text-soft);
}

.vote-tally.up {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.vote-tally.down {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-base);
  background: rgba(148, 163, 184, 0.15);
}

.status-pill.status-pendiente {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #92400e;
}

.status-pill.status-aprobada {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
  color: #166534;
}

.status-pill.status-rechazada {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #991b1b;
}

.status-pill.status-cerrada {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.5);
  color: #1d4ed8;
}

.thread-body,
.thread-vote,
.thread-comments {
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.vote-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vote-copy {
  margin: 0.25rem 0 0;
  color: var(--color-text-soft);
}

.vote-mini-totals {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-soft);
  font-weight: 600;
}

.vote-mini-totals span {
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--color-border);
}

.vote-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.vote-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.vote-actions.inline {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: stretch;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  background: #fff;
  color: var(--color-text-base);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

.vote-btn .emoji {
  font-size: 1.2rem;
}

.vote-btn.up {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.vote-btn.down {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.vote-btn.active.up {
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.25);
}

.vote-btn.active.down {
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.25);
}

.vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.vote-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.vote-hint {
  color: var(--color-text-soft);
  font-weight: 600;
}

.vote-locked {
  color: #991b1b;
  font-weight: 700;
}

.vote-submit {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.thread-comments {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  box-shadow: var(--shadow-sm);
}

.comment-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--color-text-soft);
}

.comment-meta .author {
  font-weight: 700;
  color: var(--color-text-base);
}

.comment-meta .date {
  font-size: 0.9rem;
}

.comment-body {
  margin: 0;
  line-height: 1.5;
}

.comment-empty {
  color: var(--color-text-soft);
  margin: 0.25rem 0;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.comment-form label {
  font-weight: 600;
  color: var(--color-text-base);
}

.comment-textarea {
  width: 100%;
  min-height: 110px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 0.85rem;
  resize: vertical;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--color-accent-warm);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
}

.comment-actions .comment-submit-btn {
  width: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.suggestion-card {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.suggestion-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--color-border);
  font-weight: 700;
}

.suggestion-card h3 {
  margin: 0;
}

.suggestion-card .card-meta {
  margin: 0;
  color: var(--color-text-soft);
}

.suggestion-card .btn-primary {
  align-self: flex-start;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.pagination {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .thread-hero {
    flex-direction: column;
  }

  .vote-header {
    flex-direction: column;
  }

  .vote-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .vote-submit {
    width: 100%;
    text-align: center;
  }

  .vote-actions.inline {
    grid-template-columns: 1fr;
  }
}

/* Fix: en algunos Android (ej. OPPO A60) el SVG del menú puede no repintarse hasta rotar. */
@media (max-width: 768px) {
  .header-fixed .menu-mobile-btn {
    color: var(--color-text-base, #1e293b);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .header-fixed .menu-mobile-icon {
    stroke: currentColor;
    fill: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .header-fixed .menu-mobile-icon path {
    stroke: currentColor;
  }
}

/* Dialogos personalizados */
.ampa-dialog {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.12), transparent 38%),
    radial-gradient(circle at 85% 12%, rgba(249, 115, 22, 0.12), transparent 42%),
    rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-normal, 0.3s ease), visibility var(--transition-normal, 0.3s ease);
  z-index: 1300;
  --dialog-accent: var(--color-accent-warm, #f97316);
}

.ampa-dialog[data-variant="danger"] {
  --dialog-accent: #ef4444;
}

.ampa-dialog[data-variant="info"] {
  --dialog-accent: var(--color-accent-cool, #0ea5e9);
}

.ampa-dialog.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ampa-dialog__panel {
  width: min(92vw, 520px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  border-radius: 1.4rem;
  border: 1px solid var(--color-border, rgba(100, 116, 139, 0.2));
  box-shadow: var(--shadow-xl, 0 32px 58px rgba(0, 0, 0, 0.12));
  padding: 2rem;
  position: relative;
  color: var(--color-text-base);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--transition-normal, 0.3s ease);
}

.ampa-dialog.is-open .ampa-dialog__panel {
  transform: translateY(0) scale(1);
}

.ampa-dialog__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.08), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.08), transparent 45%);
  pointer-events: none;
}

.ampa-dialog__panel > * {
  position: relative;
  z-index: 1;
}

.ampa-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid var(--color-border, rgba(100, 116, 139, 0.2));
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.75rem;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.05));
  transition: transform var(--transition-fast, 0.2s ease), box-shadow var(--transition-fast, 0.2s ease);
}

.ampa-dialog__close:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 12px 24px rgba(0, 0, 0, 0.08));
}

.ampa-dialog__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.12);
  color: var(--dialog-accent);
  margin-bottom: 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.ampa-dialog__icon svg {
  width: 26px;
  height: 26px;
}

.ampa-dialog__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.ampa-dialog__message {
  margin: 0;
  color: var(--color-text-soft, #475569);
  line-height: 1.5;
  white-space: pre-line;
}

.ampa-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.ampa-dialog__confirm {
  background: var(--dialog-accent);
  color: #fff;
  border: none;
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.3);
}

.ampa-dialog[data-variant="danger"] .ampa-dialog__confirm {
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.35);
}

.ampa-dialog__confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.35);
}

.ampa-dialog[data-variant="danger"] .ampa-dialog__confirm:hover {
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.4);
}

.ampa-dialog__confirm:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2), var(--shadow-md, 0 12px 24px rgba(0, 0, 0, 0.08));
}

body.dialog-open {
  overflow: hidden;
}
