/* ==========================================================================
   BILIKIDS - MODERN HOME DASHBOARD STYLES (PIXEL-PERFECT FIDELITY)
   Theme: Midnight Deep Space Navy (#0b132b / #0f172a)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-main: #0c1322;
  --bg-surface: #131c31;
  --bg-card: rgba(26, 38, 64, 0.7);
  --bg-glass: rgba(19, 28, 49, 0.85);
  
  --text-main: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-pink: #f43f5e;
  --accent-pink-hover: #e11d48;
  --accent-cyan: #06b6d4;
  --accent-yellow: #fbbf24;
  --accent-purple: #a855f7;
  --accent-green: #22c55e;
  --accent-blue: #3b82f6;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.22);
  --glow-pink: rgba(244, 63, 94, 0.35);
  --glow-cyan: rgba(6, 182, 212, 0.35);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fredoka', cursive, sans-serif;
  --font-alt: 'Outfit', sans-serif;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 16px 36px -8px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(30, 58, 110, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(67, 24, 107, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.6) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 19, 34, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.brand-logo-img:hover {
  transform: scale(1.04);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  background: #3b5074;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.icon-btn.has-dot::after {
  content: '';
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--accent-pink);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-pink);
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.85rem 0.25rem 0.35rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.user-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */
.dashboard-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ==========================================================================
   HERO BANNER (NATIVE HD 3D MASTER ARTWORK)
   ========================================================================== */
.hero-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2172 / 724;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
  background: #0b1329;
}

.hero-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(244, 63, 94, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hero-banner-main-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Primary Access Button (Explorar recursos) */
.hero-cta-hitbox {
  position: absolute;
  left: 4.6%;
  top: 61.2%;
  width: 20.2%;
  height: 12.5%;
  border-radius: var(--radius-full);
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  background: transparent;
  display: block;
}

.hero-cta-hitbox:hover {
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.75), inset 0 0 15px rgba(255, 255, 255, 0.35);
  transform: scale(1.02);
}

.hero-cta-hitbox:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   AGE CATEGORIES (BABIES, TODDLERS, KIDS, TEENS)
   ========================================================================== */
.age-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.age-card {
  position: relative;
  aspect-ratio: 20 / 9;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.age-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.3);
}

.age-card-bg-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.age-card.highlight {
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.4);
}

.age-card.highlight:hover {
  box-shadow: 0 14px 35px rgba(6, 182, 212, 0.45);
}

/* ==========================================================================
   RESOURCES SECTION ("Explora nuestros recursos")
   ========================================================================== */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-link {
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.section-link:hover {
  color: #38bdf8;
}

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

.resource-card {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.resource-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

.resource-card-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* ==========================================================================
   BOTTOM ROW (CONTINUA APRENDIENDO & MI PROGRESO)
   ========================================================================== */
.bottom-modules-row {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.module-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.module-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.module-link-arrow {
  color: #64748b;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.module-link-arrow:hover {
  color: #fff;
  transform: translateX(3px);
}

/* Continue cards row */
.continue-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.continue-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  transition: all 0.22s ease;
  cursor: pointer;
  display: block;
}

.continue-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

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

/* Progress Panel */
.progress-panel-wrapper {
  position: relative;
  background: rgba(19, 28, 49, 0.75);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive Overlay for Skills */
.skills-interactive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  width: 100%;
  padding: 1.15rem 1rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.skill-item:hover {
  transform: translateY(-3px);
}

.skill-icon-bubble {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.skill-icon-bubble.listening {
  background: radial-gradient(circle, #22c55e 0%, #15803d 100%);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.35);
}

.skill-icon-bubble.reading {
  background: radial-gradient(circle, #ec4899 0%, #be185d 100%);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

.skill-icon-bubble.writing {
  background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.skill-icon-bubble.speaking {
  background: radial-gradient(circle, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.skill-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

.skill-bar-outer {
  width: 80%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar-inner {
  height: 100%;
  border-radius: 10px;
}

.skill-bar-inner.listening { width: 85%; background: #22c55e; }
.skill-bar-inner.reading { width: 70%; background: #ec4899; }
.skill-bar-inner.writing { width: 62%; background: #f59e0b; }
.skill-bar-inner.speaking { width: 90%; background: #0284c7; }

/* ==========================================================================
   MODAL POPUP (PREVIEW / SEARCH / MEDIA)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #141f36;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 1.75rem;
  color: #cbd5e1;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 1100px) {
  .age-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .resources-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bottom-modules-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px;
    gap: 8px;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .nav-pill {
    flex-shrink: 0;
    min-height: 42px;
    white-space: nowrap;
  }
  .dashboard-container {
    padding: 0.85rem;
    gap: 1.25rem;
  }
  .section-headline-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .continue-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .hero-cta-hitbox {
    left: 3.5%;
    top: 55%;
    width: 30%;
    height: 35%;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.6rem 0.75rem;
  }
  .brand-logo {
    height: 38px;
  }
  .user-greeting {
    display: none;
  }
  .user-profile-badge {
    padding: 4px;
    gap: 4px;
  }
  .age-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .age-card {
    min-height: 105px;
  }
  .age-card-badge {
    font-size: 0.7rem;
    padding: 2px 7px;
  }
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .resource-card {
    padding: 0.65rem;
  }
  .resource-thumb {
    height: 95px;
  }
  .resource-title {
    font-size: 0.88rem;
  }
  .continue-cards-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta-hitbox {
    left: 3%;
    top: 52%;
    width: 36%;
    height: 40%;
    min-height: 44px;
  }
}
