/* ===================================================
   PipoReflexiona — Stylesheet
   Brand: Psicología y Neurociencia Accesible
   Palette: Blue #1B7BC0 · White · Light Blue
   =================================================== */

/* --- Variables & Reset --- */
:root {
  --blue:          #1B7BC0;
  --blue-dark:     #0D5C9E;
  --blue-light:    #2E9DE4;
  --blue-pale:     #E8F4FD;
  --blue-ultra:    #F0F9FF;
  --accent:        #F5A623;
  --accent-dark:   #D4891A;
  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F0F9FF;
  --bg-card:       #FFFFFF;
  --text-primary:  #1A2B3C;
  --text-secondary:#4A6580;
  --text-muted:    #8BA3BB;
  --border:        #D6EAF8;
  --border-dark:   #B8D9F0;
  --shadow-sm:     0 2px 8px rgba(27,123,192,0.1);
  --shadow-md:     0 4px 20px rgba(27,123,192,0.15);
  --shadow-lg:     0 8px 40px rgba(27,123,192,0.2);
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     24px;
  --radius-xl:     32px;
  --transition:    all 0.3s ease;
  --max-width:     1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a  { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-dark); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', sans-serif;
  line-height: 1.25;
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 600; }

.blue-text   { color: var(--blue); }
.accent-text { color: var(--accent); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue-pale);
  color: var(--blue);
  border: 1px solid var(--border-dark);
  border-radius: 50px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title    { text-align: center; margin-bottom: 0.6rem; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; font-size: 1.05rem; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }

/* --- Ad Slots --- */
.ad-slot {
  background: var(--bg-secondary);
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
}
.ad-leaderboard       { width: 100%; height: 90px; max-width: 728px; margin: 0 auto; }
.ad-rectangle         { width: 300px; height: 250px; flex-shrink: 0; }
.ad-banner-responsive { width: 100%; min-height: 90px; max-height: 100px; }
.ad-wrapper           { padding: 0.75rem 0; text-align: center; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.nav-logo img {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
}
.nav-cta:hover { background: var(--blue-dark) !important; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* --- Hero --- */
.hero {
  padding-top: 6rem;
  padding-bottom: 4rem;
  background: linear-gradient(160deg, var(--blue-ultra) 0%, #fff 60%);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(27,123,192,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--blue-pale); border: 1px solid var(--border-dark);
  border-radius: 50px; padding: 0.35rem 1rem;
  font-size: 0.78rem; color: var(--blue); font-weight: 700;
  letter-spacing: 0.05em; margin-bottom: 1.25rem;
}
.hero-title { margin-bottom: 1.25rem; }
.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--blue); color: #fff;
  padding: 0.875rem 2rem; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem;
  border: none; cursor: pointer; transition: var(--transition);
}
.btn-primary:hover {
  background: var(--blue-dark); color: #fff;
  transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--blue);
  padding: 0.875rem 2rem; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--blue); transition: var(--transition);
  cursor: pointer;
}
.btn-secondary:hover { background: var(--blue-pale); transform: translateY(-2px); }

.btn-fb {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: #1877F2; color: #fff;
  padding: 0.8rem 1.75rem; border-radius: 50px;
  font-weight: 700; font-size: 0.9rem;
  border: none; cursor: pointer; transition: var(--transition);
}
.btn-fb:hover { background: #145DBF; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(24,119,242,0.4); }

.hero-stats {
  display: flex; gap: 2.5rem;
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem; font-weight: 800; color: var(--blue);
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Hero character image */
.hero-visual {
  position: relative;
  display: flex; justify-content: center; align-items: flex-end;
}
.hero-char {
  width: 320px;
  filter: drop-shadow(0 20px 40px rgba(27,123,192,0.2));
  animation: float-char 5s ease-in-out infinite;
}
@keyframes float-char {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.hero-bubble {
  position: absolute;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.hero-bubble.b1 { top: 10%; right: -10px; animation: float-char 5s ease-in-out infinite 1s; }
.hero-bubble.b2 { bottom: 25%;  left: -20px; animation: float-char 5s ease-in-out infinite 2.5s; }
.hero-bubble .emoji { margin-right: 0.3rem; }

/* --- Wave divider --- */
.wave-divider { display: block; width: 100%; overflow: hidden; line-height: 0; }
.wave-divider svg { display: block; width: 100%; }

/* --- Videos Section --- */
.videos-section { background: #fff; }
.videos-layout  { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}
.video-card:hover {
  border-color: var(--blue-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.video-thumbnail {
  position: relative;
  aspect-ratio: 9/16;
  max-height: 320px;
  overflow: hidden;
  background: var(--blue-pale);
}
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,123,192,0.15);
  transition: var(--transition);
}
.video-card:hover .play-overlay { background: rgba(27,123,192,0.05); }
.play-btn {
  width: 52px; height: 52px;
  background: var(--blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(27,123,192,0.5);
  transition: var(--transition);
}
.video-card:hover .play-btn { transform: scale(1.1); background: var(--blue-dark); }
.video-info { padding: 1rem; }
.video-title {
  font-size: 0.875rem; font-weight: 600; color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }

.empty-state {
  grid-column: 1/-1; text-align: center;
  padding: 4rem 2rem; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }

/* Sidebar */
.videos-sidebar { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.sidebar-card h4 { font-size: 0.95rem; color: var(--blue); margin-bottom: 0.85rem; }

.yt-subscribe-btn {
  display: flex; align-items: center; gap: 0.6rem;
  background: #FF0000; color: #fff;
  padding: 0.7rem 1.25rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.875rem; width: 100%; justify-content: center;
  transition: var(--transition);
}
.yt-subscribe-btn:hover { background: #CC0000; color: #fff; transform: translateY(-2px); }

.fb-follow-btn {
  display: flex; align-items: center; gap: 0.6rem;
  background: #1877F2; color: #fff;
  padding: 0.7rem 1.25rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.875rem; width: 100%; justify-content: center;
  margin-top: 0.75rem; transition: var(--transition);
}
.fb-follow-btn:hover { background: #145DBF; color: #fff; transform: translateY(-2px); }

/* --- Video Modal --- */
.video-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85); align-items: center; justify-content: center; padding: 2rem;
}
.video-modal.active { display: flex; }
.modal-inner { position: relative; width: 100%; max-width: 380px; }
.modal-close {
  position: absolute; top: -2.5rem; right: 0;
  background: none; border: none; color: #fff; font-size: 1.75rem; cursor: pointer;
}
.modal-video {
  aspect-ratio: 9/16; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden; background: #000;
}
.modal-video iframe { width: 100%; height: 100%; border: none; }

/* --- Gallery --- */
.gallery-section { background: var(--bg-secondary); }
.gallery-grid { columns: 3; column-gap: 1.25rem; }
.gallery-item {
  break-inside: avoid; margin-bottom: 1.25rem;
  border-radius: var(--radius-md); overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition); cursor: pointer;
}
.gallery-item:hover { border-color: var(--blue-light); transform: scale(1.02); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; height: auto; display: block; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item a { display: block; }
.gallery-caption { display: none; }
.gallery-item--hidden { display: none; }
.video-card--hidden    { display: none; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.93); align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-md); object-fit: contain; }
.lightbox-close { position: fixed; top: 1.5rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* --- About --- */
.about-section { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-image { position: relative; text-align: center; }
.about-image img {
  max-width: 320px; margin: 0 auto;
  filter: drop-shadow(0 20px 40px rgba(27,123,192,0.2));
}
.about-badge {
  position: absolute; bottom: -10px; right: 0;
  background: var(--blue); color: #fff;
  border-radius: var(--radius-md); padding: 0.85rem 1.25rem;
  font-weight: 700; font-size: 0.8rem; box-shadow: var(--shadow-md);
}
.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { color: var(--text-secondary); line-height: 1.9; margin-bottom: 1.25rem; }

.pillars {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 2rem;
}
.pillar {
  background: var(--blue-pale);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
}
.pillar-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }
.pillar h5 { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; font-family: 'Inter', sans-serif; }
.pillar p  { font-size: 0.775rem; color: var(--text-muted); margin: 0; }

/* --- CTA / Newsletter --- */
.cta-section {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
}
.cta-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-inner h2 { color: #fff; margin-bottom: 1rem; }
.cta-inner p  { color: rgba(255,255,255,0.85); margin-bottom: 2.5rem; font-size: 1.05rem; }

.newsletter-form { display: flex; gap: 0.75rem; max-width: 450px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50px; padding: 0.875rem 1.5rem;
  color: #fff; font-size: 0.95rem; outline: none; transition: var(--transition);
}
.newsletter-form input:focus { border-color: #fff; background: rgba(255,255,255,0.25); }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form button { background: #fff; color: var(--blue); border: none; }
.newsletter-form button:hover { background: var(--blue-pale); color: var(--blue-dark); }
.form-note { font-size: 0.775rem; color: rgba(255,255,255,0.65); margin-top: 0.75rem; }

/* Social links */
.social-links { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }
.social-link {
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; transition: var(--transition);
}
.social-link:hover { background: rgba(255,255,255,0.3); color: #fff; transform: translateY(-3px); }

/* --- Footer --- */
.footer { background: var(--text-primary); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand .nav-logo { color: #fff; margin-bottom: 0.75rem; }
.footer-brand p { color: #9CA3AF; font-size: 0.875rem; line-height: 1.7; }
.footer-col h5 { font-family: 'Inter', sans-serif; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #9CA3AF; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: #D1D5DB; font-size: 0.875rem; }
.footer-col a:hover { color: var(--blue-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { color: #6B7280; font-size: 0.8rem; }

/* --- Scroll to top --- */
.scroll-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--blue); color: #fff; border: none; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition); z-index: 999;
  box-shadow: var(--shadow-md);
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover { background: var(--blue-dark); transform: translateY(-3px); }

/* --- Fade-in --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .videos-layout { grid-template-columns: 1fr; }
  .videos-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .ad-rectangle { width: 100%; height: 120px; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.98);
    align-items: center; justify-content: center;
    gap: 2rem; font-size: 1.2rem; z-index: 999;
  }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-description { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .gallery-grid { columns: 2; }
  .pillars { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
  .videos-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1.25rem; }
}
