/* =====================================================================
   COLEGIO PAULO FREIRE DE SAN MIGUEL — Global Styles
   Design: Premium Modern Purple / Lavender Theme
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables (Paleta Morada / Lavanda) ────────────────────────────── */
:root {
  --bg-base:        #f4effa; /* Fondo morado claro suave/lavanda */
  --bg-surface:     #ffffff; /* Blanco para tarjetas y contenedores */
  --bg-card:        #ffffff; /* Blanco para tarjetas */
  --bg-elevated:    #ede9fe; /* Fondo elevado lavanda pastel */
  --border-subtle:  #e9d5ff; /* Borde sutil lavanda */
  --border-medium:  #ddd6fe; /* Borde lavanda medio */

  /* Acentuaciones Moradas / Violetas */
  --accent-purple:   #6b21a8; /* Morado intenso corporativo */
  --accent-purple-h: #581c87; /* Morado oscuro para hover */
  --accent-lavender: #8b5cf6; /* Violeta/púrpura medio para destaques */
  --accent-lavender-h: #7c3aed;

  /* Mapeo de retrocompatibilidad */
  --accent-green:   var(--accent-purple);
  --accent-green-h: var(--accent-purple-h);
  --accent-amber:   #a855f7;
  --accent-amber-h: #9333ea;

  /* Tipografía */
  --text-primary:   #1e1444; /* Morado azulado oscuro profundo para títulos */
  --text-secondary: #4c1d95; /* Morado medio para texto secundario */
  --text-muted:     #6b7280; /* Gris apagado para textos secundarios */
  --text-light:     #ffffff;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 4px 20px rgba(107, 33, 168, 0.06);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.12);

  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  --font: 'Inter', system-ui, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a  { color: var(--accent-green); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-green-h); }

/* ── Navbar ────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand .logo-image {
  height: 104px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-brand .brand-text {
  display: flex;
  flex-direction: column;
}

.navbar-brand .brand-sub {
  font-size: 1.6rem;
  color: var(--accent-purple);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-purple);
  background: var(--bg-elevated);
}

.nav-menu .nav-admin a {
  color: #6b21a8 !important;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  font-weight: 700;
}

.nav-menu .nav-admin a:hover {
  background: #ddd6fe;
  border-color: #c084fc;
  color: #581c87 !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero Banner ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1b1145 0%, #29175d 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% -20%, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, #c084fc, #e9d5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #cbd5e1;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.hero .btn-outline:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent-green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-green-h);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
  color: #fff;
}

.btn-amber {
  background: var(--accent-amber);
  color: #fff;
}
.btn-amber:hover {
  background: var(--accent-amber-h);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}
.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}


.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.25);
  color: #fca5a5;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* ── Container ─────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section Titles ────────────────────────────────────────────────── */
.section-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.4em;
  background: linear-gradient(to bottom, var(--accent-green), var(--accent-amber));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── News / Post Cards ─────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.5s ease both;
}

.post-card:hover {
  border-color: rgba(249, 115, 22, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-elevated);
}

.post-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.post-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-card-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-medium);
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ── Post Detail ───────────────────────────────────────────────────── */
.post-detail {
  max-width: 820px;
  margin: 3rem auto;
  padding: 0 1.5rem 4rem;
}

.post-detail-header {
  margin-bottom: 2rem;
}

.post-detail-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.post-detail-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  object-fit: cover;
  max-height: 480px;
}

.post-detail-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-detail-content h2,
.post-detail-content h3 {
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.post-detail-content p { margin-bottom: 1rem; }
.post-detail-content img {
  border-radius: var(--radius-md);
  margin: 1rem 0;
}
.post-detail-content a { color: var(--accent-green); }

/* ── Static Page Layout ────────────────────────────────────────────── */
.page-layout {
  padding: 3rem 0 5rem;
  flex: 1;
}

.page-hero {
  background: linear-gradient(135deg, #1b1145 0%, #29175d 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 0%, rgba(168, 85, 247, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero-content { max-width: 1200px; margin: 0 auto; }

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: #cbd5e1;
  font-size: 1rem;
}

.page-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

.page-content h2, .page-content h3 {
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.page-content p { margin-bottom: 1rem; }

.page-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content ul li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ── Info Cards ────────────────────────────────────────────────────── */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--border-medium);
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Contact Form ──────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
}

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

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.contact-form h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── Map ───────────────────────────────────────────────────────────── */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 4/3;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Allies / Logos ────────────────────────────────────────────────── */
.allies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.ally-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  min-height: 80px;
}

.ally-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.ally-card img {
  max-height: 50px;
  max-width: 90%;
  width: auto;
  object-fit: contain;
  filter: brightness(0.85) grayscale(0.2);
  transition: var(--transition);
}

.ally-card:hover img {
  filter: brightness(1) grayscale(0);
}

/* ── Flash Messages ────────────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  width: 100%;
}

.flash {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
  border: 1px solid transparent;
}

.flash-success {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.3);
  color: #6ee7b7;
}

.flash-error {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
}

.flash-info {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: #93c5fd;
}

.flash-warning {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.3);
  color: #fcd34d;
}

.flash-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.6;
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

/* ── Footer ────────────────────────────────────────────────────────── */
footer {
  background: #190f3c;
  color: #ffffff;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand p {
  color: #cbd5e1;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-brand .brand-name {
  color: #ffffff !important;
}

.footer-brand .brand-sub {
  color: #c084fc !important;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c084fc;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  color: #cbd5e1;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: #e9d5ff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

/* ── Admin Panel ───────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 120px);
}

.admin-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-sidebar .sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  margin-top: 1rem;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.admin-main {
  padding: 2.5rem;
  overflow-y: auto;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Admin Table ───────────────────────────────────────────────────── */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td {
  background: rgba(249, 115, 22, 0.03);
}

.admin-table .td-title {
  color: var(--text-primary);
  font-weight: 600;
  max-width: 300px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.status-published {
  background: rgba(249, 115, 22, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.status-draft {
  background: rgba(100,116,139,0.15);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ── Admin Form ────────────────────────────────────────────────────── */
.admin-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 800px;
}

.admin-form-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green);
  cursor: pointer;
}

.image-preview {
  margin-top: 0.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 300px;
  border: 1px solid var(--border-subtle);
}

.image-preview img {
  width: 100%;
  height: auto;
}

/* ── Login Page ────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(249, 115, 22, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.login-card .logo-block {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card .logo-block .icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-amber));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.login-card .login-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Animations ────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-delay-1 { animation-delay: 0.05s; }
.animate-delay-2 { animation-delay: 0.1s; }
.animate-delay-3 { animation-delay: 0.15s; }
.animate-delay-4 { animation-delay: 0.2s; }
.animate-delay-5 { animation-delay: 0.25s; }

/* ── Utility ───────────────────────────────────────────────────────── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-green  { color: var(--accent-green); }
.text-amber  { color: var(--accent-amber); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

/* ── Main Layout Grid (Home Page Split Layout) ─────────────────────── */
.main-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .main-layout-grid {
    grid-template-columns: 7.5fr 4.5fr;
  }
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.sidebar-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-video-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  background: #000;
}

.sidebar-video {
  width: 100%;
  display: block;
}

/* ── Responsive Mobile Optimizations ──────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    height: 70px;
    padding: 0 1.25rem;
  }

  .navbar-brand .logo-image {
    height: 48px;
  }

  .navbar-brand .brand-sub {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .hamburger {
    display: flex;
  }

  /* Hamburger active 'X' animation */
  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-menu {
    display: none;
    position: fixed;
    inset: 70px 0 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1rem;
    gap: 0.5rem;
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  }

  .nav-menu.open {
    display: flex;
    animation: fadeInDown 0.25s ease forwards;
  }

  .nav-menu a {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .hero {
    padding: 2.5rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .allies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-main {
    padding: 1.25rem 1rem;
  }

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

@media (max-width: 480px) {
  .navbar-brand .brand-sub {
    font-size: 0.72rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .allies-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 2rem 1.25rem;
  }

  .contact-form {
    padding: 1.5rem 1.25rem;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Uppercase Navbar Links ───────────────────────────────────────── */
.nav-menu a {
  text-transform: uppercase !important;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ── Sellos Institucionales Section ────────────────────────────────── */
.sellos-section {
  padding: 3.5rem 1.5rem;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.06) 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.sellos-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.25rem 0 0.5rem;
}
.sellos-subtitle {
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}
.sellos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.sello-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.sello-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-orange, #f97316);
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.12);
}
.sello-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}
.sello-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.sello-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ── Marquee Auto-Scrolling Organizations Carousel ─────────────────── */
.orgs-wrapper {
  padding: 1rem 0 3rem;
}
.org-category-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  overflow: hidden;
}
.org-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
}
.cat-dot-aliadas { background: #10b981; }
.cat-dot-inst { background: #3b82f6; }

.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-slow { animation-duration: 32s; }
.marquee-reverse { animation: marquee-reverse-scroll 30s linear infinite; }
.marquee-normal { animation-duration: 26s; }

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-reverse-scroll {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.org-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  min-width: 170px;
  height: 90px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.org-card:hover {
  transform: scale(1.04);
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.org-card img {
  max-height: 42px;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.2s ease;
}
.org-card:hover img {
  filter: grayscale(0%);
}
.org-card span {
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.35rem;
  white-space: nowrap;
}
.org-text-card {
  justify-content: center;
  text-align: center;
}
.org-icon { font-size: 1.5rem; line-height: 1; }
.ig-tag {
  font-size: 0.72rem;
  color: #f59e0b;
  margin-top: 0.15rem;
}

/* ── Media Gallery 3 Columns ────────────────────────────────────────── */
.media-3columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 992px) {
  .media-3columns-grid {
    grid-template-columns: 1fr;
  }
}
.media-column {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.media-col-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-subtle);
}
.media-col-title h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}
.media-col-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Biblioteca 3 Columns ──────────────────────────────────────────── */
.biblioteca-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 992px) {
  .biblioteca-grid {
    grid-template-columns: 1fr;
  }
}
.biblioteca-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.biblioteca-col-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-subtle);
}
.col-icon { font-size: 2rem; line-height: 1; }
.biblioteca-col-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}
.biblioteca-col-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}
.resource-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: #f59e0b;
}
.resource-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.resource-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.2rem 0;
}
.author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-orange, #f97316);
  margin-bottom: 0.5rem;
}
.resource-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1rem;
}
.resource-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── Instagram-Style Split Post Card Layout ────────────────────────── */
.posts-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
}

.post-card-split {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 320px;
  max-height: 380px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (max-width: 820px) {
  .post-card-split {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

.post-card-split:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 10px 30px rgba(107, 33, 168, 0.12);
  transform: translateY(-3px);
}

.post-card-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-card-media .post-card-image {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.post-card-content-wrap {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.post-card-header-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.post-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.post-card-body-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  margin-bottom: 0.75rem;
}

.post-card-body-text p {
  margin-bottom: 0.5rem;
  text-align: justify;
}

.post-card-action {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
