/* =============================================
   EDULCOR EDUCAMOS — Stylesheet Principal
   Paleta vinotinto / rojo elegante
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --vino:       #6b1a2a;
  --vino-dark:  #4a0f1c;
  --vino-mid:   #8b2438;
  --vino-light: #f5e8eb;
  --vino-xlight:#fdf2f4;
  --accent:     #c0392b;
  --accent-gold:#c9a84c;
  --white:      #ffffff;
  --gray-50:    #faf8f8;
  --gray-100:   #f0ebec;
  --gray-300:   #c8b8bb;
  --gray-600:   #6b5558;
  --gray-900:   #1a0a0d;
  --radius:     12px;
  --shadow-sm:  0 2px 8px rgba(107,26,42,.08);
  --shadow-md:  0 6px 24px rgba(107,26,42,.14);
  --shadow-lg:  0 16px 48px rgba(107,26,42,.18);
  --transition: 0.25s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--vino);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--vino-dark);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--vino-light);
  color: var(--vino);
}

.nav-item {
  position: relative;
}

.nav-item > .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--vino-light);
  color: var(--vino);
}

.nav-item > .nav-link::after {
  content: '▾';
  font-size: 0.75em;
  transition: transform var(--transition);
}

.nav-item:hover > .nav-link::after {
  transform: rotate(180deg);
}

/* DROPDOWN — visible on hover (desktop) */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  min-width: 200px;
  overflow: hidden;
  border: 1px solid var(--gray-100);
  z-index: 1000;
}

/* Dropdown animado con delay — no se cierra al mover el mouse */
.nav-item .dropdown {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.nav-item:hover .dropdown,
.nav-item.open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

/* Puente invisible entre nav-link y dropdown para no perder hover */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 14px;
}

.dropdown li a {
  display: block;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-900);
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
}

.dropdown li a:hover {
  background: var(--vino-light);
  color: var(--vino);
  padding-left: 28px;
}

.dropdown li + li {
  border-top: 1px solid var(--gray-100);
}

.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: transform var(--transition), opacity var(--transition);
}
.social-icon:hover { transform: scale(1.1); opacity: 0.8; }

/* ── Hamburger (mobile) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--vino-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ── */
#hero {
  position: relative;
  overflow: hidden;
  background: var(--vino-dark);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container {
  position: absolute;
  inset: 0;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px;
  max-width: 800px;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-content h1 span {
  color: var(--accent-gold);
}

.hero-badge {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--vino-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
}

/* ── Extra Video ── */
#extra-video {
  background: var(--gray-50);
  padding: 60px 24px;
  text-align: center;
}

#extra-video video {
  width: 100%;
  max-width: 860px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ── Somos Section ── */
#somos-pro {
  padding: 80px 24px;
  background: var(--white);
}

#somos-pro .container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: center;
}

.img-container img {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.text-container .label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vino);
  margin-bottom: 12px;
}

.text-container h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--vino-dark);
  line-height: 1.2;
  margin-bottom: 20px;
}

.text-container h2 .highlight {
  color: var(--vino);
}

.text-container p {
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ── Footer ── */
footer {
  background: var(--vino-dark);
  color: var(--white);
  padding: 48px 24px 32px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.footer-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-contact,
.footer-location {
  font-size: 0.95rem;
  color: var(--gray-300);
  margin-bottom: 4px;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 24px 0;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* WhatsApp FAB */
.whatsapp-button {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 1000;
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}
.whatsapp-button img { width: 32px; height: 32px; }

/* ══════════════════════════════════════════
   PÁGINAS INTERNAS
   ══════════════════════════════════════════ */

.page-hero {
  background: linear-gradient(135deg, var(--vino-dark) 0%, var(--vino-mid) 100%);
  padding: 56px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  position: relative;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  margin-top: 10px;
  font-size: 1.05rem;
  position: relative;
}

/* Tab navigation */
.tab-nav {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 16px 24px;
  position: sticky;
  top: 76px;
  z-index: 100;
  border-bottom: 1px solid var(--gray-100);
}

.tab-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tablinks {
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 9px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
  color: var(--gray-600);
}

.tablinks:hover {
  border-color: var(--vino-mid);
  color: var(--vino);
  background: var(--vino-light);
}

.tablinks.active {
  background: var(--vino-dark);
  color: var(--white);
  border-color: var(--vino-dark);
}

/* Tab content */
.tabcontent {
  display: none;
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--vino-dark);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--vino);
  display: inline-block;
}

/* Book grid */
.book-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.book-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.book-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.book-item .book-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--vino-xlight);
}

.book-item .book-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.book-item:hover .book-img img { transform: scale(1.05); }

.book-item .book-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--vino-dark);
  margin-bottom: 8px;
}

.book-item p {
  font-size: 0.85rem;
  color: var(--gray-600);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.55;
}

.btn-contenido {
  display: inline-block;
  background: var(--vino);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), transform var(--transition);
  width: 100%;
}

.btn-contenido:hover {
  background: var(--vino-dark);
  transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }

  nav.open { display: flex; }
  .nav-link { width: 100%; }

  /* Mobile dropdown */
  .dropdown {
    position: static;
    box-shadow: none;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    margin-top: 4px;
    opacity: 1 !important;
    visibility: hidden;
    pointer-events: none;
    transform: none !important;
    transition: none !important;
    max-height: 0;
    overflow: hidden;
  }
  .nav-item.open .dropdown {
    visibility: visible;
    pointer-events: auto;
    max-height: 300px;
  }
  .nav-item::after { display: none; }

  #somos-pro .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tab-nav { top: 76px; padding: 12px 16px; }

  .book-section {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .book-section { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tablinks { padding: 7px 14px; font-size: 0.8rem; }
}
