/* ============================================================
   VENEZUELA EARTHQUAKE RESOURCE HUB — STYLES
   ============================================================ */

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

:root {
  --navy:        #0D2240;
  --navy-light:  #163055;
  --gold:        #E8A020;
  --gold-light:  #F5C060;
  --red:         #C0392B;
  --white:       #F8F6F1;
  --white-pure:  #FFFFFF;
  --gray-100:    #F0EDE8;
  --gray-200:    #E2DED8;
  --gray-400:    #9A9490;
  --gray-600:    #5A5550;
  --gray-800:    #2A2520;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;

  --shadow-sm:   0 1px 4px rgba(13,34,64,0.08);
  --shadow-md:   0 4px 16px rgba(13,34,64,0.12);
  --shadow-lg:   0 12px 40px rgba(13,34,64,0.18);

  --nav-height:  64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 740px;
}

/* --- Pages --- */
.page { display: none; padding-bottom: 80px; }
.page.active { display: block; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white-pure);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.logo-flag { font-size: 1.4rem; }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white-pure);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  transition: background 0.15s;
  flex-shrink: 0;
}
.lang-toggle:hover { background: rgba(255,255,255,0.2); }
.lang-divider { opacity: 0.4; }
.lang-active { color: var(--gold-light); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white-pure);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--navy-light);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-menu a:hover { background: rgba(255,255,255,0.07); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--navy);
  color: var(--white-pure);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at top right, rgba(232,160,32,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(232,160,32,0.2);
  color: var(--gold-light);
  border: 1px solid rgba(232,160,32,0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 640px;
}

.hero-title-accent {
  color: var(--gold);
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  max-width: 560px;
  line-height: 1.5;
  border-left: 2px solid rgba(255,255,255,0.15);
  padding-left: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--white-pure);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 7px 14px;
  background: var(--navy);
  color: var(--white-pure);
  border-color: var(--navy);
}
.btn-sm:hover { background: var(--navy-light); }

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.categories-section {
  padding: 64px 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 32px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px 16px;
  background: var(--white-pure);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  position: relative;
  text-align: center;
}
.category-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-card.category-empty {
  opacity: 0.5;
  cursor: default;
}
.category-card.category-empty:hover {
  border-color: var(--gray-200);
  box-shadow: none;
  transform: none;
}

.category-icon { font-size: 1.8rem; }
.category-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.3;
}
.category-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
}

/* ============================================================
   HELP SECTION
   ============================================================ */
.help-section {
  background: var(--navy);
  padding: 64px 24px;
}

.help-section .section-title { color: var(--white-pure); }

.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.help-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-icon { font-size: 2rem; }
.help-card h3 { color: var(--gold-light); font-size: 1.1rem; font-weight: 700; }
.help-card p { color: rgba(255,255,255,0.7); font-size: 0.88rem; line-height: 1.55; flex: 1; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: 48px 0 32px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 32px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--navy);
  margin-bottom: 12px;
}
.page-header p {
  color: var(--gray-600);
  max-width: 640px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.search-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}
#searchInput {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: var(--white-pure);
  color: var(--gray-800);
  transition: border-color 0.15s;
}
#searchInput:focus {
  outline: none;
  border-color: var(--gold);
}

#categoryFilter, #locationFilter {
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--white-pure);
  color: var(--gray-800);
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.15s;
}
#categoryFilter:focus, #locationFilter:focus {
  outline: none;
  border-color: var(--gold);
}

/* ============================================================
   RESOURCE GRID & CARDS
   ============================================================ */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.resource-card {
  background: var(--white-pure);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid var(--gold);
}
.resource-card:hover {
  border-color: var(--gold);
  border-left-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.card-category-icon { font-size: 1rem; }
.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
}

.card-cost {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.card-cost.free { background: #D4EDDA; color: #155724; }
.card-cost.paid { background: #FFF3CD; color: #856404; }
.card-cost.unknown { background: var(--gray-100); color: var(--gray-600); }

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
}
.card-footer {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card-location, .card-verified {
  font-size: 0.75rem;
  color: var(--gray-400);
}
.card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 4px;
}

/* ============================================================
   STATUS / LOADING / EMPTY
   ============================================================ */
.resources-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  color: var(--gray-600);
  font-size: 0.9rem;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.config-warning {
  background: #FFF3CD;
  border: 1px solid #FFECB5;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #664D03;
  line-height: 1.5;
}
.config-warning code {
  background: rgba(0,0,0,0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-600);
}
.no-results-icon { font-size: 2.5rem; margin-bottom: 12px; }
.hidden { display: none !important; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,34,64,0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--white-pure);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--gray-600);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--gray-200); }

.modal-category {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 6px;
}

.modal-location {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.modal-divider {
  height: 2px;
  background: var(--gray-200);
  margin: 18px 0;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 20px;
}

.modal-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.modal-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--navy);
  color: var(--white-pure);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
}
.contact-link:hover { background: var(--navy-light); }

.contact-text {
  font-size: 0.88rem;
  color: var(--gray-600);
  padding: 4px 0;
}

.modal-verified {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 16px;
}

.modal-disclaimer {
  font-size: 0.75rem;
  color: var(--gray-400);
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
  line-height: 1.5;
}

/* ============================================================
   SUBMIT PAGE
   ============================================================ */
.submit-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #EBF5FB;
  border: 1px solid #AED6F1;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 28px;
  font-size: 0.88rem;
  color: #1A5276;
  line-height: 1.55;
}
.notice-icon { font-size: 1.1rem; flex-shrink: 0; }

.form-container { margin-bottom: 40px; }

.google-form-placeholder {
  background: var(--gray-100);
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
}
.placeholder-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.placeholder-icon { font-size: 2.5rem; }
.google-form-placeholder h3 { font-size: 1.1rem; color: var(--navy); }
.google-form-placeholder p { font-size: 0.88rem; color: var(--gray-600); max-width: 380px; }

.google-form-iframe {
  width: 100%;
  height: 800px;
  border: none;
  border-radius: var(--radius-md);
}

.submit-guide {
  background: var(--white-pure);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
}
.submit-guide h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}
.submit-guide ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.submit-guide li {
  font-size: 0.88rem;
  color: var(--gray-600);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.submit-guide li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.guide-note {
  font-size: 0.8rem;
  color: var(--gray-400);
  line-height: 1.55;
  border-top: 1px solid var(--gray-200);
  padding-top: 14px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-content { display: flex; flex-direction: column; gap: 36px; }

.about-block h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.about-block p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 10px;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.about-list li {
  font-size: 0.88rem;
  color: var(--gray-600);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.about-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.about-note {
  background: #FFF8EC;
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem !important;
  color: var(--gray-600) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  border-top: 3px solid var(--gold);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white-pure);
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--gold-light); }

.footer-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .lang-toggle { margin-left: auto; }

  .hero { padding: 48px 0 44px; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }

  .categories-section { padding: 44px 24px; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }

  .help-section { padding: 44px 24px; }

  .resource-grid { grid-template-columns: 1fr; }

  .search-filter-bar { flex-direction: column; }
  #categoryFilter, #locationFilter { width: 100%; }

  .modal-card { padding: 24px 20px; border-radius: var(--radius-md); }
  .modal-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions .btn { width: auto; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
