/* General Reset & Variables */
:root {
  --primary: #c85a17;       /* Spiritual Saffron */
  --primary-glow: rgba(200, 90, 23, 0.4);
  --gold: #D4AF37;          /* Metallic Gold */
  --gold-light: #f3e5ab;
  --bg-dark: #0c0500;       /* Rich Deep Charcoal/Black */
  --card-bg: rgba(30, 16, 5, 0.65); /* Glassmorphic Saffron-Tinted Dark */
  --text-white: #f5f0eb;
  --text-muted: #bcaba0;
  --border-color: rgba(212, 175, 55, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at top, #2b1404 0%, #0c0500 100%) no-repeat;
  background-attachment: fixed;
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  padding: 20px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* Typography */
h1, h2, h3, .serif-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Page Layout Container */
.app-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
  margin-bottom: 60px;
}

/* Header Branding */
header {
  text-align: center;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

header .logo-text {
  font-size: 2.2rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

header .logo-text span {
  color: var(--gold);
}

header .tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(200, 90, 23, 0.1);
}

/* Glassmorphic Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}

/* Review Prompt / Interactive Widget Card */
.review-prompt-card {
  text-align: center;
}

.review-prompt-card h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--text-white);
}

.review-prompt-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Rating Stars Styling */
.stars-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  direction: ltr; /* Ensure left-to-right hovering */
}

.star {
  font-size: 2.8rem;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease, text-shadow 0.2s ease;
}

.star.hovered, .star.active {
  color: var(--gold);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
  transform: scale(1.15);
}

.star:active {
  transform: scale(0.9);
}

/* Smart Gated Sections */
.gated-section {
  display: none; /* Controlled via JS */
  animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 5-Star Success Display */
.success-msg {
  padding-top: 10px;
}

.success-msg h3 {
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.success-msg p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Large Saffron CTA buttons */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #b04910 100%);
  border: 1px solid var(--gold);
  border-radius: 30px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 24px;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(200, 90, 23, 0.7), 0 0 15px rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, #e0651a 0%, #be4f11 100%);
}

.btn-cta:active {
  transform: translateY(1px);
}

.btn-cta svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* QR Code Kiosk Display (For tablets/non-mobiles) */
.qr-display-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
  padding-top: 20px;
  border-top: 1px dashed rgba(212, 175, 55, 0.2);
}

.qr-display-container p {
  font-size: 0.8rem !important;
  margin-bottom: 12px !important;
}

.qr-image {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 1-4 Stars Negative Feedback Box */
.feedback-form-container h3 {
  font-size: 1.4rem;
  color: var(--text-white);
  margin-bottom: 8px;
}

.feedback-form-container textarea {
  width: 100%;
  height: 100px;
  background: rgba(20, 10, 3, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 16px;
}

.feedback-form-container textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #30e374 0%, #16a090 100%);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* Devotee Polaroid Gallery */
.gallery-section h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 20px;
  color: var(--gold-light);
  position: relative;
}

.gallery-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 8px auto 0 auto;
}

/* Testimonial slider / mobile horizontal scroll */
.testimonials-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 10px 24px 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.testimonials-slider::-webkit-scrollbar {
  height: 4px;
}
.testimonials-slider::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
}

/* Polaroid Card Style */
.polaroid-card {
  flex: 0 0 250px;
  scroll-snap-align: center;
  background: #fdfbf7; /* Matte paper white */
  padding: 12px 12px 18px 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Give random tilts to cards on desktops for organic look */
@media (min-width: 600px) {
  .polaroid-card:nth-child(even) {
    transform: rotate(2.5deg);
  }
  .polaroid-card:nth-child(odd) {
    transform: rotate(-2.5deg);
  }
  .polaroid-card:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    z-index: 10;
  }
}

.polaroid-img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #e6e0d5;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1px;
}

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

.polaroid-card:hover .polaroid-img {
  transform: scale(1.06);
}

.polaroid-caption {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  color: #3e2713;
  margin-top: 14px;
  text-align: center;
  line-height: 1.3;
  width: 100%;
}

.polaroid-stars {
  color: var(--gold);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* Footer Section */
footer {
  text-align: center;
  padding: 20px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  margin-top: auto;
  width: 100%;
  max-width: 600px;
}

footer a {
  color: var(--gold);
  text-decoration: none;
}

/* Printable Mode Styling (Hidden by default) */
.print-section {
  display: none;
}

/* PRINT MEDIA OVERRIDES */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
    min-height: auto !important;
  }
  
  .app-container, footer {
    display: none !important;
  }
  
  .print-section {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 40px;
    box-sizing: border-box;
    page-break-after: always;
  }
  
  .print-border {
    border: 8px double #c85a17;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    background: #fff;
    box-shadow: none;
  }

  .print-header {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    color: #c85a17;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
  }
  
  .print-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #555;
    margin-bottom: 30px;
  }
  
  .print-qr-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    background: #fff;
  }

  .print-qr {
    width: 320px;
    height: 320px;
  }
  
  .print-instructions {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: #444;
    margin-top: 30px;
    line-height: 1.4;
  }
  
  .print-blessing {
    font-size: 2.2rem;
    color: #c85a17;
    font-weight: bold;
    margin-top: 15px;
  }
}
