/* Premium Electronics & Furniture - Theme Stylesheet */
:root {
  --primary-maroon: #821d17;
  --primary-deep: #5b100b;
  --accent-gold: #c59341;
  --accent-gold-light: #f5df9a;
  --accent-gold-dark: #986d26;
  --surface-cream: #fff9f3;
  --surface-warm: #fcf4eb;
  --surface-card: #ffffff;
  --text-main: #1f1d1d;
  --text-muted: #6e6462;
  --border-subtle: #ebdcd0;
  --border-gold: #e2ba73;
  --success-green: #15803d;
  --success-bg: #dcfce7;
  --warning-amber: #b45309;
  --warning-bg: #fef3c7;
  --danger-red: #b91c1c;
  --danger-bg: #fee2e2;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Cinzel', serif;
  --shadow-sm: 0 2px 4px rgba(91, 16, 11, 0.05);
  --shadow-md: 0 6px 16px rgba(91, 16, 11, 0.08);
  --shadow-lg: 0 12px 32px rgba(91, 16, 11, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--surface-cream);
  color: var(--text-main);
  line-height: 1.5;
  touch-action: manipulation;
  overflow-x: hidden;
  padding-bottom: 70px; /* Space for mobile sticky CTA */
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.btn-head-cta {
  background: linear-gradient(135deg, var(--primary-maroon), var(--primary-deep));
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(130, 29, 23, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-head-cta:active {
  transform: scale(0.96);
}

/* Main Container */
.main-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 1.25rem 0 1.5rem;
}

.badge-ribbon {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, #fef3c7, #fef9c3);
  border: 1px solid var(--border-gold);
  color: #78350f;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.hero-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.25rem;
}

.featured-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid #ecd8bf;
  background: #fff;
}

.responsive-poster {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: var(--radius-lg);
}

/* Quick Plan Badges Strip */
.plan-strip {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-maroon));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  margin: 1.5rem 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.plan-strip-item {
  flex: 1;
  padding: 0 0.5rem;
}

.plan-strip-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-strip-item .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.85;
}

.plan-strip-item .value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold-light);
  font-family: var(--font-heading);
}

/* Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
}

.highlight-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 0.85rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.highlight-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.highlight-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbf2eb, #f5dfcf);
  color: var(--primary-maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.6);
  border: 1px solid #ebdcd0;
}

.highlight-item strong {
  font-size: 0.9rem;
  color: var(--primary-deep);
  font-weight: 800;
  line-height: 1.2;
}

.highlight-item small {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Registration Form Card */
.registration-section {
  margin: 2rem 0;
  scroll-margin-top: 80px;
}

.form-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-gold);
  position: relative;
  overflow: hidden;
}

.form-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-gold), var(--primary-maroon), var(--accent-gold));
}

.form-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.form-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-maroon);
  background: var(--surface-warm);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.form-header h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--primary-deep);
  margin-bottom: 0.25rem;
}

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

.styled-form .form-group {
  margin-bottom: 1.1rem;
}

.styled-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.styled-form label .req {
  color: var(--danger-red);
}

.input-container {
  display: flex;
  align-items: center;
  background: #fdfdfd;
  border: 1.5px solid #d4c4b8;
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-container:focus-within {
  border-color: var(--primary-maroon);
  box-shadow: 0 0 0 3px rgba(130, 29, 23, 0.12);
  background: #fff;
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  color: var(--primary-maroon);
  opacity: 0.8;
}

.input-prefix {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-maroon);
  margin-right: 0.5rem;
  padding-right: 0.5rem;
  border-right: 1.5px solid #e0d4c8;
}

.styled-form input {
  width: 100%;
  padding: 0.8rem 0;
  font-size: 1rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-sans);
}

.styled-form input::placeholder {
  color: #aaa;
  font-size: 0.92rem;
}

.input-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.field-error {
  display: block;
  font-size: 0.73rem;
  color: var(--danger-red);
  margin-top: 0.25rem;
  min-height: 14px;
  font-weight: 600;
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-maroon) 0%, var(--primary-deep) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.95rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(130, 29, 23, 0.3);
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

.form-feedback.success {
  background: var(--success-bg);
  color: var(--success-green);
  border: 1px solid #86efac;
}

.form-feedback.error {
  background: var(--danger-bg);
  color: var(--danger-red);
  border: 1px solid #fca5a5;
}

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

/* Sections for Posters & Tabs */
.section-prizes, .section-rules {
  margin: 2.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.section-header .subtitle {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-gold-dark);
  margin-bottom: 0.2rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-deep);
  margin-bottom: 0.25rem;
}

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

/* Tabs */
.tabs-container, .lang-selector {
  display: flex;
  background: #f1e4d8;
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar,
.lang-selector::-webkit-scrollbar {
  display: none;
}

.tab-btn, .lang-btn {
  flex: 1;
  min-width: fit-content;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn.active, .lang-btn.active {
  background: var(--primary-maroon);
  color: #fff;
  box-shadow: 0 2px 8px rgba(130, 29, 23, 0.25);
}

.tab-content, .lang-content {
  display: none;
}

.tab-content.active, .lang-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.brochure-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

/* Fixed aspect ratios to eliminate any layout shift or page jump on tab switch */
.poster-prizes-ratio {
  min-height: 480px;
}

.poster-rules-ratio {
  min-height: 480px;
}

@media (min-width: 600px) {
  .poster-prizes-ratio {
    min-height: 800px;
  }
  .poster-rules-ratio {
    min-height: 800px;
  }
}

.brochure-card img {
  width: 100%;
  height: auto;
  display: block;
}

.card-caption {
  padding: 0.75rem 1rem;
  background: var(--surface-warm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-deep);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

/* Bottom CTA */
.bottom-cta {
  margin: 2.5rem 0 1rem;
}

.cta-box {
  background: linear-gradient(135deg, #2b0805, var(--primary-deep));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--accent-gold);
}

.cta-box h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--accent-gold-light);
  margin-bottom: 0.4rem;
}

.cta-box p {
  font-size: 0.88rem;
  color: #fce8db;
  margin-bottom: 1.2rem;
}

.btn-large-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold), #dfaa53);
  color: #2b0805;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: #fdfaf7;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-content p {
  margin-bottom: 0.35rem;
}

.footer-links {
  margin: 0.75rem 0;
}

.footer-links a {
  color: var(--primary-maroon);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.78rem;
}

/* Mobile Sticky Bar */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.65rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

.sticky-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sticky-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--primary-deep);
}

.btn-sticky-join {
  background: linear-gradient(135deg, var(--primary-maroon), var(--primary-deep));
  color: #fff;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(130, 29, 23, 0.35);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
  .mobile-sticky-bar {
    display: none;
  }
  .highlights-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hero-headline {
    font-size: 2.25rem;
  }
  .form-wrapper {
    padding: 2.25rem 2rem;
  }
}
