/* ==========================================================================
   New Vision Assembly (newvisionassembly.in)
   Modern Design System & Stylesheet
   ========================================================================== */

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

:root {
  --bg-dark: #07080e;
  --bg-surface: #0f111a;
  --bg-surface-elevated: #161826;
  --bg-glass: rgba(18, 20, 32, 0.7);
  --bg-glass-card: rgba(255, 255, 255, 0.03);
  --bg-glass-card-hover: rgba(255, 255, 255, 0.07);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 166, 35, 0.4);
  
  --accent-gold: #f5a623;
  --accent-gold-hover: #ffb83d;
  --accent-gold-glow: rgba(245, 166, 35, 0.25);
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  
  --accent-rose: #f43f5e;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-tamil: #f59e0b;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-tamil: 'Noto Sans Tamil', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 25px var(--accent-gold-glow);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & global styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

/* Tamil Typography helper */
.ta-text {
  font-family: var(--font-tamil);
  color: var(--text-tamil);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, textarea, select {
  font: inherit;
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background: rgba(7, 8, 14, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo img {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--accent-gold-glow));
}

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

.brand-title {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 2px;
  transition: var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d97706 100%);
  color: #07080e;
  box-shadow: 0 4px 20px var(--accent-gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(245, 166, 35, 0.4);
  background: linear-gradient(135deg, var(--accent-gold-hover) 0%, #b45309 100%);
}

.btn-secondary {
  background: var(--bg-glass-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
  background: var(--accent-gold);
  color: #07080e;
  transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .mobile-toggle {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-surface-elevated);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }
  .nav-links.open {
    transform: translateY(0);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(139, 92, 246, 0.15) 0%, rgba(7, 8, 14, 1) 70%);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  mix-blend-mode: luminosity;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7,8,14,0.4) 0%, rgba(7,8,14,0.95) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  box-shadow: 0 0 10px var(--accent-rose);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.verse-banner {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-gold);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 2rem auto;
  max-width: 700px;
  text-align: left;
  backdrop-filter: blur(10px);
}

.verse-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.verse-ref {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-glass-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

/* Service Schedule Grid */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

.schedule-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.schedule-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(245, 166, 35, 0.1);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.schedule-time {
  display: inline-block;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.schedule-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.schedule-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Video Grid / Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.video-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-surface-elevated);
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card:hover .video-thumb {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-btn-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #07080e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.6);
  transform: scale(0.8);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.video-details {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

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

.video-meta {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tabs */
.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent-gold);
  color: #07080e;
  border-color: var(--accent-gold);
}

/* Social Media Floating Bar & Grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.social-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.social-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.social-icon.yt { background: rgba(255, 0, 0, 0.15); color: #ff0000; }
.social-icon.fb { background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.social-icon.ig { background: rgba(225, 48, 108, 0.15); color: #e1306c; }
.social-icon.wa { background: rgba(37, 211, 102, 0.15); color: #25d366; }

.social-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.social-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Form Styles */
.form-container {
  max-width: 650px;
  margin: 0 auto;
}

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

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

.form-control {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px var(--accent-gold-glow);
  background: rgba(255, 255, 255, 0.08);
}

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

/* Pastor Bio Section */
.pastor-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

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

.pastor-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  border: 1px solid var(--border-subtle);
  aspect-ratio: 4 / 3;
  max-height: 480px;
}

.pastor-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pastor-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  padding: 1rem;
  background: rgba(7, 8, 14, 0.85);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.pastor-badge h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.pastor-badge p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

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

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

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 320px;
  font-size: 0.95rem;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal for Video Player */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

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

.modal-content {
  width: 90%;
  max-width: 900px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px rgba(0,0,0,0.9);
  transform: scale(0.95);
  transition: var(--transition-normal);
}

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

.modal-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--accent-gold);
}

.modal-body {
  position: relative;
  aspect-ratio: 16 / 9;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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