/* ═══════════════════════════════════════════════════════════
   SULYAP SA PINANGGALINGAN — lemcon.ph
   Global Stylesheet v1.0 | April 2026
   ═══════════════════════════════════════════════════════════ */

/* --- FONTS --- */
@font-face {
  font-family: 'Maraqsa';
  src: url('../fonts/maragsa.woff2') format('woff2'),
       url('../fonts/maragsa.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- VARIABLES --- */
:root {
  /* Philippine flag colors — primary */
  --ph-blue:   #0038A8;
  --ph-red:    #CE1126;
  --ph-yellow: #FCD116;
  --ph-white:  #FFFFFF;

  /* Lemcon brand — secondary */
  --lc-navy:   #23297A;
  --lc-orange: #FF883E;
  --lc-green:  #169862;
  --lc-dark:   #121212;

  /* UI */
  --border:        rgba(255,255,255,0.12);
  --text-dim:      rgba(255,255,255,0.55);
  --nav-height:    64px;
  --radius:        10px;

  /* Typography */
  --font-display: 'Maraqsa', Georgia, 'Times New Roman', serif;
  --font-body:    'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--lc-dark);
  color: var(--ph-white);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — FULL SCREEN MAP LAYOUT
   ═══════════════════════════════════════════════════════════ */

.sulyap-home {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* Site name bar above map */
.sulyap-site-header {
  flex-shrink: 0;
  padding: 14px 16px 10px;
  text-align: center;
  background: var(--lc-dark);
  border-bottom: 1px solid var(--border);
}

.sulyap-site-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 700;
  color: var(--ph-blue);
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: block;
}

.sulyap-site-tagline {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}

/* Map container — fills remaining viewport */
.sulyap-map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

#ph-map {
  width: 100%;
  height: 100%;
  background: var(--lc-dark);
}

/* Map loading state */
.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lc-dark);
  z-index: 200;
  font-size: 13px;
  color: var(--text-dim);
  pointer-events: none;
  transition: opacity 0.4s;
}
.map-loading.hidden { opacity: 0; }

/* Map tap instruction */
.map-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.72);
  color: var(--ph-yellow);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 400;
  pointer-events: none;
  transition: opacity 0.6s;
}
.map-hint.hidden { opacity: 0; }

/* ═══════════════════════════════════════════════════════════
   BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════════ */

.sulyap-nav {
  flex-shrink: 0;
  display: flex;
  background: #1a1a1a;
  border-top: 1px solid var(--border);
  height: var(--nav-height);
  position: relative;
  z-index: 500;
}

.sulyap-nav a,
.sulyap-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 4px;
  transition: color 0.2s;
  background: none;
  border: none;
  text-decoration: none;
  position: relative;
}

.sulyap-nav a:hover,
.sulyap-nav button:hover,
.sulyap-nav a.active,
.sulyap-nav button.active {
  color: var(--ph-yellow);
}

.sulyap-nav a.active::before,
.sulyap-nav button.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--ph-yellow);
  border-radius: 0 0 2px 2px;
}

.sulyap-nav svg {
  width: 22px;
  height: 22px;
}

/* Explore dropdown */
.explore-dropdown {
  display: none;
  position: absolute;
  bottom: var(--nav-height);
  left: 33.33%;
  transform: translateX(-50%);
  background: #1f1f1f;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  min-width: 180px;
  overflow: hidden;
  z-index: 600;
}

.explore-dropdown.open { display: block; }

.explore-dropdown a {
  display: block;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ph-white);
  border-bottom: 1px solid var(--border);
  text-transform: none;
  letter-spacing: 0;
}
.explore-dropdown a:last-child { border-bottom: none; }
.explore-dropdown a:hover { background: var(--ph-blue); color: var(--ph-white); }

/* ═══════════════════════════════════════════════════════════
   PROVINCE PAGE
   ═══════════════════════════════════════════════════════════ */

.sulyap-province-page {
  min-height: 100dvh;
  padding-bottom: 80px;
}

/* Hero */
.province-hero {
  position: relative;
  padding: 20px 16px 24px;
  background: var(--ph-blue);
  overflow: hidden;
}

/* Regional color overrides */
.region-ilocos      .province-hero { background: #1a4fa0; }
.region-cagayan     .province-hero { background: #1a5e85; }
.region-central-luzon .province-hero { background: #2a4d8e; }
.region-calabarzon  .province-hero { background: #1e5faa; }
.region-mimaropa    .province-hero { background: #0e6b7c; }
.region-bicol       .province-hero { background: #7a1520; }
.region-western-visayas  .province-hero { background: #6b4a0e; }
.region-central-visayas  .province-hero { background: #1a5c3a; }
.region-eastern-visayas  .province-hero { background: #4a1a6b; }
.region-zamboanga   .province-hero { background: #0e5c5c; }
.region-northern-mindanao .province-hero { background: #1e6b3a; }
.region-davao       .province-hero { background: #5c2800; }
.region-soccsksargen .province-hero { background: #4a3a00; }
.region-caraga      .province-hero { background: #003d5c; }
.region-barmm       .province-hero { background: #003322; }
.region-car         .province-hero { background: #2e1a00; }
.region-ncr         .province-hero { background: #1a1a4a; }

.province-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 6px 10px 6px 6px;
  border-radius: 20px;
  background: rgba(0,0,0,0.25);
}
.province-hero-back svg { width: 18px; height: 18px; }
.province-hero-back:hover { color: var(--ph-white); }

.province-hero-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ph-white);
  margin-bottom: 6px;
}

.province-hero-region {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.province-hero-island {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ph-white);
}

/* Quick facts grid */
.province-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

.fact-cell {
  background: #1a1a1a;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fact-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
}

.fact-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--ph-white);
  line-height: 1.2;
}

.fact-cell.wide {
  grid-column: 1 / -1;
}

/* Province tabs */
.province-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.province-tabs::-webkit-scrollbar { display: none; }

.province-tab {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.province-tab:hover { color: var(--ph-white); }
.province-tab.active { color: var(--ph-yellow); border-bottom-color: var(--ph-yellow); }

.province-tab-content {
  display: none;
  padding: 20px 16px 24px;
}
.province-tab-content.active { display: block; }

/* Summary text */
.province-summary {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}

/* Coming soon placeholder */
.content-placeholder {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-dim);
}
.content-placeholder svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  opacity: 0.4;
}
.content-placeholder p {
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   QUIZ PAGE
   ═══════════════════════════════════════════════════════════ */

.quiz-page {
  min-height: 100dvh;
  padding-bottom: 40px;
}

.quiz-header {
  text-align: center;
  padding: 24px 16px 16px;
  background: var(--lc-dark);
  border-bottom: 1px solid var(--border);
}

.quiz-header .sulyap-site-name {
  font-size: 20px;
  margin-bottom: 4px;
}

.quiz-subtitle {
  font-size: 12px;
  color: var(--ph-yellow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.quiz-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.quiz-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-right: 12px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--ph-yellow);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.quiz-progress-count {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}

.quiz-question {
  font-size: 17px;
  font-weight: 700;
  color: var(--ph-white);
  line-height: 1.4;
  margin-bottom: 20px;
}

.quiz-province-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 400;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--ph-white);
  background: #1a1a1a;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
  cursor: pointer;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--ph-yellow);
  background: rgba(252,209,22,0.08);
}

.quiz-option.correct {
  border-color: var(--lc-green);
  background: rgba(22,152,98,0.18);
  color: #5de0a5;
}

.quiz-option.wrong {
  border-color: var(--ph-red);
  background: rgba(206,17,38,0.15);
  color: #ff7a85;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.correct-msg { background: rgba(22,152,98,0.18); color: #5de0a5; }
.quiz-feedback.wrong-msg { background: rgba(206,17,38,0.15); color: #ff7a85; }

.quiz-next-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--ph-blue);
  color: var(--ph-white);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  font-family: inherit;
  transition: background 0.2s;
  display: none;
}
.quiz-next-btn.show { display: block; }
.quiz-next-btn:hover { background: #0047d1; }

/* Score screen */
.quiz-score-screen {
  text-align: center;
  padding: 40px 16px;
}

.quiz-score-number {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  color: var(--ph-yellow);
  line-height: 1;
  margin-bottom: 8px;
}

.quiz-score-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.quiz-score-message {
  font-size: 18px;
  font-weight: 700;
  color: var(--ph-white);
  margin-bottom: 32px;
  line-height: 1.4;
}

.quiz-restart-btn {
  padding: 14px 32px;
  background: var(--ph-blue);
  color: var(--ph-white);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  font-family: inherit;
  transition: background 0.2s;
}
.quiz-restart-btn:hover { background: #0047d1; }

/* ═══════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════ */

.about-page {
  min-height: 100dvh;
  padding-bottom: 80px;
}

.about-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.about-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

.about-site-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 700;
  color: var(--ph-blue);
  margin-bottom: 6px;
}

.about-divider {
  border: none;
  border-top: 2px solid var(--ph-yellow);
  margin: 16px 0 20px;
  width: 48px;
}

.about-content p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.88);
  margin-bottom: 16px;
}

.about-lemcon-block {
  border-left: 3px solid var(--ph-yellow);
  padding: 16px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.about-lemcon-block p {
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER (minimal)
   ═══════════════════════════════════════════════════════════ */

.sulyap-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.sulyap-footer a {
  color: var(--ph-yellow);
}
.sulyap-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════ */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
}
.back-btn svg { width: 18px; height: 18px; }
.back-btn:hover { color: var(--ph-white); }

/* ═══════════════════════════════════════════════════════════
   SVG MAP STYLES
   ═══════════════════════════════════════════════════════════ */

#ph-map {
  position: absolute;
  inset: 0;
  background: var(--lc-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ph-map svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Force all paths and shapes to Philippine blue */
#ph-map svg path,
#ph-map svg polygon,
#ph-map svg circle,
#ph-map svg ellipse {
  fill: #0038A8 !important;
  stroke: #121212 !important;
  stroke-width: 0.6px !important;
  cursor: pointer;
  transition: fill 0.15s ease;
}

/* Kill ocean rectangles — make background dark */
#ph-map svg rect {
  fill: #121212 !important;
  stroke: none !important;
  cursor: default !important;
}

/* Kill any text labels in the SVG */
#ph-map svg text {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  .sulyap-site-name { font-size: 36px; }
  .province-facts { grid-template-columns: repeat(3, 1fr); }
  .quiz-container { padding: 32px 24px; }
  .province-hero-name { font-size: 48px; }
}

@media (max-width: 360px) {
  .sulyap-nav a, .sulyap-nav button { font-size: 10px; }
  .sulyap-nav svg { width: 20px; height: 20px; }
}
