/*
Theme Name: La Ginesta
Author: La Ginesta
Description: Tema a medida para La Ginesta, centro especializado en discapacidad intelectual y del desarrollo.
Version: 1.0
Text Domain: laginesta
*/

body { margin: 0; background: #fff; }
html { overflow-x: hidden; }
.lg-page-wrap { overflow-x: hidden; }
a { color: #3C4A55; text-decoration: none; }
a:hover { color: #ED7B4B; }

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

/* Menú principal (Apariencia > Menús) */
.lg-nav {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.lg-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.lg-menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #3C4A55;
  border-radius: 2px;
}
.lg-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lg-menu li {
  position: relative;
}
.lg-menu > li > a {
  font-weight: 600;
  font-size: 15px;
  color: #3C4A55;
  padding: 8px 0;
  display: inline-block;
  transition: color .15s ease;
}
.lg-menu > li > a:hover,
.lg-menu > li > a:focus {
  color: #273640;
}
.lg-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e7e2d5;
  border-radius: 10px;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  box-shadow: 0 12px 28px rgba(60, 74, 85, 0.12);
  z-index: 60;
}
.lg-menu li:hover > .sub-menu,
.lg-menu li:focus-within > .sub-menu {
  display: block;
}
.lg-menu .sub-menu li a {
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #3C4A55;
  white-space: nowrap;
}
.lg-menu .sub-menu li a:hover,
.lg-menu .sub-menu li a:focus {
  background: #faf8f4;
  color: #273640;
}
.lg-menu li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid #3C4A55;
  border-bottom: 2px solid #3C4A55;
  transform: rotate(45deg);
  margin-left: 6px;
  vertical-align: middle;
	margin-top: -5px;
  transition: border-color .15s ease;
}
.lg-menu li.menu-item-has-children > a:hover::after,
.lg-menu li.menu-item-has-children > a:focus::after {
  border-color: #273640;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes macPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* Blog */
.lg-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 64px 100px;
}
.lg-blog-card {
  background: #fff;
  border: 1px solid #e7e2d5;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lg-blog-card img { width: 100%; height: 190px; object-fit: cover; }
.lg-blog-card .lg-blog-card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.lg-blog-card .lg-date { font-size: 13px; font-weight: 700; color: #8b9a7b; letter-spacing: 0.03em; }
.lg-blog-card h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 20px; line-height: 1.3; color: #3C4A55; margin: 10px 0 12px; }
.lg-blog-card p { font-size: 15px; line-height: 1.55; color: #5A6873; margin: 0 0 16px; flex: 1; }
.lg-blog-card a.lg-read-more { font-weight: 700; font-size: 14px; color: #3C4A55; border-bottom: 2px solid #fddd2f; width: fit-content; }

.lg-page-header { max-width: 1200px; margin: 0 auto; padding: 60px 64px 0; }
.lg-page-header h1 { font-family: 'Fraunces', serif; font-weight: 300; font-size: 34px; color: #3C4A55; }

.lg-pagination { display: flex; gap: 10px; justify-content: center; padding: 0 64px 80px; }
.lg-pagination a, .lg-pagination span { padding: 8px 14px; border-radius: 6px; border: 1px solid #e7e2d5; font-size: 14px; color: #3C4A55; }
.lg-pagination .current { background: #3C4A55; color: #fff; border-color: #3C4A55; }

.lg-single { max-width: 760px; margin: 0 auto; padding: 70px 64px 100px; }
.lg-single .lg-date { font-size: 13px; font-weight: 700; color: #8b9a7b; letter-spacing: 0.03em; }
.lg-single h1 { font-family: 'Fraunces', serif; font-weight: 300; font-size: 36px; line-height: 1.2; color: #3C4A55; margin: 12px 0 24px; }
.lg-single .lg-featured { width: 60%; border-radius: 12px; margin-bottom: 32px; }
.lg-single .entry-content { font-size: 17px; line-height: 1.75; color: #3C4A55; }
.lg-single .entry-content p { margin: 0 0 20px; }
.lg-single .entry-content h2 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 26px; color: #3C4A55; margin: 40px 0 16px; }
.lg-single .entry-content img { border-radius: 8px; margin: 24px 0; }
.lg-back { display: inline-block; margin-top: 40px; font-weight: 700; font-size: 15px; color: #3C4A55; border-bottom: 2px solid #fddd2f; }

/* Hovers de la nueva paleta */
section a[style*="background:#f4db16"],
section a[style*="background: #f4db16"],
section a[style*="background:#ED7B4B"],
section a[style*="background: #ED7B4B"],
.btn-orange,
#contacto input[type="submit"],
#contacto button[type="submit"],
#contacto .wpforms-submit,
#contacto .wpcf7-submit {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* Los botones amarillos pasan a naranjo. */
section a[style*="background:#f4db16"]:hover,
section a[style*="background: #f4db16"]:hover {
  background-color: #ED7B4B !important;
  border-color: #ED7B4B !important;
  color: #fff !important;
}

/* Los botones naranjos pasan a naranjo oscuro. */
section a[style*="background:#ED7B4B"]:hover,
section a[style*="background: #ED7B4B"]:hover,
.btn-orange:hover,
#contacto input[type="submit"]:hover,
#contacto button[type="submit"]:hover,
#contacto .wpforms-submit:hover,
#contacto .wpcf7-submit:hover {
  background-color: #C65327 !important;
  border-color: #C65327 !important;
  color: #fff !important;
}

/* Los subrayados amarillos pasan a naranjo. */
section a[style*="border-bottom:2px solid #f4db16"]:hover,
.lg-blog-card a.lg-read-more:hover,
.lg-back:hover {
  border-bottom-color: #ED7B4B !important;
  color: #ED7B4B !important;
}

.lg-dot:hover,
.lg-acad-dot:hover {
  background-color: #ED7B4B !important;
}

@media (max-width: 900px) {
  .lg-menu-toggle { display: flex !important; }
  .lg-nav {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: #faf8f4;
    box-shadow: -8px 0 30px rgba(0,0,0,0.12);
    padding: 90px 28px 28px;
    z-index: 55;
    overflow-y: auto;
  }
  .lg-nav.lg-nav-open { display: block; }
  .lg-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .lg-menu > li { width: 100%; }
  .lg-menu > li > a { padding: 12px 0; width: 100%; border-bottom: 1px solid #e7e2d5; }
  .lg-menu .sub-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: #f4f0e9;
    border-radius: 8px;
    margin: 4px 0 8px;
    padding: 4px 0;
  }
  .lg-menu li.menu-item-has-children > a::after { display: none; }

  section { padding-left: 24px !important; padding-right: 24px !important; }
  .lg-blog-grid, .lg-page-header { padding-left: 24px !important; padding-right: 24px !important; }

  /* Todas las grillas/columnas del diseño pasan a una sola columna a lo ancho completo */
  .lg-recursos-grid,
  .lg-footer-grid,
  .lg-contact-grid,
  .lg-mac-wrap,
  .lg-academia-wrap,
  .lg-destacado-card,
  .lg-tres-formas {
    display: block !important;
  }
  .lg-recursos-grid > *,
  .lg-footer-grid > *,
  .lg-contact-grid > *,
  .lg-mac-wrap > *,
  .lg-academia-wrap > *,
  .lg-destacado-card > *,
  .lg-tres-formas > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-bottom: 24px !important;
  }
  .lg-recursos-grid > *:last-child,
  .lg-footer-grid > *:last-child,
  .lg-contact-grid > *:last-child,
  .lg-mac-wrap > *:last-child,
  .lg-academia-wrap > *:last-child,
  .lg-destacado-card > *:last-child,
  .lg-tres-formas > *:last-child {
    margin-bottom: 0 !important;
  }
  .lg-destacado-card > *:last-child {
    height: 220px !important;
  }
  .lg-mac-wrap > *:last-child {
    display: flex !important;
    justify-content: center !important;
  }

  /* Tarjetas "Guía PDF" / "Video" dentro de la columna de recursos */
  .lg-recursos-grid > div:last-child > div {
    width: 100% !important;
  }

  /* Hero: bajar tamaños en pantallas chicas.
     Nota: el título visible del slide es <h2> (el <h1> real quedó oculto,
     por SEO, para no tener varios H1 en la página) — por eso el selector
     apunta a h2. */
  .lg-hero h2 { font-size: 32px !important; }
  .lg-hero > div { padding: 90px 24px 70px !important; }
  .lg-hero-botones { flex-direction: column !important; }
  .lg-hero-botones a { text-align: center; }
	.lg-hero-prev, .lg-hero-next {
  top: auto !important;
  bottom: 20px !important;
  transform: none !important;
  width: 36px !important;
  height: 36px !important;
  font-size: 16px !important;
}
.lg-hero-prev { left: 8px !important; }
.lg-hero-next { right: 8px !important; }

  /* Tarjeta oscura de "Academia" (Cursos y talleres, Diplomado, etc.) */
  .lg-academia-wrap > *:last-child {
    padding: 32px 24px !important;
    min-height: 0 !important;
  }
  .lg-academia-wrap .lg-acad-prev,
  .lg-academia-wrap .lg-acad-next {
    position: static !important;
  }
  .lg-academia-wrap .lg-acad-nav-btns {
    position: static !important;
    justify-content: flex-end !important;
    margin-bottom: 16px !important;
  }
  .lg-academia-wrap > *:last-child {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* "Tres formas de acompañar" e "impacto": permitir que se achiquen sin desbordar */
  section [style*="min-width:300px"],
  section [style*="min-width: 300px"] { min-width: 0 !important; width: 100% !important; }
	/* Hero de páginas interiores (Personas, Profesionales, Instituciones,
   Nosotros): en mobile, columnas a ancho completo apiladas, en vez de
   las 2 columnas lado a lado. */
.lg-page-hero-grid {
  grid-template-columns: 1fr !important;
}
	
}

@media (max-width: 480px) {
  .lg-hero h2 { font-size: 26px !important; }
  section h2[style*="font-size: 24px"] { font-size: 21px !important; }
	h1{font-size: 28px !important;}
	header{padding:14px 30px !important;}
	.lg-single .lg-featured { width: 100%; border-radius: 12px; margin-bottom: 32px; }
}
