/*
Theme Name: DF School Editorial
Version: 2.4.2
Description: Rediseno editorial para el vertical escolar. Compatible con Elementor.
Author: Claude (direccion de arte)
Requires PHP: 8.1
*/

/* ========================================
   TOKENS / VARIABLES
   ======================================== */
:root {
  /* Colores */
  --df-black: #0D0D0D;
  --df-white: #FAFAFA;
  --df-stone: #E8E6E3;
  --df-mustard: #D4A017;
  --df-gray: #4A4A4A;
  --df-gray-light: #7A7A7A;

  /* Tipografia */
  --df-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Espaciado */
  --df-section-gap: 80px;
  --df-section-padding: 60px 20px;
  --df-container-max: 1140px;

  /* Transiciones */
  --df-transition: 200ms ease;
}

@media (min-width: 1024px) {
  :root {
    --df-section-gap: 120px;
    --df-section-padding: 100px 40px;
  }
}

/* ========================================
   RESET Y BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--df-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--df-black);
  background: var(--df-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  body { font-size: 17px; }
}

@media (min-width: 1024px) {
  body { font-size: 18px; }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Focus visible para accesibilidad */
:focus-visible {
  outline: 2px solid var(--df-mustard);
  outline-offset: 2px;
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip link */
.df-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--df-mustard);
  color: var(--df-black);
  padding: 12px 24px;
  font-weight: 600;
  z-index: 9999;
}

.df-skip-link:focus {
  top: 0;
}

/* ========================================
   CONTENEDOR BASE
   ======================================== */
.df-container {
  width: 100%;
  max-width: var(--df-container-max);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1024px) {
  .df-container {
    padding: 0 40px;
  }
}

/* ========================================
   BARRA DE REVISION
   ======================================== */
.df-review-bar {
  background: var(--df-black);
  color: var(--df-white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 10px 20px;
}

/* ========================================
   HEADER
   ======================================== */
.df-header {
  background: var(--df-white);
  padding: 20px 0;
  border-bottom: 1px solid var(--df-stone);
}

.df-header .df-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.df-header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--df-black);
  letter-spacing: -0.01em;
}

.df-header-nav {
  display: flex;
  gap: 32px;
}

.df-header-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--df-gray);
  position: relative;
  transition: color var(--df-transition);
}

.df-header-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--df-black);
  transition: width var(--df-transition);
}

.df-header-nav a:hover {
  color: var(--df-black);
}

.df-header-nav a:hover::after {
  width: 100%;
}

/* ========================================
   HERO
   ======================================== */
.df-hero {
  background: var(--df-white);
  padding: var(--df-section-padding);
}

.df-hero .df-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 768px) {
  .df-hero .df-container {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
}

@media (min-width: 1024px) {
  .df-hero .df-container {
    grid-template-columns: 55% 45%;
    gap: 80px;
  }
}

.df-hero-content {
  order: 1;
}

@media (min-width: 768px) {
  .df-hero-content {
    order: 0;
  }
}

.df-hero h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--df-black);
  margin: 0 0 24px;
}

@media (min-width: 768px) {
  .df-hero h1 { font-size: 52px; }
}

@media (min-width: 1024px) {
  .df-hero h1 { font-size: 64px; }
}

@media (min-width: 1440px) {
  .df-hero h1 { font-size: 72px; }
}

.df-hero-subtitle {
  font-size: 18px;
  color: var(--df-gray);
  margin: 0 0 32px;
  max-width: 480px;
}

@media (min-width: 768px) {
  .df-hero-subtitle { font-size: 20px; }
}

.df-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.df-hero-image {
  order: 0;
}

@media (min-width: 768px) {
  .df-hero-image {
    order: 1;
  }
}

.df-hero-image figure {
  margin: 0;
}

.df-hero-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--df-stone);
}

.df-hero-image figcaption {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--df-gray-light);
  margin-top: 12px;
  text-align: center;
}

/* ========================================
   BOTONES
   ======================================== */
.df-btn-primary,
.df-btn-secondary {
  display: inline-block;
  font-family: var(--df-font);
  font-size: 15px;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--df-transition), color var(--df-transition), border-color var(--df-transition);
  text-align: center;
  border: none;
}

.df-btn-primary {
  background: var(--df-mustard);
  color: var(--df-black);
}

.df-btn-primary:hover,
.df-btn-primary:focus {
  background: var(--df-black);
  color: var(--df-white);
}

.df-btn-secondary {
  background: transparent;
  color: var(--df-black);
  border: 1px solid var(--df-black);
}

.df-btn-secondary:hover,
.df-btn-secondary:focus {
  background: var(--df-black);
  color: var(--df-white);
}

/* ========================================
   SECCIONES GENERICAS
   ======================================== */
.df-section {
  padding: var(--df-section-padding);
}

.df-section--stone {
  background: var(--df-stone);
}

.df-section--black {
  background: var(--df-black);
  color: var(--df-white);
}

.df-section h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--df-black);
  margin: 0 0 24px;
}

@media (min-width: 768px) {
  .df-section h2 { font-size: 32px; margin-bottom: 32px; }
}

@media (min-width: 1024px) {
  .df-section h2 { font-size: 40px; margin-bottom: 40px; }
}

.df-section--black h2 {
  color: var(--df-white);
}

.df-section p {
  color: var(--df-gray);
  margin: 0 0 16px;
  max-width: 680px;
}

.df-section--black p {
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   PROCESO / PASOS
   ======================================== */
.df-process {
  background: var(--df-stone);
}

.df-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .df-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .df-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.df-step {
  background: var(--df-white);
  border: 1px solid var(--df-stone);
  border-radius: 4px;
  padding: 32px 28px;
}

.df-step-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--df-mustard);
  line-height: 1;
  margin-bottom: 16px;
}

.df-step-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--df-black);
  margin: 0 0 12px;
}

.df-step-desc {
  font-size: 15px;
  color: var(--df-gray);
  margin: 0;
  line-height: 1.5;
}

/* ========================================
   BLOQUES DE CONTENIDO
   ======================================== */
.df-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}

@media (min-width: 768px) {
  .df-content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
  }
}

.df-content-block h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--df-black);
  margin: 0 0 16px;
}

@media (min-width: 768px) {
  .df-content-block h3 { font-size: 24px; }
}

/* ========================================
   FAQ
   ======================================== */
.df-faq {
  background: var(--df-white);
}

.df-faq-list {
  max-width: 800px;
}

.df-faq-item {
  border-bottom: 1px solid var(--df-stone);
}

.df-faq-question {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--df-font);
  font-size: 16px;
  font-weight: 600;
  color: var(--df-black);
  text-align: left;
  padding: 20px 40px 20px 0;
  cursor: pointer;
  position: relative;
  transition: color var(--df-transition);
}

@media (min-width: 768px) {
  .df-faq-question { font-size: 18px; padding: 24px 48px 24px 0; }
}

.df-faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 400;
  color: var(--df-gray);
  transition: transform var(--df-transition);
}

.df-faq-item.is-open .df-faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.df-faq-question:hover {
  color: var(--df-mustard);
}

.df-faq-answer {
  display: none;
  padding: 0 0 24px;
  color: var(--df-gray);
  font-size: 16px;
  line-height: 1.6;
}

.df-faq-item.is-open .df-faq-answer {
  display: block;
}

/* ========================================
   CTA FINAL
   ======================================== */
.df-final-cta {
  background: var(--df-black);
  text-align: center;
  padding: 80px 20px;
}

@media (min-width: 768px) {
  .df-final-cta { padding: 120px 40px; }
}

.df-final-cta h2 {
  color: var(--df-white);
  margin-bottom: 20px;
}

.df-final-cta p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto 40px;
}

.df-final-cta .df-btn-primary {
  min-width: 280px;
}

/* ========================================
   FOOTER
   ======================================== */
.df-footer {
  background: var(--df-black);
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.df-footer .df-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .df-footer .df-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.df-footer-text {
  font-size: 14px;
  color: var(--df-gray-light);
  margin: 0;
}

.df-footer-links {
  display: flex;
  gap: 24px;
}

.df-footer-links a {
  font-size: 14px;
  color: var(--df-gray-light);
  transition: color var(--df-transition);
}

.df-footer-links a:hover {
  color: var(--df-white);
}

/* ========================================
   CARDS GENERICAS
   ======================================== */
.df-card {
  background: var(--df-white);
  border: 1px solid var(--df-stone);
  border-radius: 4px;
  padding: 32px;
}

.df-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--df-black);
  margin: 0 0 12px;
}

.df-card p {
  font-size: 16px;
  color: var(--df-gray);
  margin: 0;
}

/* ========================================
   ELEMENTOR OVERRIDES
   ======================================== */
.elementor {
  max-width: var(--df-container-max);
  margin: 0 auto;
}

.elementor h1 {
  font-size: clamp(36px, 5vw, 72px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  text-transform: uppercase !important;
  color: var(--df-black) !important;
  line-height: 1.05 !important;
}

.elementor h2 {
  font-size: clamp(24px, 3vw, 40px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: var(--df-black) !important;
}

.elementor p,
.elementor .elementor-widget-text-editor {
  color: var(--df-gray) !important;
}

.elementor * {
  font-family: var(--df-font) !important;
}

.elementor .elementor-button {
  font-family: var(--df-font) !important;
  font-weight: 600 !important;
  padding: 16px 32px !important;
  border-radius: 2px !important;
  transition: background var(--df-transition), color var(--df-transition) !important;
}

.elementor .elementor-button.df-btn-primary {
  background: var(--df-mustard) !important;
  color: var(--df-black) !important;
}

.elementor .elementor-button.df-btn-primary:hover {
  background: var(--df-black) !important;
  color: var(--df-white) !important;
}

.elementor .elementor-button.df-btn-secondary {
  background: transparent !important;
  border: 1px solid var(--df-black) !important;
  color: var(--df-black) !important;
}

.elementor .elementor-button.df-btn-secondary:hover {
  background: var(--df-black) !important;
  color: var(--df-white) !important;
}

/* Hero image en Elementor */
.elementor .df-hero-image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--df-stone);
}

.elementor .df-hero-image figcaption,
.elementor .df-hero-caption {
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  color: var(--df-gray-light) !important;
  text-align: center !important;
  margin-top: 12px !important;
}
