@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Color Palette */
  --primary-color: #4A0E4E;
  --primary-light: #6A1B70;
  --primary-dark: #2F0533;
  --primary-rgb: 74, 14, 78;

  --accent-color: #D80073;
  --accent-light: #FF1E9A;
  --accent-hover: #B0005C;
  --accent-rgb: 216, 0, 115;

  --bg-warm: #FAF6F0;
  --bg-white: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);

  --text-dark: #2C252D;
  --text-light: #6E6170;
  --text-white: #FFFFFF;

  --border-color: #EADEC9;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(74, 14, 78, 0.08), 0 4px 6px -2px rgba(74, 14, 78, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(74, 14, 78, 0.12), 0 10px 10px -5px rgba(74, 14, 78, 0.06);

  /* Typography */
  --font-main: 'Montserrat', sans-serif;
  --font-accent: 'Playfair Display', serif;
  --font-script: 'Great Vibes', cursive;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-warm);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-accent);
  color: var(--primary-color);
  font-weight: 700;
}

p {
  color: var(--text-light);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
  box-shadow: 0 4px 14px rgba(74, 14, 78, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 14, 78, 0.4);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--bg-white);
  box-shadow: 0 4px 14px rgba(216, 0, 115, 0.3);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(216, 0, 115, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  transform: translateY(-2px);
}

.section-padding {
  padding: 100px 0;
  scroll-margin-top: 105px !important;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 12px;
  position: relative;
}

.section-subtitle {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--accent-color);
  margin-bottom: 24px;
  display: block;
}

.section-divider {
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 0 auto 40px auto;
  border-radius: 2px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 14, 78, 0.08);
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(250, 246, 240, 0.95);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-script);
  font-size: 2.3rem;
  color: var(--accent-color);
  font-weight: bold;
  white-space: nowrap;
  display: inline-block;
}

.logo-subtext {
  font-family: var(--font-main);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color);
  display: block;
  margin-top: -8px;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: #5A525C;
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: var(--transition-smooth);
  border-radius: 3px;
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  padding-top: 120px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 80% 20%, rgba(216, 0, 115, 0.03) 0%, rgba(74, 14, 78, 0.01) 100%);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.15;
  color: var(--primary-color);
  font-family: var(--font-accent);
}

.hero-sub-title {
  font-size: 2rem;
  line-height: 0.75;
  color: var(--primary-color);
  font-family: var(--font-accent);
}

.script-highlight {
  font-family: var(--font-script);
  color: var(--accent-color);
  font-size: 4.5rem;
  font-weight: normal;
  display: inline-block;
  transform: rotate(-2deg);
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-light);
  line-height: 1.7;
}

.hero-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 8px solid var(--bg-white);
}

.hero-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 60%, rgba(74, 14, 78, 0.15));
}

/* About Us (Quiénes Somos) */
.about {
  background-color: var(--bg-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-badge {
  display: inline-block;
  background-color: rgba(74, 14, 78, 0.08);
  color: var(--primary-color);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.value-card {
  padding: 20px;
  border-radius: 16px;
  background-color: var(--bg-warm);
  border-left: 4px solid var(--accent-color);
}

.value-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.about-hfsc-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--bg-white);
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.about-hfsc-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.03);
}

.hfsc-logo {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 3px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
  padding-bottom: 4px;
}

.about-hfsc-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

/* Our Impact (Nuestro Impacto) */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.impact-card {
  background-color: var(--bg-card);
  padding: 40px 32px;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.impact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.impact-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background-color: rgba(216, 0, 115, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.impact-card h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.impact-card p {
  font-size: 0.95rem;
}

/* Events (Gran Bingo) */
.events {
  background-color: var(--bg-white);
}

.event-featured {
  background-color: var(--bg-warm);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-color);
}

.event-image {
  position: relative;
  min-height: 400px;
  background-size: cover;
  background-position: center;
}

.event-details {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-badge {
  align-self: flex-start;
  background-color: var(--accent-color);
  color: var(--bg-white);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.event-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-weight: 600;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
}

.event-program {
  margin-top: 24px;
}

.event-program h4 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.program-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.program-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.95rem;
}

.program-time {
  font-weight: 700;
  color: var(--accent-color);
}

.program-activity {
  font-weight: 550;
  color: var(--text-dark);
}

/* News (Noticias) */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.news-card {
  background-color: var(--bg-white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

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

.news-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.news-body {
  padding: 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.news-card h3 {
  font-family: var(--font-accent);
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  line-height: 1.3;
}

.news-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0;
}

.news-readmore {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--primary-color);
  gap: 6px;
}

.news-readmore:hover {
  color: var(--accent-color);
}

/* Transparency & ESAL (Transparencia) */
.transparency {
  background-color: var(--bg-white);
}

.transparency-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  background-color: var(--bg-warm);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  transition: var(--transition-smooth);
}

.tab-btn.active,
.tab-btn:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  border-color: var(--primary-color);
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.document-card {
  background-color: var(--bg-warm);
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition-smooth);
}

.document-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.document-icon {
  font-size: 2.2rem;
  color: var(--accent-color);
  line-height: 1;
}

.document-info {
  flex: 1;
}

.document-info h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.document-info p {
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
}

.btn-download:hover {
  color: var(--accent-color);
}

/* How to Help (Cómo Ayudar) */
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: flex-start;
}

.simulator-box {
  background-color: var(--bg-white);
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.simulator-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 30px 0;
}

.sim-option {
  padding: 16px 8px;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-main);
  text-align: center;
  transition: var(--transition-smooth);
}

.sim-option.active,
.sim-option:hover {
  border-color: var(--primary-color);
  background-color: rgba(74, 14, 78, 0.03);
}

.sim-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  margin-bottom: 4px;
}

.sim-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.simulator-result {
  background-color: var(--bg-warm);
  padding: 24px;
  border-radius: 16px;
  border-left: 4px solid var(--accent-color);
  margin-bottom: 30px;
}

.result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.result-desc {
  font-size: 0.95rem;
}

.bank-info-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--bg-white);
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.bank-info-card h3 {
  color: var(--bg-white);
  font-size: 1.6rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
}

.bank-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.bank-row {
  display: flex;
  flex-direction: column;
}

.bank-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bank-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.bank-info-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Contact Us */
.contact {
  background-color: var(--bg-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-item {
  display: flex;
  gap: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: rgba(74, 14, 78, 0.08);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.contact-details p {
  font-size: 0.95rem;
}

.contact-form-box {
  background-color: var(--bg-warm);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 14, 78, 0.1);
}

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

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(47, 5, 51, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-warm);
  width: 90%;
  max-width: 500px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transform: scale(0.9);
  transition: var(--transition-smooth);
}

.modal-backdrop.show .modal-content {
  transform: scale(1);
}

.modal-header {
  background-color: var(--primary-color);
  color: var(--bg-white);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  color: var(--bg-white);
  font-size: 1.4rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--bg-white);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 32px;
}

/* Floating Action Button (FAB) */
.fab-donate {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 900;
  background-color: var(--accent-color);
  color: var(--bg-white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 15px rgba(216, 0, 115, 0.4);
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.fab-donate:hover {
  transform: scale(1.1);
  background-color: var(--accent-hover);
}

/* Admin Dashboard styling */
.admin-container {
  max-width: 1000px;
  margin: 120px auto 60px auto;
  padding: 40px;
  background-color: var(--bg-white);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

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

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.admin-table th {
  font-weight: 700;
  color: var(--primary-color);
}

.btn-delete {
  color: #D80000;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
}

.btn-delete:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes float {
  0% {
    transform: translateY(0px);
  }

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

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--bg-warm);
    flex-direction: column;
    padding: 40px 0;
    gap: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-actions {
    display: none;
    /* Hide header buttons on tablet/mobile, FAB will be used */
  }

  .news-grid,
  .impact-grid,
  .documents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {

  .hero-grid,
  .about-grid,
  .event-featured,
  .help-grid,
  .contact-grid,
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 60px;
    padding-top: 100px;
  }

  .hero-image-container {
    order: -1;
  }

  .hero-title {
    font-size: 3.2rem;
  }

  .script-highlight {
    font-size: 3.8rem;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .script-highlight {
    font-size: 2.8rem;
  }

  .news-grid,
  .impact-grid,
  .documents-grid {
    grid-template-columns: 1fr;
  }

  .event-details {
    padding: 30px;
  }

  .event-meta {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Rich Text / HTML styling for CMS articles */
.news-content-body {
  word-wrap: break-word;
}

.news-content-body p {
  margin-bottom: 16px;
  color: var(--text-dark);
  line-height: 1.7;
}

.news-content-body ul,
.news-content-body ol {
  margin-top: 8px;
  margin-bottom: 16px;
  padding-left: 24px;
}

.news-content-body ul {
  list-style-type: disc !important;
}

.news-content-body ol {
  list-style-type: decimal !important;
}

.news-content-body li {
  margin-bottom: 8px;
  color: var(--text-dark);
  display: list-item !important;
}

.news-content-body a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: 600;
}

.news-content-body a:hover {
  color: var(--accent-hover);
}

.news-content-body strong,
.news-content-body b {
  font-weight: 700;
  color: var(--primary-color);
}

.news-content-body h1,
.news-content-body h2,
.news-content-body h3,
.news-content-body h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--primary-color);
  font-family: var(--font-accent);
}

/* === Dynamic News Carousel === */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  width: 100%;
}

.carousel-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  margin-bottom: 0 !important;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(74, 14, 78, 0.6);
  color: var(--bg-white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-fast);
  z-index: 10;
}

.carousel-control:hover {
  background: var(--primary-color);
  transform: translateY(-50%) scale(1.05);
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
}

.carousel-indicator.active {
  background: var(--accent-color);
  width: 24px;
  border-radius: 10px;
}

/* === Dynamic Navigation Dropdown Menu === */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #FFFFFF;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(74, 14, 78, 0.18);
  border-radius: 16px;
  overflow: hidden;
  z-index: 1000;
  border: 1px solid #EADEC9;
  padding: 8px 0;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown:focus-within .nav-dropdown-content {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 12px 24px;
  color: var(--primary-color) !important;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid rgba(234, 222, 201, 0.3);
  transition: all 0.2s ease;
}

.nav-dropdown-link:last-child {
  border-bottom: none;
}

.nav-dropdown-link:hover {
  background-color: rgba(216, 0, 115, 0.05);
  color: var(--accent-color) !important;
  padding-left: 28px;
}

/* --- Quill WYSIWYG section formatting --- */
.quill-html-content p {
  margin-bottom: 1.2rem;
}

.quill-html-content p:last-child {
  margin-bottom: 0;
}

.quill-html-content ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1.2rem !important;
  display: block !important;
}

.quill-html-content ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1.2rem !important;
  display: block !important;
}

.quill-html-content li {
  margin-bottom: 0.4rem !important;
  display: list-item !important;
}

.quill-html-content strong {
  font-weight: 700 !important;
}

/* ==========================================================================
   Media Center (Playlists de Galerías) Section Styles
   ========================================================================== */
.media-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  justify-content: center;
  margin-top: 20px;
}

.playlist-card {
  background: var(--bg-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

.playlist-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.playlist-cover-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.playlist-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.playlist-card:hover .playlist-cover-wrapper img {
  transform: scale(1.05);
}

/* YouTube Playlist Side Bar Style Overlay */
.playlist-sidebar-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  background: rgba(74, 14, 78, 0.85); /* --primary-color with transparency */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-white);
  font-family: var(--font-main);
  backdrop-filter: blur(4px);
  z-index: 2;
  transition: var(--transition-smooth);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-sidebar-overlay i {
  font-size: 1.8rem;
  margin-bottom: 8px;
  transition: var(--transition-smooth);
}

.playlist-sidebar-overlay span {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 0 4px;
}

.playlist-card:hover .playlist-sidebar-overlay {
  background: rgba(216, 0, 115, 0.9); /* --accent-color on hover */
}

/* Play Icon Hover Overlay */
.playlist-play-hover {
  position: absolute;
  left: 0;
  right: 35%; /* Ocurre en el lado de la imagen, no sobre la barra lateral */
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 1;
}

.playlist-play-hover-btn {
  background: var(--accent-color);
  color: var(--text-white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(216, 0, 115, 0.4);
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.playlist-play-hover-btn i {
  margin-left: 3px;
}

.playlist-card:hover .playlist-play-hover {
  opacity: 1;
}

.playlist-card:hover .playlist-play-hover-btn {
  transform: scale(1);
}

/* Card content */
.playlist-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.playlist-title {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-family: var(--font-accent);
  font-weight: 700;
  line-height: 1.3;
  transition: var(--transition-fast);
}

.playlist-card:hover .playlist-title {
  color: var(--accent-color);
}

.playlist-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-link-action {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: auto;
}

.playlist-link-action i {
  transition: var(--transition-smooth);
}

.playlist-card:hover .playlist-link-action i {
  transform: translateX(6px);
}

/* Fixed Float Return Button to Media Center */
.fixed-back-mediacenter-btn {
  position: fixed;
  top: 95px; /* Just below header */
  left: 24px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-color);
  color: var(--text-white) !important;
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 15px rgba(216, 0, 115, 0.35);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fixed-back-mediacenter-btn i {
  transition: var(--transition-smooth);
}

.fixed-back-mediacenter-btn:hover {
  background-color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(74, 14, 78, 0.4);
  transform: scale(1.04);
}

.fixed-back-mediacenter-btn:hover i {
  transform: translateX(-3px);
}

.fixed-back-mediacenter-btn.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Dynamic Gallery Header Shrink when coming from Media Center */
.gallery-section.gallery-from-mediacenter {
  padding-top: 30px !important;
  padding-bottom: 20px !important;
}

.gallery-section.gallery-from-mediacenter .text-center {
  margin-bottom: 16px !important;
}

.gallery-section.gallery-from-mediacenter .section-title {
  font-size: 1.8rem !important;
  margin-bottom: 8px !important;
}

.gallery-section.gallery-from-mediacenter .section-subtitle {
  font-size: 1.15rem !important;
  color: var(--primary-light) !important;
  font-family: var(--font-main) !important;
  font-weight: 500 !important;
  font-style: normal !important;
  opacity: 0.95 !important;
  max-width: 650px;
  margin: 0 auto !important;
  line-height: 1.4 !important;
}

.gallery-section.gallery-from-mediacenter .section-divider {
  margin: 10px auto 12px auto !important;
}

/* Reducir dimensiones de la galería de fotos en modo compacto (Solo Escritorio) */
@media (min-width: 769px) {
  .gallery-section.gallery-from-mediacenter .gallery-slider-wrapper {
    max-width: 920px !important;
  }

  .gallery-section.gallery-from-mediacenter .gallery-slider-aspect {
    padding-top: 46% !important;
  }
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
  .fixed-back-mediacenter-btn {
    top: auto;
    bottom: 24px;
    left: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  }
}

/* Placeholder y Reserva de Altura de la Galería para prevenir saltos de scroll (CLS) */
.gallery-section [data-media-gallery] {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(74, 14, 78, 0.02);
  border-radius: 20px;
  border: 1px dashed var(--border-color);
  transition: var(--transition-smooth);
}

@media (max-width: 768px) {
  .gallery-section [data-media-gallery] {
    min-height: 250px;
  }
}

/* Ocultamiento instantáneo de secciones para evitar reconstrucciones del DOM */
.hidden-section-layout {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Botón de descarga interactiva en estado descargando */
.btn-download.downloading {
  pointer-events: none !important;
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}

/* Hero Imagen Template Layout styles */
.hero-imagen-section {
  background-color: var(--bg-white);
  min-height: auto;
  padding-top: 140px !important;
  padding-bottom: 60px !important;
}

.hero-imagen-image-wrapper {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: none;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 58vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .hero-imagen-section {
    padding-top: 120px !important;
    padding-bottom: 40px !important;
  }
}