/* =========================================================================
   MISS FABB — Public Site Design System
   Premium, editorial, luxury-pageant visual language.
   Palette: deep wine/plum primary, warm ivory background, blush accents,
   charcoal text, restrained metallic-gold accents.
   ========================================================================= */

:root {
  --color-primary: #7A174D;       /* deep wine/plum */
  --color-primary-dark: #5c1039;
  --color-primary-light: #9c2465;
  --color-ivory: #FBF6EF;         /* warm off-white background */
  --color-blush: #F1DDE4;         /* soft blush accent */
  --color-charcoal: #2B2320;      /* text */
  --color-gold: #C9A24B;          /* metallic gold accent */
  --color-gold-light: #E4C77E;
  --color-white: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --shadow-soft: 0 10px 30px rgba(122, 23, 77, 0.10);
  --shadow-card: 0 4px 20px rgba(43, 35, 32, 0.08);
  --shadow-hover: 0 14px 40px rgba(122, 23, 77, 0.18);

  --transition-fast: 0.2s ease;
  --transition-med: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: 'Playfair Display';
  src: local('Playfair Display');
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-ivory);
  color: var(--color-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-charcoal);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-dark); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img { max-width: 100%; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-med);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: var(--color-charcoal);
  box-shadow: 0 8px 20px rgba(201, 162, 75, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: var(--color-white); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Top Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(122, 23, 77, 0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 700;
}
.brand img { height: 36px; width: auto; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--color-charcoal);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width var(--transition-med);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; gap: 10px; align-items: center; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.6rem; color: var(--color-primary); cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--color-ivory); padding: 20px; gap: 16px; box-shadow: var(--shadow-card);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--color-blush) 0%, var(--color-ivory) 60%);
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,162,75,0.25), transparent 70%);
  border-radius: 50%;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 6px 16px;
  border: 1px solid var(--color-gold);
  border-radius: 999px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.5);
}
.hero h1 { font-size: 3.2rem; margin-bottom: 20px; }
.hero p.lede { font-size: 1.15rem; color: #574d47; max-width: 480px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-image-wrap img { width: 100%; height: 520px; object-fit: cover; }
.hero-badge {
  position: absolute; bottom: 20px; left: 20px;
  background: rgba(255,255,255,0.92);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-weight: 600;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .hero-image-wrap img { height: 320px; }
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex; gap: 16px; margin: 24px 0; flex-wrap: wrap;
}
.countdown-box {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  min-width: 76px;
}
.countdown-box .num { font-family: var(--font-display); font-size: 1.8rem; color: var(--color-primary); font-weight: 700; }
.countdown-box .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8a7d75; }

/* ---------- Section headings ---------- */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-eyebrow {
  color: var(--color-gold); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; font-size: 0.8rem; margin-bottom: 10px; display: block;
}
.section h2 { font-size: 2.2rem; }
.section p.lede { color: #6b5f57; font-size: 1.05rem; }

/* ---------- Finalist Cards ---------- */
.finalist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.finalist-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  position: relative;
}
.finalist-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.finalist-photo { position: relative; height: 320px; overflow: hidden; }
.finalist-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-med); }
.finalist-card:hover .finalist-photo img { transform: scale(1.06); }
.finalist-number {
  position: absolute; top: 14px; left: 14px;
  background: var(--color-primary); color: var(--color-white);
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.finalist-body { padding: 20px; }
.finalist-body h3 { font-size: 1.3rem; margin-bottom: 4px; }
.finalist-meta { color: #8a7d75; font-size: 0.88rem; margin-bottom: 16px; }
.finalist-meta span::after { content: '•'; margin: 0 6px; color: var(--color-gold); }
.finalist-meta span:last-child::after { content: ''; }



/* ---------- Leaderboard category filter ---------- */
.category-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-charcoal);
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}
.category-pill:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}
.category-pill.active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-hover);
}



/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px;
  background: var(--color-white); padding: 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.filter-bar input, .filter-bar select {
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid #e6dcd3;
  font-family: var(--font-body); font-size: 0.9rem; background: var(--color-ivory);
}
.filter-bar input:focus, .filter-bar select:focus { outline: 2px solid var(--color-gold); }

/* ---------- Finalist detail page ---------- */
.finalist-detail-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: start;
}
.finalist-hero-img {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft);
}
.finalist-hero-img img { width: 100%; height: 560px; object-fit: cover; }
.gallery-strip { display: flex; gap: 12px; margin-top: 16px; overflow-x: auto; }
.gallery-strip img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; flex-shrink: 0; }

.detail-badge-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 999px;
  background: var(--color-blush); color: var(--color-primary); font-weight: 600; font-size: 0.82rem;
}
.pill-gold { background: rgba(201,162,75,0.15); color: #8a6a1f; }

.rank-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white); border-radius: var(--radius-md); padding: 20px 24px; margin: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
}
.rank-card .rank-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; }

/* ---------- Share buttons (Font Awesome icons) ---------- */
.share-row { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.share-btn {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--color-white); box-shadow: var(--shadow-card); color: var(--color-charcoal); font-size: 1.15rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.share-btn:hover { transform: translateY(-3px) scale(1.05); color: var(--color-white); }
.share-btn i { line-height: 1; }

.share-whatsapp:hover { background: #25D366; }
.share-facebook:hover { background: #1877F2; }
.share-x:hover { background: #000000; }
.share-telegram:hover { background: #26A5E4; }
.share-copy:hover { background: var(--color-gold); color: var(--color-charcoal); }
.share-native:hover { background: var(--color-primary); }

/* ---------- Leaderboard ---------- */
.leaderboard-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.leaderboard-table tr { background: var(--color-white); box-shadow: var(--shadow-card); border-radius: var(--radius-md); }
.leaderboard-table td, .leaderboard-table th { padding: 16px 20px; text-align: left; }
.leaderboard-table th { color: #8a7d75; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; background: none; box-shadow: none; }
.leaderboard-rank {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--color-primary);
  width: 50px; display: inline-flex; align-items: center; justify-content: center;
}
.leaderboard-rank.top1 { color: var(--color-gold); }
.leaderboard-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-right: 12px; vertical-align: middle; }

/* ---------- Cards / forms ---------- */
.card {
  background: var(--color-white); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-card);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.form-control {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid #e6dcd3;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--color-ivory); transition: border var(--transition-fast);
}
.form-control:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(201,162,75,0.15); }
.form-hint { font-size: 0.8rem; color: #8a7d75; margin-top: 6px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.checkbox-row input { margin-top: 4px; }
.checkbox-row label { font-size: 0.88rem; font-weight: 400; }

/* ---------- Package cards ---------- */
.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 22px; margin: 30px 0; }
.package-card {
  background: var(--color-white); border-radius: var(--radius-lg); padding: 26px; text-align: center;
  box-shadow: var(--shadow-card); border: 2px solid transparent; cursor: pointer; transition: all var(--transition-med); position: relative;
}
.package-card:hover, .package-card.selected { border-color: var(--color-gold); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.package-badge {
  position: absolute; top: -12px; right: 20px; background: var(--color-gold); color: var(--color-charcoal);
  font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}
.package-card .price { font-family: var(--font-display); font-size: 2rem; color: var(--color-primary); font-weight: 700; margin: 10px 0; }
.package-card .votes { color: #6b5f57; font-size: 0.9rem; margin-bottom: 16px; }

/* ---------- Flash messages ---------- */
.flash { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; }
.flash-success { background: #e4f4ea; color: #206a44; border: 1px solid #b7e4c8; }
.flash-error { background: #fbe6ea; color: #9c1c3a; border: 1px solid #f3b8c4; }

/* ---------- Tables (account/history) ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee0d6; font-size: 0.9rem; }
table.data-table th { color: #8a7d75; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
.badge-tag { padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.badge-free { background: #e4f4ea; color: #206a44; }
.badge-paid { background: var(--color-blush); color: var(--color-primary); }
.badge-bonus { background: rgba(201,162,75,0.18); color: #8a6a1f; }
.badge-manual { background: #e6e6f0; color: #3c3c6e; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-charcoal); color: #efe6dd; padding: 60px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: var(--color-gold); font-size: 1rem; margin-bottom: 14px; }
.footer-grid a { color: #cbbfb3; display: block; margin-bottom: 8px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--color-gold-light); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #a99a8d; font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .finalist-detail-grid { grid-template-columns: 1fr; }
  .finalist-hero-img img { height: 380px; }
  .section { padding: 44px 0; }
  .section h2 { font-size: 1.7rem; }
  .hero { padding: 50px 0 40px; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 40px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 16px; }
.text-muted { color: #8a7d75; }
.text-gold { color: var(--color-gold); }
.text-primary { color: var(--color-primary); }
.w-full { width: 100%; }