/* ============================================================
   ALFALAH GETAFE — CSS Principal
   Diseño serio, limpio, sin emojis. Estética islámica clásica.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --primary:        #1A6B63;
  --primary-dark:   #134f49;
  --primary-light:  #2A8B82;
  --gold:           #B8962E;
  --gold-light:     #D4AF55;
  --text-primary:   #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted:     #808080;
  --bg-page:        #F5F3EF;
  --bg-card:        #FFFFFF;
  --bg-section-alt: #F0EDE8;
  --border:         #DDD8D0;
  --border-light:   #EAE6E0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.12);
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;
  --font-sans:      'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-arabic:    'Amiri', 'Traditional Arabic', 'Arial Unicode MS', serif;
  --font-urdu:      'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  --font-hindi:     'Noto Sans Devanagari', serif;
  --font-bengali:   'Noto Sans Bengali', serif;
  --transition:     0.2s ease;
  --header-h:       64px;
  --nav-h:          44px;
}

[data-theme="dark"] {
  --text-primary:   #F0EDE8;
  --text-secondary: #C0BAB0;
  --text-muted:     #808080;
  --bg-page:        #0F1614;
  --bg-card:        #1A2320;
  --bg-section-alt: #151E1C;
  --border:         #2A3530;
  --border-light:   #1F2A28;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.5);
}

/* Modo festivo Ramadán */
[data-festivo="ramadan"] {
  --primary:      #1B5E72;
  --primary-dark: #124050;
  --gold:         #C4922A;
}

/* Modo festivo Eid */
[data-festivo="eid_fitr"],
[data-festivo="eid_adha"] {
  --primary:      #2E6B3E;
  --primary-dark: #1E4A2A;
  --gold:         #D4A017;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:      var(--font-sans);
  color:            var(--text-primary);
  background-color: var(--bg-page);
  line-height:      1.6;
  min-height:       100vh;
}

/* Fuentes por idioma */
:lang(ar), :lang(ur) { font-family: var(--font-arabic); }
:lang(hi)            { font-family: var(--font-hindi); }
:lang(bn)            { font-family: var(--font-bengali); }

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin:    0 auto;
  padding:   0 20px;
}

.section {
  padding: 72px 0;
}

.section + .section {
  border-top: 1px solid var(--border-light);
}

.section--alt {
  background-color: var(--bg-section-alt);
}

/* ── Tipografía ─────────────────────────────────────────── */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

.section-heading {
  text-align:    center;
  margin-bottom: 48px;
}

.section-heading h2 {
  color:         var(--text-primary);
  margin-bottom: 10px;
}

.section-heading p {
  color:     var(--text-secondary);
  font-size: 1.05rem;
}

/* Línea decorativa debajo de títulos */
.section-heading h2::after {
  content:    '';
  display:    block;
  width:      48px;
  height:     3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  margin:     12px auto 0;
  border-radius: 2px;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  position:   sticky;
  top:        0;
  z-index:    100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-top {
  height:      var(--header-h);
  display:     flex;
  align-items: center;
  justify-content: space-between;
  gap:         16px;
}

/* Logo */
.logo-wrap {
  display:     flex;
  align-items: center;
  gap:         12px;
  text-decoration: none;
}

.logo-emblem {
  width:  44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display:     flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-emblem svg {
  width:  26px;
  height: 26px;
  fill:   white;
}

.logo-text-wrap h1 {
  font-size:   1.15rem;
  font-weight: 700;
  color:       var(--text-primary);
  line-height: 1.1;
}

.logo-text-wrap span {
  font-size: 0.78rem;
  color:     var(--text-muted);
  font-weight: 400;
}

/* Header controls */
.header-controls {
  display:     flex;
  align-items: center;
  gap:         10px;
}

/* Selector de idioma — globo */
.lang-globe-wrap {
  position: relative;
}

.lang-globe-btn {
  width:        40px;
  height:       40px;
  border-radius: 50%;
  border:       1px solid var(--border);
  background:   var(--bg-card);
  cursor:       pointer;
  display:      flex;
  align-items:  center;
  justify-content: center;
  transition:   all var(--transition);
  color:        var(--text-secondary);
}

.lang-globe-btn:hover,
.lang-globe-btn.open {
  border-color: var(--primary);
  color:        var(--primary);
  background:   rgba(26,107,99,0.06);
}

.lang-globe-btn svg {
  width:  20px;
  height: 20px;
  stroke: currentColor;
  fill:   none;
}

.lang-dropdown {
  position:   absolute;
  top:        calc(100% + 8px);
  right:      0;
  background: var(--bg-card);
  border:     1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width:  180px;
  z-index:    200;
  overflow:   hidden;
  display:    none;
}

.lang-dropdown.open {
  display: block;
  animation: dropIn 0.15s ease;
}

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

.lang-option {
  display:     flex;
  align-items: center;
  gap:         10px;
  padding:     10px 16px;
  cursor:      pointer;
  border:      none;
  background:  none;
  width:       100%;
  text-align:  left;
  font-size:   0.9rem;
  color:       var(--text-primary);
  transition:  background var(--transition);
}

[dir="rtl"] .lang-option { text-align: right; }

.lang-option:hover { background: var(--bg-section-alt); }

.lang-option.active {
  background: rgba(26,107,99,0.08);
  color:      var(--primary);
  font-weight: 600;
}

.lang-option .lang-native {
  font-size: 0.82rem;
  color:     var(--text-muted);
  margin-left: auto;
}

[dir="rtl"] .lang-option .lang-native { margin-left: 0; margin-right: auto; }

/* Botón tema */
.theme-btn {
  width:        40px;
  height:       40px;
  border-radius: 50%;
  border:       1px solid var(--border);
  background:   var(--bg-card);
  cursor:       pointer;
  display:      flex;
  align-items:  center;
  justify-content: center;
  color:        var(--text-secondary);
  transition:   all var(--transition);
}

.theme-btn:hover {
  border-color: var(--gold);
  color:        var(--gold);
}

.theme-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.theme-btn .icon-sun  { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="dark"] .theme-btn .icon-sun  { display: block; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }

/* ── Navegación ─────────────────────────────────────────── */
.nav-main {
  height:          var(--nav-h);
  display:         flex;
  align-items:     center;
  gap:             2px;
  overflow-x:      auto;
  scrollbar-width: none;
  border-top:      1px solid var(--border-light);
  padding:         0 4px;
}

.nav-main::-webkit-scrollbar { display: none; }

.nav-link {
  flex-shrink:   0;
  padding:       0 14px;
  height:        var(--nav-h);
  display:       flex;
  align-items:   center;
  font-size:     0.875rem;
  font-weight:   500;
  color:         var(--text-secondary);
  border-bottom: 2px solid transparent;
  white-space:   nowrap;
  transition:    all var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  color:           var(--primary);
  border-color:    var(--primary-light);
  text-decoration: none;
}

.nav-link.active {
  color:        var(--primary);
  border-color: var(--primary);
  font-weight:  600;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background:  linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color:       white;
  padding:     72px 0;
  position:    relative;
  overflow:    hidden;
}

/* Patrón geométrico islámico SVG como background */
.hero::before {
  content:    '';
  position:   absolute;
  inset:      0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='12' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position:   relative;
  z-index:    1;
  display:    grid;
  grid-template-columns: 1fr auto;
  gap:        40px;
  align-items: center;
}

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

.hero-text h2 {
  font-size:   clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero-text p {
  font-size:   1.1rem;
  opacity:     0.85;
}

/* Banner próxima oración */
.next-prayer-card {
  background:    rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border:        1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding:       24px 32px;
  text-align:    center;
  min-width:     220px;
  flex-shrink:   0;
}

.next-prayer-label {
  font-size:      0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity:        0.75;
  margin-bottom:  6px;
}

.next-prayer-name {
  font-size:   1.3rem;
  font-weight: 700;
  opacity:     0.95;
}

.next-prayer-time {
  font-size:   3rem;
  font-weight: 700;
  color:       var(--gold-light);
  line-height: 1;
  margin:      4px 0;
  font-variant-numeric: tabular-nums;
}

.next-prayer-countdown {
  font-size: 0.875rem;
  opacity:   0.8;
}

.next-prayer-countdown strong {
  font-size:   1rem;
  font-weight: 700;
  opacity:     1;
}

/* Festivo banner */
.festivo-banner {
  background:    rgba(255,255,255,0.15);
  border:        1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  padding:       12px 20px;
  text-align:    center;
  font-size:     1.1rem;
  font-weight:   600;
  margin-top:    20px;
  display:       none;
}

.festivo-banner.visible { display: block; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:    var(--shadow-sm);
  overflow:      hidden;
  transition:    box-shadow var(--transition), transform var(--transition);
}

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

.card-body { padding: 24px; }

/* ── Grids ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr);   gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr);   gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr);   gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Horarios de Oración ────────────────────────────────── */
.prayer-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap:                   12px;
  margin-top:            24px;
}

.prayer-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  padding:       20px 16px;
  text-align:    center;
  transition:    all var(--transition);
}

.prayer-card--next {
  border-color:  var(--gold);
  background:    linear-gradient(135deg, rgba(184,150,46,0.06), var(--bg-card));
  box-shadow:    0 0 0 2px rgba(184,150,46,0.15);
}

.prayer-card-name {
  font-size:   0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color:       var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.prayer-card-time {
  font-size:   1.6rem;
  font-weight: 700;
  color:       var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.prayer-card-next-label {
  font-size:   0.7rem;
  color:       var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top:  6px;
}

.prayer-source-tabs {
  display:       flex;
  gap:           8px;
  margin-bottom: 24px;
  flex-wrap:     wrap;
}

.prayer-source-tab {
  padding:       8px 18px;
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  background:    var(--bg-card);
  font-size:     0.875rem;
  cursor:        pointer;
  color:         var(--text-secondary);
  transition:    all var(--transition);
  font-weight:   500;
}

.prayer-source-tab.active {
  background:   var(--primary);
  border-color: var(--primary);
  color:        white;
}

/* ── Calendario ─────────────────────────────────────────── */
.calendar-wrap {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow:      hidden;
  box-shadow:    var(--shadow-md);
  max-width:     800px;
  margin:        0 auto;
}

/* Cabecera del calendario — estilo impreso como en la foto */
.cal-header {
  background:  var(--primary);
  color:       white;
  padding:     20px 24px;
  display:     grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap:         16px;
}

.cal-month-name {
  text-align:  center;
  font-size:   2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1;
}

.cal-year {
  display:     block;
  font-size:   1.1rem;
  font-weight: 400;
  opacity:     0.85;
  text-align:  center;
  margin-top:  4px;
}

.cal-adjacent {
  font-size: 0.78rem;
  opacity:   0.7;
  line-height: 1.8;
}

.cal-adjacent-grid {
  display:               grid;
  grid-template-columns: repeat(7, 1fr);
  gap:                   1px;
  font-size:             0.7rem;
  text-align:            center;
}

.cal-adjacent-grid span { padding: 2px; }
.cal-adjacent-grid .sun,
.cal-adjacent-grid .festivo { color: var(--gold-light); font-weight: 700; }

.cal-nav {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         12px 24px;
  background:      rgba(0,0,0,0.15);
}

.cal-nav button {
  background: rgba(255,255,255,0.2);
  border:     1px solid rgba(255,255,255,0.3);
  color:      white;
  padding:    6px 14px;
  border-radius: var(--radius-sm);
  cursor:     pointer;
  font-size:  0.875rem;
  transition: background var(--transition);
}

.cal-nav button:hover { background: rgba(255,255,255,0.3); }
.cal-nav span         { font-weight: 600; font-size: 0.95rem; }

/* Días de la semana */
.cal-weekdays {
  display:               grid;
  grid-template-columns: repeat(7, 1fr);
  background:            var(--primary-dark);
  color:                 white;
  text-align:            center;
}

.cal-weekday {
  padding:     8px 4px;
  font-size:   0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-weekday--friday { color: var(--gold-light); }

/* Semana número */
.cal-week-num {
  background:  var(--bg-section-alt);
  border-right: 1px solid var(--border);
  font-size:   0.72rem;
  color:       var(--text-muted);
  display:     flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Grilla de días */
.cal-grid {
  display:               grid;
  grid-template-columns: 28px repeat(7, 1fr);
}

.cal-day {
  border-top:  1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  padding:     6px;
  min-height:  72px;
  position:    relative;
  cursor:      default;
  background:  var(--bg-card);
  transition:  background var(--transition);
}

.cal-day:hover { background: var(--bg-section-alt); }
.cal-day--other { background: var(--bg-section-alt); }
.cal-day--other .cal-day-num { color: var(--text-muted); }

.cal-day--today {
  background: rgba(26,107,99,0.06);
}

.cal-day-num {
  font-size:   1.55rem;
  font-weight: 900;
  color:       var(--text-primary);
  line-height: 1;
  display:     block;
}

.cal-day--friday .cal-day-num { color: var(--primary); }
.cal-day--sunday .cal-day-num { color: #B0392E; }

.cal-day--today .cal-day-num {
  background:    var(--primary);
  color:         white;
  border-radius: 50%;
  width:         36px;
  height:        36px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.1rem;
}

/* Santo del día (estilo clásico) */
.cal-day-saint {
  font-size:   0.65rem;
  color:       var(--text-muted);
  margin-top:  4px;
  line-height: 1.3;
}

/* Festividades islámicas */
.cal-festivo-dot {
  position:      absolute;
  bottom:        4px;
  left:          50%;
  transform:     translateX(-50%);
  display:       flex;
  gap:           3px;
}

.cal-festivo-dot span {
  width:         6px;
  height:        6px;
  border-radius: 50%;
  display:       block;
}

.dot-ramadan  { background: var(--primary); }
.dot-eid      { background: var(--gold); }
.dot-mawlid   { background: #6B4FA0; }
.dot-normal   { background: var(--text-muted); }

/* Leyenda del calendario */
.cal-legend {
  padding:     16px 24px;
  border-top:  1px solid var(--border);
  display:     flex;
  flex-wrap:   wrap;
  gap:         16px;
  font-size:   0.8rem;
  color:       var(--text-secondary);
}

.cal-legend-item {
  display:     flex;
  align-items: center;
  gap:         6px;
}

.cal-legend-dot {
  width:         10px;
  height:        10px;
  border-radius: 50%;
  flex-shrink:   0;
}

/* Hijri date strip */
.cal-hijri-strip {
  padding:     10px 24px;
  background:  var(--bg-section-alt);
  border-top:  1px solid var(--border-light);
  font-size:   0.82rem;
  color:       var(--text-muted);
  text-align:  center;
}

/* ── Reproductor Corán ──────────────────────────────────── */
.quran-player {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:       32px;
  box-shadow:    var(--shadow-md);
}

.quran-controls-row {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   16px;
  margin-bottom:         32px;
}

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

.form-group {
  display:       flex;
  flex-direction: column;
  gap:           6px;
}

.form-label {
  font-size:   0.8rem;
  font-weight: 600;
  color:       var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-select, .form-input, .form-textarea {
  width:         100%;
  padding:       10px 14px;
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  background:    var(--bg-page);
  color:         var(--text-primary);
  font-size:     0.9rem;
  font-family:   var(--font-sans);
  transition:    border-color var(--transition);
  appearance:    none;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  outline:      none;
  border-color: var(--primary);
  box-shadow:   0 0 0 3px rgba(26,107,99,0.12);
}

.player-info {
  text-align:    center;
  margin-bottom: 20px;
}

.player-info h3 { font-size: 1.2rem; color: var(--text-primary); }
.player-info p  { font-size: 0.875rem; color: var(--text-muted); }

.progress-bar-wrap {
  background:    var(--bg-section-alt);
  border-radius: 4px;
  height:        5px;
  cursor:        pointer;
  margin-bottom: 8px;
  overflow:      hidden;
}

.progress-bar-fill {
  height:     100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 4px;
  width:      0%;
  transition: width 0.3s linear;
}

.time-row {
  display:         flex;
  justify-content: space-between;
  font-size:       0.78rem;
  color:           var(--text-muted);
  margin-bottom:   16px;
  font-variant-numeric: tabular-nums;
}

.player-controls {
  display:         flex;
  justify-content: center;
  align-items:     center;
  gap:             12px;
  margin-bottom:   24px;
}

.player-btn {
  width:         44px;
  height:        44px;
  border-radius: 50%;
  border:        1px solid var(--border);
  background:    var(--bg-card);
  cursor:        pointer;
  display:       flex;
  align-items:   center;
  justify-content: center;
  color:         var(--text-secondary);
  transition:    all var(--transition);
}

.player-btn:hover { border-color: var(--primary); color: var(--primary); }

.player-btn--play {
  width:        60px;
  height:       60px;
  background:   var(--primary);
  border-color: var(--primary);
  color:        white;
  font-size:    1.2rem;
}

.player-btn--play:hover {
  background:   var(--primary-dark);
  border-color: var(--primary-dark);
  color:        white;
}

.player-btn svg { width: 20px; height: 20px; }
.player-btn--play svg { width: 24px; height: 24px; }

/* Versos */
.verses-container { margin-top: 16px; }

.verse-row {
  display:       grid;
  grid-template-columns: 36px 1fr;
  gap:           16px;
  padding:       16px;
  border-radius: var(--radius-md);
  border:        1px solid transparent;
  transition:    all var(--transition);
  cursor:        pointer;
}

.verse-row:hover         { background: var(--bg-section-alt); }
.verse-row.active        { background: rgba(26,107,99,0.06); border-color: var(--primary-light); }

.verse-num {
  width:         36px;
  height:        36px;
  border-radius: 50%;
  border:        1px solid var(--border);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     0.78rem;
  font-weight:   700;
  color:         var(--text-muted);
  flex-shrink:   0;
}

.verse-row.active .verse-num {
  background:   var(--primary);
  border-color: var(--primary);
  color:        white;
}

.verse-arabic {
  font-family: var(--font-arabic);
  font-size:   1.45rem;
  line-height: 2;
  direction:   rtl;
  text-align:  right;
  color:       var(--text-primary);
  margin-bottom: 8px;
}

.verse-translation {
  font-size:   0.875rem;
  color:       var(--text-secondary);
  line-height: 1.7;
}

/* ── Hadiz ──────────────────────────────────────────────── */
.hadith-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-left:   4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding:       32px;
  max-width:     720px;
  margin:        0 auto;
  box-shadow:    var(--shadow-md);
}

.hadith-text {
  font-size:   1.1rem;
  line-height: 1.8;
  color:       var(--text-primary);
  font-style:  italic;
  margin-bottom: 16px;
}

.hadith-source {
  font-size:   0.82rem;
  color:       var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Duas ───────────────────────────────────────────────── */
.duas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.dua-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  padding:       24px;
  transition:    box-shadow var(--transition);
}

.dua-card:hover { box-shadow: var(--shadow-md); }

.dua-category-label {
  font-size:     0.75rem;
  font-weight:   700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color:         var(--primary);
  margin-bottom: 12px;
}

.dua-arabic {
  font-family:   var(--font-arabic);
  font-size:     1.35rem;
  line-height:   2.2;
  direction:     rtl;
  text-align:    right;
  color:         var(--text-primary);
  margin-bottom: 12px;
}

.dua-translation {
  font-size:     0.9rem;
  color:         var(--text-secondary);
  line-height:   1.7;
  margin-bottom: 8px;
}

.dua-reference {
  font-size:   0.75rem;
  color:       var(--text-muted);
  font-style:  italic;
}

/* ── Tasbih ─────────────────────────────────────────────── */
.tasbih-card {
  max-width:     500px;
  margin:        0 auto;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:       32px;
  text-align:    center;
  box-shadow:    var(--shadow-md);
}

.tasbih-selector {
  display:         flex;
  flex-wrap:       wrap;
  gap:             8px;
  justify-content: center;
  margin-bottom:   28px;
}

.tasbih-type-btn {
  padding:       8px 18px;
  border:        1px solid var(--border);
  border-radius: 24px;
  background:    var(--bg-page);
  font-family:   var(--font-arabic);
  font-size:     1rem;
  direction:     rtl;
  cursor:        pointer;
  color:         var(--text-primary);
  transition:    all var(--transition);
}

.tasbih-type-btn:hover  { border-color: var(--primary); }
.tasbih-type-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.tasbih-phrase  { font-family: var(--font-arabic); font-size: 2rem; direction: rtl; margin-bottom: 4px; color: var(--text-primary); line-height: 1.8; }
.tasbih-transl  { font-size: 0.875rem; color: var(--gold); font-weight: 600; margin-bottom: 20px; }

.tasbih-btn {
  width:         140px;
  height:        140px;
  border-radius: 50%;
  background:    linear-gradient(135deg, var(--primary), var(--primary-dark));
  border:        none;
  cursor:        pointer;
  box-shadow:    0 6px 24px rgba(26,107,99,0.35), inset 0 2px 4px rgba(255,255,255,0.15);
  color:         white;
  display:       flex;
  flex-direction: column;
  align-items:   center;
  justify-content: center;
  margin:        0 auto 24px;
  transition:    transform 0.1s;
  user-select:   none;
  -webkit-tap-highlight-color: transparent;
  position:      relative;
}

.tasbih-btn:active { transform: scale(0.92); }
.tasbih-count      { font-size: 3.2rem; font-weight: 700; line-height: 1; }
.tasbih-total-num  { font-size: 0.85rem; opacity: 0.75; }

/* SVG ring */
.tasbih-ring-wrap  { position: absolute; inset: -14px; pointer-events: none; }
.tasbih-ring-svg   { width: 100%; height: 100%; transform: rotate(-90deg); }
.tasbih-ring-bg    { fill: none; stroke: var(--border); stroke-width: 4; }
.tasbih-ring-fill  { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.3s ease; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           8px;
  padding:       10px 22px;
  border-radius: var(--radius-sm);
  font-size:     0.9rem;
  font-weight:   600;
  cursor:        pointer;
  transition:    all var(--transition);
  border:        1px solid transparent;
  text-decoration: none;
  white-space:   nowrap;
}

.btn-primary   { background: var(--primary);   color: white;               border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--primary);   border-color: var(--primary); }
.btn-secondary:hover { background: rgba(26,107,99,0.08); text-decoration: none; }
.btn-ghost     { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-secondary); color: var(--text-primary); text-decoration: none; }
.btn-danger    { background: #C0392B; color: white; border-color: #C0392B; }
.btn-danger:hover { background: #A93226; }
.btn-whatsapp  { background: #25D366; color: white; border-color: #25D366; }
.btn-whatsapp:hover { background: #1DAE52; }
.btn--sm { padding: 7px 16px; font-size: 0.82rem; }
.btn--lg { padding: 13px 28px; font-size: 1rem; }
.btn--icon { padding: 10px; }
.btn svg { width: 18px; height: 18px; }

/* ── Badges / Tags ──────────────────────────────────────── */
.badge {
  display:        inline-block;
  padding:        3px 10px;
  border-radius:  20px;
  font-size:      0.72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary  { background: rgba(26,107,99,0.12);  color: var(--primary); }
.badge-gold     { background: rgba(184,150,46,0.12); color: var(--gold); }
.badge-ramadan  { background: rgba(27,94,114,0.12);  color: #1B5E72; }
.badge-eid      { background: rgba(46,107,62,0.12);  color: #2E6B3E; }
.badge-success  { background: rgba(39,174,96,0.12);  color: #1E8449; }
.badge-danger   { background: rgba(192,57,43,0.12);  color: #922B21; }

/* ── Evento Cards ───────────────────────────────────────── */
.evento-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  border-top:    4px solid var(--primary);
  padding:       24px;
  box-shadow:    var(--shadow-sm);
  transition:    all var(--transition);
}

.evento-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.evento-date { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.evento-card h3 { margin-bottom: 8px; }
.evento-card p  { color: var(--text-secondary); font-size: 0.9rem; }
.evento-hora    { font-size: 0.82rem; color: var(--gold); font-weight: 600; margin-top: 12px; display: flex; align-items: center; gap: 6px; }

/* ── Contacto ───────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }

.contact-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:       28px 24px;
  text-align:    center;
  box-shadow:    var(--shadow-sm);
}

.contact-icon {
  width:         48px;
  height:        48px;
  background:    rgba(26,107,99,0.1);
  border-radius: 12px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin:        0 auto 16px;
}

.contact-icon svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; }
.contact-card h3  { margin-bottom: 8px; }
.contact-card p   { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background:   var(--primary-dark);
  color:        rgba(255,255,255,0.7);
  padding:      48px 0 24px;
  margin-top:   0;
}

.footer-grid {
  display:               grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap:                   40px;
  margin-bottom:         40px;
}

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

.footer-brand h3 { color: white; margin-bottom: 8px; }
.footer-brand p  { font-size: 0.875rem; line-height: 1.7; }
.footer h4 { color: rgba(255,255,255,0.9); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }

.footer-links {
  list-style: none;
  display:    flex;
  flex-direction: column;
  gap:        8px;
}

.footer-links a {
  color:       rgba(255,255,255,0.65);
  font-size:   0.875rem;
  transition:  color var(--transition);
  text-decoration: none;
}

.footer-links a:hover { color: white; text-decoration: none; }

.footer-bottom {
  border-top:  1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display:     flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap:   wrap;
  gap:         12px;
  font-size:   0.82rem;
}

.footer-bottom a { color: rgba(255,255,255,0.65); }

/* ── Cookie Banner ──────────────────────────────────────── */
.cookie-banner {
  position:      fixed;
  bottom:        20px;
  left:          50%;
  transform:     translateX(-50%);
  z-index:       999;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:    var(--shadow-lg);
  padding:       20px 24px;
  max-width:     560px;
  width:         calc(100% - 32px);
  display:       none;
}

.cookie-banner.visible { display: block; animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cookie-banner p   { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 16px; }
.cookie-btn-row    { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn-row .btn { flex: 1; justify-content: center; }

/* ── Festivo Overlay ────────────────────────────────────── */
.festivo-header-strip {
  background:  linear-gradient(90deg, var(--primary-dark), var(--primary), var(--gold), var(--primary));
  background-size: 300% 100%;
  animation:   shiftBg 6s ease infinite;
  color:       white;
  text-align:  center;
  padding:     8px 16px;
  font-size:   0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display:     none;
}

.festivo-header-strip.visible { display: block; }

@keyframes shiftBg {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ── PWA install btn ────────────────────────────────────── */
.pwa-install-btn {
  position:      fixed;
  bottom:        20px;
  right:         20px;
  z-index:       90;
  display:       none;
}
.pwa-install-btn.visible { display: block; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display:     flex;
  align-items: center;
  gap:         6px;
  font-size:   0.82rem;
  color:       var(--text-muted);
  padding:     12px 0;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb svg { width: 14px; height: 14px; }

/* ── Loading states ─────────────────────────────────────── */
.skeleton {
  background:          var(--bg-section-alt);
  background-image:    linear-gradient(90deg, var(--bg-section-alt) 25%, var(--border-light) 50%, var(--bg-section-alt) 75%);
  background-size:     400% 100%;
  animation:           shimmer 1.5s ease infinite;
  border-radius:       var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* ── Error states ───────────────────────────────────────── */
.error-box {
  background:    rgba(192,57,43,0.08);
  border:        1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-md);
  padding:       16px 20px;
  color:         #922B21;
  font-size:     0.9rem;
}

/* ── RTL adjustments ────────────────────────────────────── */
[dir="rtl"] .logo-wrap          { flex-direction: row-reverse; }
[dir="rtl"] .header-top         { flex-direction: row-reverse; }
[dir="rtl"] .nav-main           { flex-direction: row-reverse; }
[dir="rtl"] .footer-bottom      { flex-direction: row-reverse; }
[dir="rtl"] .hadith-card        { border-left: 1px solid var(--border); border-right: 4px solid var(--primary); }
[dir="rtl"] .prayer-card-name   { letter-spacing: 0; }
[dir="rtl"] .cal-header         { direction: rtl; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .hero    { padding: 48px 0; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .next-prayer-card { width: 100%; }
  .quran-player { padding: 20px; }
  .prayer-grid { grid-template-columns: repeat(3, 1fr); }
  .cal-header { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .cal-adjacent { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .prayer-card-time { font-size: 1.3rem; }
  .cal-day { min-height: 52px; }
  .cal-day-num { font-size: 1.15rem; }
  .tasbih-btn { width: 120px; height: 120px; }
  .tasbih-count { font-size: 2.6rem; }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .header, .nav-main, .cookie-banner, .pwa-install-btn, .festivo-header-strip { display: none; }
  .section { padding: 24px 0; }
  .card, .prayer-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ── Logo imagen real ────────────────────────────────────── */
.logo-img {
  width:         48px;
  height:        48px;
  border-radius: 10px;
  object-fit:    contain;
  flex-shrink:   0;
  background:    #0a2e2a; /* fondo oscuro para que se vea bien el logo */
}

/* Versión pequeña en el admin sidebar */
.admin-sidebar-logo .logo-img {
  width:         36px;
  height:        36px;
  border-radius: 8px;
}
