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

:root {
  /* Core Palette - Indigo & Slate */
  --primary: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --accent: #0ea5e9;
  --bg-main: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  
  /* Surfaces */
  --card-bg: rgba(255, 255, 255, 0.85);
  --nav-bg: rgba(255, 255, 255, 0.82);
  
  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Radius */
  --radius-lg: 18px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  font-size: 18px; /* Slightly larger base for better readability */
}

@media (max-width: 767px) {
  html {
    font-size: 16px; /* Optimized for mobile screens */
  }
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.03) 0%, transparent 40%);
  color: var(--text-main);
  line-height: 1.7;
  margin: 0;
  scroll-behavior: smooth;
}

/* Utilities */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* Navbar Refinement */
.navbar-trans {
  background: var(--nav-bg) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 1rem 0;
}

.navbar-brand #title {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--primary);
}

/* Card System Refinement */
.modern-card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

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

.modern-card header h3 {
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--primary);
  font-size: 1.25rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1.5rem 0;
}

.message-card {
  max-width: 450px; /* Limits width when few cards are present */
}

/* Buttons */
.btn-modern {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-modern {
  background: var(--primary);
  color: white !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.btn-primary-modern:hover {
  background: #4338ca;
  transform: scale(1.02);
}

.btn-info-modern {
  background: #f1f5f9;
  color: var(--text-main) !important;
  border: 1px solid #e2e8f0;
}

/* Badge for accents */
.badge-modern {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.modern-card header h3 {
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
  font-size: 1.15rem;
  line-height: 1.3;
}

.modern-card header p {
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

/* Button scaling for cards */
.modern-card .btn-modern {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Typography Scales */
h1 { font-size: 2.5rem; margin-bottom: 2rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--primary); }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

.panel-title {
  font-size: 1.4rem !important; /* Larger yearly titles */
  font-weight: 700 !important;
}

#sundaysMessages {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 400;
}

.modern-card p {
  font-size: 1.25rem !important; /* Larger message titles */
  line-height: 1.5;
}

.badge-modern {
  font-size: 0.85rem !important;
  padding: 6px 14px !important;
  letter-spacing: 0.05em;
}

.card-footer-meta {
  font-size: 1.1rem !important; /* Larger Speaker/Verse info */
}

.card-footer-meta h6 {
  font-size: 1.1rem !important;
  margin: 4px 0;
  font-weight: inherit !important;
}

.btn-modern {
  padding: 10px 22px !important;
  font-size: 1.05rem !important;
}

.message-topic {
  font-weight: 600 !important;
  font-size: 1.25rem !important;
  color: var(--text-main);
  margin-top: 5px;
}

.card-footer-meta {
  border-top: 1px solid #f1f5f9;
  padding-top: 1.25rem;
  margin-top: auto;
}

.speaker-meta {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.15rem;
}

.verse-meta {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
  font-size: 1.05rem;
}

/* Persistent Navbar Actions */
.nav-persistent-actions {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Navbar Highlight Button */
.btn-nav-highlight {
  background: var(--accent);
  color: white !important;
  border-radius: var(--radius-sm);
  margin-left: 10px;
  margin-top: -10px; /* User preferred centering adjustment */
  padding: 8px 16px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .btn-nav-highlight {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
    margin-right: 10px;
    margin-top: -10px; /* Consistently apply user preference on mobile */
  }
}

.btn-nav-highlight:hover {
  background: #0284c7 !important; /* Slightly darker cyan */
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
}

@media (max-width: 767px) {
  .btn-nav-highlight {
    margin: 10px 0; /* Full width on mobile */
    text-align: center;
  }
}

/* Pulse animation for Live */
@keyframes pulse-live {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}
.live-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: pulse-live 1.5s infinite;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 4rem 0 2rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, #e2e8f0, transparent);
}

.footer-modern {
  margin-top: 6rem;
  padding: 4rem 0;
  background: #f1f5f9;
  text-align: center;
  color: var(--text-muted);
}
