/* =================================================
   BHARATHSAADHI — ROYAL WEDDING THEME
   Production Ready — Clean & Optimised
   ================================================= */

/* --- Variables --- */
:root {
  --color-primary:      #800020;
  --color-primary-dark: #5c0016;
  --color-gold:         #d4af37;
  --color-gold-light:   #f3e5ab;

  --bg-body:  #fdfbf7;
  --bg-white: #ffffff;
  --bg-light: #f7f3e8;

  --text-main:  #1a1a1a;
  --text-muted: #666666;

  --font-heading: 'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;

  --shadow:    0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius:    8px;
  --radius-lg: 12px;

  --transition: 0.3s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin: 0 0 15px;
  font-weight: 700;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Buttons --- */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(128, 0, 32, 0.25);
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover  { background: var(--color-primary-dark); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.large  { padding: 14px 32px; font-size: 1.1rem; }

.btn-secondary {
  background: transparent;
  border: 1px solid #ccc;
  color: var(--text-main);
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-secondary:hover { background: #eee; }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.8);
  padding: 12px 28px;
  border-radius: 50px;
  display: inline-block;
  transition: background var(--transition);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

.btn-submit {
  background: var(--color-gold);
  color: #3e2b00;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-submit:hover  { background: #e5c14d; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.brand {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--color-primary);
  font-weight: 800;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: #444;
}
.main-nav a:hover { color: var(--color-primary); }

/* Mobile menu toggle — hidden on desktop */
.mobile-menu-toggle {
  display: none;
  font-size: 22px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-primary);
  padding: 4px 8px;
  line-height: 1;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(60,0,15,0.92), rgba(60,0,15,0.4));
  z-index: 2;
}
.hero-inner { position: relative; z-index: 3; }
.hero-content { max-width: 600px; }
.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.hero-content .lead {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  opacity: 0.85;
}

/* --- Sections --- */
.section { padding: 80px 0; }
.section--light { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.5rem; color: var(--color-primary); }
.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.feature-card {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform var(--transition);
}
.feature-card:hover { transform: translateY(-5px); }
.feature-card .icon { font-size: 40px; margin-bottom: 15px; }

/* --- Story Cards --- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.story-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.story-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}
.story-card:hover img { transform: scale(1.04); }
.story-info { padding: 25px; }
.story-info h3 { color: var(--color-primary); font-size: 1.2rem; }
.story-info p  { font-style: italic; font-size: 0.95rem; color: #555; margin: 0; }

/* --- How It Works --- */
.steps-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.step-item {
  flex: 1;
  min-width: 240px;
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid #eee;
}
.step-num {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 15px;
  font-size: 1rem;
}

/* --- FAQ --- */
.faq-container { max-width: 800px; }
.faq-item { margin-bottom: 10px; border-bottom: 1px solid #ddd; }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 15px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 10px;
}
.faq-q:hover { color: var(--color-primary-dark); }
.faq-a {
  display: none;
  padding-bottom: 20px;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.active .faq-a { display: block; }
.faq-item.active .toggle {
  transform: rotate(45deg);
  display: inline-block;
  transition: transform 0.2s;
}
.toggle { transition: transform 0.2s; flex-shrink: 0; }

/* --- Contact Form --- */
.contact-form-wrapper {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid #eee;
}

/* --- Footer --- */
.site-footer {
  background: #1a0509;
  color: #fff;
  padding-top: 60px;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}
.brand-footer {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--color-gold);
  margin-bottom: 10px;
}
.footer-col h4 {
  color: var(--color-gold);
  font-size: 1rem;
  margin-bottom: 15px;
  font-family: var(--font-heading);
}
.footer-col p { color: #bbb; margin: 4px 0; font-size: 0.9rem; }
.footer-col a { color: #ccc; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  color: #888;
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  opacity: 1;
  visibility: visible;
}
/* Hidden state — uses opacity so transition works */
.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.modal-panel {
  position: relative;
  background: var(--bg-white);
  width: 90%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  padding: 30px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2;
  /* Slide up animation */
  transform: translateY(0);
  transition: transform 0.25s ease;
}
.modal.hidden .modal-panel { transform: translateY(16px); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--color-primary); background: #f5f5f5; }

/* --- Wizard --- */
.wizard-header { margin-bottom: 5px; }
.wizard-header h3 { margin-bottom: 10px; font-size: 1.3rem; }
.progress-bar {
  height: 5px;
  background: #eee;
  border-radius: 3px;
  margin-bottom: 25px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 25%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 0.35s ease;
}
.step-panel.hidden { display: none; }
.step-title {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.15rem;
  font-family: var(--font-heading);
}

/* --- Form Inputs --- */
label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.88rem;
  color: #444;
}
.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  margin-bottom: 14px;
  background: var(--bg-white);
  color: var(--text-main);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}
.form-textarea {
  resize: vertical;
  font-family: var(--font-body);
  min-height: 120px;
}

/* --- Dynamic Fields --- */
.row-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.hidden-field {
  display: none;
  margin-top: 4px;
  animation: fieldFadeIn 0.3s ease-out;
}
@keyframes fieldFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Radio Tiles --- */
.radio-group-tile {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tile { position: relative; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.tile span {
  display: block;
  padding: 9px 20px;
  border: 1px solid #ddd;
  border-radius: 50px;
  background: #f9f9f9;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.tile input:checked + span {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.tile:hover span { border-color: var(--color-primary); }

/* Inline Radio */
.radio-group-inline {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  align-items: center;
}
.radio-group-inline label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 400;
  margin-bottom: 0;
}

/* --- Form Actions --- */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}
.form-actions.right { justify-content: flex-end; }

/* --- Error Messages --- */
.error-msg {
  color: #d93025;
  font-size: 0.82rem;
  margin-top: -10px;
  margin-bottom: 10px;
  display: block;
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 768px) {

  /* Mobile nav */
  .mobile-menu-toggle { display: block; }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 400;
    border-top: 1px solid #f0f0f0;
    gap: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid #f5f5f5;
    font-size: 15px;
  }
  .main-nav .btn-primary {
    margin-top: 12px;
    width: 100%;
    text-align: center;
  }

  /* Hero */
  .hero { height: auto; padding: 80px 0 60px; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content .lead { font-size: 1rem; }
  .trust-badges { gap: 8px; font-size: 0.8rem; }

  /* Sections */
  .section { padding: 50px 0; }
  .section-header h2 { font-size: 1.9rem; }

  /* Steps */
  .steps-container { flex-direction: column; }

  /* Age/Height row */
  .row-2-cols { grid-template-columns: 1fr; }

  /* Modal */
  .modal-panel { padding: 20px; width: 95%; max-height: 95vh; }

  /* Contact form */
  .contact-form-wrapper { padding: 24px; }

  /* Story grid */
  .story-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.9rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn-primary,
  .hero-btns .btn-ghost { width: 100%; text-align: center; }
  .section-header h2 { font-size: 1.6rem; }
  .brand { font-size: 20px; }
}