/* ============================================================
   NOCTURA DORADA — Custom Styles
   Technologies: Tailwind CSS (CDN) + Custom CSS
   Palette: Royal Blue #1B2A6B | Gold #C8A23D | White #FFFFFF
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --blue: #1B2A6B;
  --blue-dark: #111D4A;
  --blue-light: #E8EBF7;
  --gold: #C8A23D;
  --gold-light: #F5F0E1;
  --gold-hover: #B8922F;
  --bg: #FFFFFF;
  --bg-alt: #F7F8FC;
  --text: #1A1A2E;
  --text-muted: #6B7088;
  --text-light: #9BA0B8;
  --border: #E4E6EF;
  --success: #2ECC71;
  --danger: #E74C3C;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* --- Base Reset & Defaults --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; transition: all 0.2s; }
input, textarea, select { font-family: inherit; outline: none; }

/* --- Typography --- */
.font-display { font-family: 'Playfair Display', serif; }
.font-body { font-family: 'DM Sans', sans-serif; }

/* --- Navbar --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: all 0.3s ease;
  background: transparent;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled .nav-link { color: var(--text); }
.navbar.scrolled .nav-link:hover { color: var(--gold); }
.navbar.scrolled .nav-logo { color: var(--blue); }
.nav-link {
  font-size: 13px; font-weight: 500; letter-spacing: 0.3px;
  color: rgba(255,255,255,0.85);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: white; letter-spacing: 1px;
}
.nav-logo span { color: var(--gold); }

/* --- Mobile Menu --- */
.mobile-menu { display: none; }
.hamburger { display: none; cursor: pointer; padding: 8px; }
.hamburger span {
  display: block; width: 22px; height: 2px; border-radius: 1px;
  background: white; margin-bottom: 5px; transition: all 0.3s;
}
.hamburger span:last-child { margin-bottom: 0; width: 16px; }
.navbar.scrolled .hamburger span { background: var(--text); }

@media (max-width: 768px) {
  .desktop-nav { display: none !important; }
  .hamburger { display: block; }
  .mobile-menu.open {
    display: flex; flex-direction: column;
    background: white; padding: 16px 24px; gap: 12px;
    border-top: 1px solid var(--border);
  }
  .mobile-menu .nav-link { color: var(--text); font-size: 15px; padding: 10px 0; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  transition: all 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold {
  background: var(--gold); color: white;
}
.btn-gold:hover { background: var(--gold-hover); box-shadow: 0 4px 16px rgba(200,162,61,0.3); }
.btn-blue {
  background: var(--blue); color: white;
}
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline {
  background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-outline-dark {
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn-outline-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-lg { padding: 16px 36px; font-size: 15px; }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* --- Hero Section --- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.3);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,42,107,0.4) 0%, rgba(17,29,74,0.85) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 0 24px; max-width: 750px;
}

/* --- Countdown --- */
.countdown-container {
  display: flex; justify-content: center; gap: 16px;
  margin: 32px 0;
}
.countdown-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md); padding: 16px 20px;
  min-width: 80px; text-align: center;
}
.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: 32px; font-weight: 700; color: var(--gold);
  line-height: 1;
}
.countdown-label {
  font-size: 11px; color: rgba(255,255,255,0.5);
  letter-spacing: 2px; text-transform: uppercase; margin-top: 6px;
}

@media (max-width: 480px) {
  .countdown-item { min-width: 60px; padding: 12px 10px; }
  .countdown-number { font-size: 24px; }
  .countdown-label { font-size: 9px; }
}

/* --- Section Styles --- */
.section { padding: 96px 24px; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--blue-dark);
  color: white;
}
.section-label {
  font-size: 12px; font-weight: 600; color: var(--gold);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700; color: var(--blue);
  line-height: 1.2; margin-bottom: 12px;
}
.section-dark .section-title { color: white; }
.section-subtitle {
  font-size: 15px; color: var(--text-muted);
  max-width: 550px; margin: 0 auto; line-height: 1.7;
}
.section-dark .section-subtitle { color: rgba(255,255,255,0.6); }

/* --- Cards --- */
.card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px 24px;
  transition: all 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-popular {
  border: 2px solid var(--gold);
  box-shadow: 0 8px 32px rgba(200,162,61,0.12);
  position: relative;
}

/* --- Ticket Cards --- */
.ticket-card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 0;
  overflow: hidden; transition: all 0.3s;
  display: flex; flex-direction: column;
}
.ticket-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.ticket-card.popular { border: 2px solid var(--gold); }
.ticket-header {
  padding: 32px 24px 24px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.ticket-body { padding: 24px; flex: 1; }
.ticket-footer { padding: 16px 24px 24px; }

/* --- Stats --- */
.stat-item { text-align: center; padding: 24px; }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 42px; font-weight: 700; color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 14px; color: var(--text-muted); margin-top: 8px;
}

/* --- Timeline --- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute; left: -32px; top: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); border: 4px solid var(--gold-light);
}
.timeline-time {
  font-size: 13px; font-weight: 600; color: var(--gold);
  letter-spacing: 1px; margin-bottom: 4px;
}
.timeline-content {
  background: white; border-radius: var(--radius-md);
  border: 1px solid var(--border); padding: 20px;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 4/3; position: relative;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.08); }

/* --- Testimonials --- */
.testimonial-card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 28px;
}
.testimonial-stars { color: var(--gold); font-size: 16px; margin-bottom: 12px; }
.testimonial-text {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 16px; font-style: italic;
}
.testimonial-author { font-weight: 600; color: var(--text); font-size: 14px; }
.testimonial-role { font-size: 12px; color: var(--text-light); }

/* --- FAQ Accordion --- */
.faq-item {
  background: white; border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden;
  margin-bottom: 12px;
}
.faq-question {
  padding: 18px 24px; display: flex;
  justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 600; font-size: 15px;
  transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-alt); }
.faq-icon {
  font-size: 20px; color: var(--gold);
  transition: transform 0.3s; flex-shrink: 0;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 24px 18px;
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 500px; }

/* --- Form Styles --- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white; font-size: 14px; color: var(--text);
  transition: border 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,162,61,0.1);
}
.form-input::placeholder { color: var(--text-light); }
.form-input.error { border-color: var(--danger); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-select {
  width: 100%; padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white; font-size: 14px; color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239BA0B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* --- Order Summary --- */
.order-summary {
  background: var(--bg-alt); border-radius: var(--radius-md);
  padding: 24px; border: 1px solid var(--border);
}
.order-line {
  display: flex; justify-content: space-between;
  padding: 10px 0; font-size: 14px;
}
.order-total {
  display: flex; justify-content: space-between;
  padding-top: 14px; margin-top: 10px;
  border-top: 2px solid var(--border);
  font-size: 18px; font-weight: 700;
}
.order-total .price { color: var(--gold); }

/* --- Ticket Preview (Confirmation) --- */
.ticket-preview {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-lg); max-width: 480px; margin: 0 auto;
}
.ticket-preview-header {
  background: var(--blue); padding: 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.ticket-preview-body { padding: 28px; }
.ticket-preview-footer {
  padding: 16px 28px; background: var(--bg-alt);
  border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.ticket-divider {
  border: none; border-top: 2px dashed var(--border); margin: 16px 0;
}

/* --- Admin Dashboard --- */
.admin-sidebar {
  width: 260px; background: var(--blue-dark);
  min-height: 100vh; position: fixed; left: 0; top: 0;
  padding: 24px 0; z-index: 100;
  transition: transform 0.3s;
}
.admin-content {
  margin-left: 260px; padding: 32px;
  min-height: 100vh; background: var(--bg-alt);
}
.admin-stat-card {
  background: white; border-radius: var(--radius-md);
  padding: 24px; border: 1px solid var(--border);
}
.admin-table {
  width: 100%; border-collapse: collapse;
  background: white; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border);
}
.admin-table th {
  background: var(--bg-alt); padding: 14px 16px;
  text-align: left; font-size: 12px; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.5px;
  text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 14px 16px; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.admin-table tr:hover td { background: var(--bg-alt); }
.badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-success { background: #E8F8EF; color: #1B9E4B; }
.badge-warning { background: #FFF3E0; color: #E67E22; }
.badge-danger { background: #FDEAEA; color: #C0392B; }

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
}

/* --- QR Scanner --- */
.qr-scanner-box {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 32px;
  text-align: center;
}
.qr-input-large {
  width: 100%; padding: 18px 20px; text-align: center;
  font-size: 20px; font-weight: 600; letter-spacing: 4px;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  transition: border 0.2s;
}
.qr-input-large:focus { border-color: var(--gold); }

/* --- Footer --- */
.footer { background: var(--blue-dark); padding: 64px 24px 32px; }
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: white;
  margin-bottom: 8px;
}
.footer-logo span { color: var(--gold); }
.footer-link {
  font-size: 14px; color: rgba(255,255,255,0.5);
  display: block; margin-bottom: 10px; transition: color 0.2s;
}
.footer-link:hover { color: var(--gold); }
.footer-heading {
  font-size: 13px; font-weight: 600; color: var(--gold);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-bar {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px; margin-top: 48px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bar p { font-size: 12px; color: rgba(255,255,255,0.3); }

/* --- Placeholder (for missing content) --- */
.placeholder-box {
  padding: 40px 24px; border-radius: var(--radius-md);
  border: 2px dashed var(--border); background: var(--bg-alt);
  text-align: center;
}
.placeholder-box .icon { font-size: 28px; margin-bottom: 12px; opacity: 0.5; }
.placeholder-box p { font-size: 14px; color: var(--text-light); }

/* --- Parallax Overlay Section --- */
.parallax-section {
  position: relative; padding: 96px 24px; overflow: hidden;
}
.parallax-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-attachment: fixed; filter: brightness(0.25);
}
.parallax-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,42,107,0.85), rgba(17,29,74,0.92));
}

@media (max-width: 768px) {
  .parallax-bg { background-attachment: scroll; }
}

/* --- Scroll indicator --- */
.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: bounce 2s infinite;
}

/* --- Animations --- */
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-fade { animation: fadeIn 0.6s ease; }
.animate-slide-up { animation: slideUp 0.6s ease; }

/* --- Utility --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--text-muted); }
.bg-gold { background: var(--gold); }
.bg-blue { background: var(--blue); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* --- Print styles for ticket --- */
@media print {
  body * { visibility: hidden; }
  .ticket-preview, .ticket-preview * { visibility: visible; }
  .ticket-preview { position: absolute; left: 0; top: 0; }
}
