/* ============================================================
   PISO MOJADO — main.css
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --color-yellow:      #F5C518;
  --color-black:       #111111;
  --color-navy:        #1A1A2E;
  --color-off-white:   #F0F0F0;
  --color-body-text:   #2D2D2D;
  --color-section-bg:  #FAFAFA;
  --color-amber:       #E0A800;
  --color-water:       #60B8D4;
  --color-warm-white:  #FAF7F2;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --nav-height:          64px;
  --section-padding:     clamp(3rem, 8vw, 7rem);
  --card-radius:         8px;
  --card-shadow:         0 2px 12px rgba(0, 0, 0, 0.08);
  --max-width:           1200px;

  --stripe-pattern: repeating-linear-gradient(
    45deg,
    var(--color-yellow) 0px,
    var(--color-yellow) 10px,
    var(--color-black)  10px,
    var(--color-black)  20px
  );
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-body-text);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-amber);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Stripe accent bar ──────────────────────────────────────── */
.stripe-bar {
  height: 3px;
  background: var(--stripe-pattern);
}

/* ── Section shared ─────────────────────────────────────────── */
section {
  scroll-margin-top: var(--nav-height);
  padding-block: var(--section-padding);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  display: inline-block;
  padding-left: 1rem;
  border-left: 4px solid var(--color-yellow);
}

.section-header p {
  margin-top: 0.5rem;
  color: #666;
  padding-left: 1.25rem;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--color-section-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
}

.card-tag {
  display: inline-block;
  background: var(--color-yellow);
  color: var(--color-black);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  align-self: flex-start;
}

.card h3 {
  color: var(--color-navy);
}

.card p {
  font-size: 0.9rem;
  color: #555;
  flex: 1;
}

.card .read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-top: auto;
}

.card .read-more:hover {
  color: var(--color-amber);
  text-decoration: none;
}

/* ── Header / Nav ───────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  /* Always dark — readable over any background, with or without hero image */
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  border-top: 3px solid transparent;
  border-image: var(--stripe-pattern) 1;
}

#site-header.scrolled {
  background: var(--color-navy);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-off-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--color-yellow);
}

.nav-brand-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 0 0 1.5px rgba(245, 197, 24, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--color-off-white);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(245, 197, 24, 0.15);
  color: var(--color-yellow);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-off-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  background: #0a0a12;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-margin-top: 0;
  padding-block: 0;
}

/* Background warrior image */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  z-index: 0;
}

/* Left-to-right gradient — dark on left for text, fades right to reveal warrior */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 10, 18, 0.96) 0%,
    rgba(10, 10, 18, 0.85) 28%,
    rgba(10, 10, 18, 0.50) 55%,
    rgba(10, 10, 18, 0.12) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Faint stripe texture over the gradient */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--stripe-pattern);
  opacity: 0.03;
  z-index: 1;
  pointer-events: none;
}

/* Text block — left-aligned over the dark gradient */
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  margin-inline: auto;
  padding: calc(var(--nav-height) + 3rem) clamp(1.5rem, 5vw, 3rem) 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-title {
  color: var(--color-off-white);
  letter-spacing: -0.02em;
  max-width: 12ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-title span {
  color: var(--color-yellow);
}

.hero-tagline {
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--color-yellow);
  letter-spacing: 0.02em;
  max-width: 32ch;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}


.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(240, 240, 240, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  animation: bounce-down 2s ease-in-out infinite;
}

.scroll-down svg {
  width: 20px;
}

@keyframes bounce-down {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Blog ────────────────────────────────────────────────────── */
#blog {
  background: #F0F4F8;
}

.blog-featured {
  display: flex;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

.blog-featured-accent {
  width: 8px;
  flex-shrink: 0;
  background: var(--stripe-pattern);
}

.blog-featured-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-featured-content h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--color-navy);
}

.blog-featured-content p {
  color: #555;
  max-width: 680px;
  font-size: 0.95rem;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-date {
  font-size: 0.78rem;
  color: #999;
  font-weight: 500;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card .blog-meta {
  margin-bottom: 0.1rem;
}

/* ── Section nav strip (below hero) ─────────────────────────── */
.section-nav-strip {
  background: var(--color-navy);
  border-top: 3px solid transparent;
  border-image: var(--stripe-pattern) 1;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  justify-content: center;
}

.section-nav-strip nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: var(--max-width);
  width: 100%;
}

.section-nav-strip a {
  background: rgba(245, 197, 24, 0.10);
  border: 1px solid rgba(245, 197, 24, 0.38);
  color: var(--color-yellow);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.section-nav-strip a:hover {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
  color: var(--color-black);
  text-decoration: none;
}

/* ── Technology ─────────────────────────────────────────────── */
#technology {
  background: #fff;
}

/* ── Tech Literacy ──────────────────────────────────────────── */
#tech-literacy {
  background: #F5F5F0;
}

.literacy-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: start;
}

.literacy-featured {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.literacy-featured-img {
  background: linear-gradient(135deg, var(--color-navy) 0%, #2d3a6e 100%);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.literacy-featured-body {
  padding: 1.5rem;
}

.literacy-featured-body h3 {
  margin-bottom: 0.5rem;
  color: var(--color-navy);
}

.literacy-guides {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

.literacy-guides h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: var(--color-body-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.guide-item:last-child {
  border-bottom: none;
}

.guide-item:hover {
  color: var(--color-amber);
  text-decoration: none;
}

.guide-icon {
  width: 28px;
  height: 28px;
  background: rgba(245, 197, 24, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Gaming ─────────────────────────────────────────────────── */
#gaming {
  background: var(--color-navy);
}

#gaming .section-header h2 {
  color: var(--color-off-white);
}

#gaming .section-header p {
  color: rgba(240, 240, 240, 0.6);
}

.gaming-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.game-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.game-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.game-card .card-tag {
  align-self: flex-start;
}

.game-card h3 {
  color: var(--color-off-white);
  font-size: 1rem;
}

.game-card p {
  color: rgba(240, 240, 240, 0.65);
  font-size: 0.85rem;
}

.game-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 5px;
  background: linear-gradient(135deg, #2d3a6e, #16213e);
  margin-bottom: 0.25rem;
}

/* ── General Knowledge ──────────────────────────────────────── */
#general-knowledge {
  background: #fff;
}

.did-you-know {
  background: var(--color-yellow);
  border-radius: var(--card-radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.did-you-know svg {
  width: 48px;
  flex-shrink: 0;
}

.did-you-know-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-black);
  margin-bottom: 0.25rem;
}

.did-you-know-text p {
  color: var(--color-black);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Religion ───────────────────────────────────────────────── */
#religion {
  background: var(--color-warm-white);
}

.religion-inner {
  max-width: 680px;
  margin-inline: auto;
}

.religion-featured {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.religion-featured h3 {
  color: var(--color-navy);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.pull-quote {
  border-left: 4px solid var(--color-yellow);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  font-style: italic;
  font-size: 1.1rem;
  color: #444;
  background: rgba(245, 197, 24, 0.06);
}

.religion-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.religion-article {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.religion-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  text-decoration: none;
}

.religion-article h4 {
  color: var(--color-navy);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.religion-article span {
  color: #999;
  font-size: 0.8rem;
  white-space: nowrap;
  margin-left: 1rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
#site-footer {
  background: var(--color-navy);
  color: var(--color-off-white);
  padding-block: 3rem 2rem;
  border-top: 3px solid transparent;
  border-image: var(--stripe-pattern) 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-brand svg {
  width: 28px;
}

.footer-tagline {
  font-style: italic;
  color: var(--color-yellow);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.footer-links h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.75rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: rgba(240, 240, 240, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-yellow);
  text-decoration: none;
}

.footer-about h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.75rem;
}

.footer-about p {
  font-size: 0.85rem;
  color: rgba(240, 240, 240, 0.65);
  line-height: 1.6;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(240, 240, 240, 0.4);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gaming-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .literacy-layout { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-3, .grid-2, .grid-4, .gaming-grid { grid-template-columns: 1fr; }

  /* Hero: center text on mobile, uniform dark overlay */
  #hero::before {
    background: rgba(10, 10, 18, 0.80);
  }

  .hero-bg {
    object-position: 65% center;
  }

  .hero-inner {
    align-items: center;
    text-align: center;
    padding-top: calc(var(--nav-height) + 2rem);
    padding-bottom: 4rem;
    gap: 1.25rem;
  }

  .hero-title {
    max-width: none;
  }

  .hero-tagline {
    max-width: none;
  }

  .hero-nav-pills {
    justify-content: center;
  }

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-navy);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-about { grid-column: auto; }

  .did-you-know {
    flex-direction: column;
    text-align: center;
  }

  .hero-nav-pills a {
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
  }

  .religion-article {
    flex-direction: column;
    gap: 0.25rem;
  }

  .religion-article span {
    margin-left: 0;
  }
}
