/* ===== Efecto hover para tarjetas de producto ===== */
.card1 {
  transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}
.card1:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 16px 40px rgba(21,101,192,.22);
  border-color: #1565c0;
  background: linear-gradient(135deg, #e0f7fa 70%, #f8fafd 100%);
}

/* ===== Modal de Compartir ===== */
.sharing-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.25s ease-out;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sharing-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 2.5rem;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  animation: sharingSlideUp 0.35s ease-out;
}

@keyframes sharingSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sharing-modal-header {
  position: relative;
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
}

.sharing-modal-header h3 {
  margin: 0;
  color: #1565c0;
  font-size: 1.5rem;
  font-weight: 700;
}

.sharing-modal-header h3 span {
  display: block;
  margin-top: 0.5rem;
  color: #333;
  font-size: 1.25rem;
  font-weight: 600;
}

.sharing-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #555;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transition: all 0.2s ease;
}

.sharing-modal-close:hover {
  background: #1565c0;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(21,101,192,0.35);
}

.sharing-modal-close:active {
  transform: scale(0.95);
}

.sharing-modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.35);
}

.sharing-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.sharing-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 2rem;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  color: #fff;
}

.sharing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.sharing-btn:active {
  transform: translateY(0);
}

.sharing-btn-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sharing-btn-email {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
}

.sharing-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #1da851);
}

/* ===== Reset & Tokens ===== */
*,
*::before,
*::after { 
  box-sizing: border-box; 
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

:root {
  --bg: #ffffff;
  --text: #222;
  --muted-text: #666;
  --brand: #51c65b;
  --brand-2: #1565c0;
  --brand-2-dark: #0d47a1;
  --card-bg: #f9f9f9;
  --card-border: #ddd;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --container: 1200px;
  --transition: 180ms;
}

/* ===== Base Styles ===== */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  position: relative;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===== Banner Rotativo (Extended) ===== */
.banner-extended {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  min-height: 200px;
  max-height: 600px;
  margin: 0 auto;
}

.banner-extended img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .banner-extended {
    min-height: 150px;
    max-height: 350px;
    width: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .banner-extended img {
    object-fit: contain;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .banner-extended {
    min-height: 100px;
    max-height: 250px;
    padding: 0;
  }
  
  .banner-extended img {
    max-height: 250px;
  }
}

/* Banner Rotativo (Legacy - mantener por compatibilidad) */
.banner-rotativo {
  position: relative;
  width: 100%;
  padding: 20px 0;
  background: #e3eaff;
  color: #1a237e;
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  min-height: 60px;
  transition: background 0.5s;
  border-radius: 0;
  box-shadow: 0 2px 8px #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 0 auto;
}

.banner-rotativo img {
  width: 100%;
  max-width: 1400px;
  max-height: clamp(200px, 40vw, 400px);
  object-fit: cover;
  border-radius: 0;
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .banner-rotativo {
    padding: 10px 0;
    min-height: 40px;
  }
  
  .banner-rotativo img {
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .banner-rotativo {
    padding: 5px 0;
  }
  
  .banner-rotativo img {
    max-height: 180px;
  }
}

/* ===== Catálogo Digital ===== */
.catalogodigital {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(1rem, 3vw, 2rem) 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.catalogodigital iframe {
  width: 96vw;
  max-width: 96vw;
  height: 800px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .catalogodigital {
    padding: 1rem 8px;
  }
  
  .catalogodigital iframe {
    width: calc(100% - 16px);
    max-width: 100%;
    height: 650px;
  }
}

@media (max-width: 480px) {
  .catalogodigital {
    padding: 0.75rem 8px;
  }
  
  .catalogodigital iframe {
    width: calc(100% - 16px);
    max-width: 100%;
    height: 800px;
    border-radius: 4px;
  }
}

/* ===== Footer ===== */
.main-footer {
  background: linear-gradient(135deg, #1565c0, #4f3c7e);
  color: white;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1rem, 2vw, 1rem);
  text-align: center;
  margin-top: clamp(2rem, 4vw, 3rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.distributor-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  transition: all 0.3s;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.distributor-link:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.distributor-link svg {
  width: clamp(16px, 3vw, 20px);
  height: clamp(16px, 3vw, 20px);
  flex-shrink: 0;
}

.footer-copyright {
  margin: 0.5rem 0;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.footer-contact {
  margin: 0.5rem 0;
  font-size: clamp(0.75rem, 1.4vw, 0.85rem);
  opacity: 0.9;
}

.footer-contact a {
  color: #51c65b;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-contact a:hover {
  color: #6dd77b;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .footer-links {
    gap: 1rem;
  }
  
  .distributor-link {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* ===== Header ===== */
.encabezado {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #1565c0 0%, #4f3c7e 30%, #51c65b 70%, #1565c0 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 3.5vw;
  padding: 18px 5vw 12px 5vw;
  min-height: 90px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.encabezado::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: floatingCircles 15s ease-in-out infinite;
  pointer-events: none;
}

@media (max-width: 768px) {
  .encabezado {
    padding: 12px 16px 10px 16px;
    min-height: 70px;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  
  .logo-titulo {
    flex: 0 0 auto;
  }
  
  .titulo-container {
    flex: 1;
    min-width: 0;
  }
  
  .menu-hamburguesa {
    margin-left: 8px;
    flex-shrink: 0;
  }
  
  .logo {
    width: 80px;
  }
  
  .titulo-pagina {
    font-size: 1.5rem;
    padding: 0 8px;
    text-align: center;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .encabezado {
    padding: 12px 3vw 10px 3vw;
    min-height: 80px;
    gap: 8px;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
  }
  
  .logo-titulo {
    flex: 0 0 auto;
    justify-content: flex-start;
    order: 0;
    margin: 0;
  }
  
  .logo {
    width: 70px;
  }
  
  .titulo-container {
    order: 0;
    width: auto;
    flex: 1;
  }
  
  .titulo-pagina {
    font-size: 1.1rem;
    padding: 0 8px;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .menu-hamburguesa {
    width: 40px;
    height: 40px;
    margin: 0 0 0 8px;
    order: 0;
    flex-shrink: 0;
  }
  
  .menu-hamburguesa span {
    height: 2px;
  }
}

@media (max-width: 380px) {
  .encabezado {
    padding: 10px 2vw 8px 2vw;
    min-height: 75px;
    justify-content: space-between;
    flex-direction: row;
  }
  
  .logo {
    width: 60px;
  }
  
  .titulo-pagina {
    font-size: 1rem;
  }
  
  .menu-hamburguesa {
    width: 36px;
    height: 36px;
    margin: 0 0 0 6px;
  }
}

.logo-titulo {
  display: flex;
  align-items: center;
  gap: 2vw;
  flex: 1 1 130px;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
}

.logo-titulo a {
  display: inline-block;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.logo-titulo a:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.logo {
  width: clamp(130px, 18vw, 135px);
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.logo:hover {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.titulo-pagina {
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
  color: #ffffff;
  font-size: clamp(2rem, 6vw, 3rem);
  text-align: center;
  word-break: break-all;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.titulo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* ===== Navigation ===== */
.menu-navegacion {
  display: none; /* Ocultamos el menú tradicional para usar solo el hamburguesa */
}

.menu-navegacion ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding-left: 0;
}

.menu-navegacion a {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  outline-offset: 2px;
  transition: background var(--transition), opacity var(--transition);
}
.menu-navegacion a:hover { background: rgba(255,255,255,.12); }
.menu-navegacion a:focus-visible { outline: 2px solid #fff; }

/* ===== Hamburger Menu ===== */
.menu-hamburguesa {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 9999;
  margin-left: auto;
  position: relative;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.menu-hamburguesa:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-hamburguesa.active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.menu-hamburguesa span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Animación del ícono hamburguesa cuando está abierto - se convierte en X */
.menu-hamburguesa.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-hamburguesa.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-hamburguesa.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay para el fondo cuando el menú está abierto */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 8000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(15px) saturate(180%);
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(21, 101, 192, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(81, 198, 91, 0.1) 0%, transparent 50%);
  animation: overlayPulse 8s ease-in-out infinite;
}

@keyframes overlayPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Menú fullscreen */
.menu-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #1565c0 0%, #4f3c7e 30%, #51c65b 70%, #1565c0 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  z-index: 8500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.menu-fullscreen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: floatingCircles 15s ease-in-out infinite;
}

@keyframes floatingCircles {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(120deg); }
  66% { transform: translateY(10px) rotate(240deg); }
}

.menu-fullscreen.active {
  transform: translateX(0);
}

.menu-fullscreen-nav {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.menu-fullscreen-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.menu-fullscreen-nav li {
  opacity: 0;
  transform: scale(0.8) rotateY(-30deg);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-fullscreen.active .menu-fullscreen-nav li {
  opacity: 1;
  transform: scale(1) rotateY(0deg);
}

.menu-fullscreen.active .menu-fullscreen-nav li:nth-child(1) { transition-delay: 0.1s; }
.menu-fullscreen.active .menu-fullscreen-nav li:nth-child(2) { transition-delay: 0.2s; }
.menu-fullscreen.active .menu-fullscreen-nav li:nth-child(3) { transition-delay: 0.3s; }
.menu-fullscreen.active .menu-fullscreen-nav li:nth-child(4) { transition-delay: 0.4s; }
.menu-fullscreen.active .menu-fullscreen-nav li:nth-child(5) { transition-delay: 0.5s; }

.menu-fullscreen-nav a {
  display: block;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
  letter-spacing: clamp(1px, 0.2vw, 2px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-fullscreen-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.menu-fullscreen-nav a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.08) translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.menu-fullscreen-nav a:hover::before {
  left: 100%;
}

/* Responsive para tablets y móviles */
@media (max-width: 768px) {
  .menu-fullscreen-nav ul {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .menu-fullscreen-nav a {
    min-height: 80px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .menu-fullscreen-nav ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Ya no necesitamos el botón cerrar separado - el hamburguesa maneja todo */

/* El menú hamburguesa está disponible en todas las resoluciones */

/* Prevenir scroll cuando el menú está abierto */
body.menu-open {
  overflow: hidden;
}

/* ===== Card Container Background ===== */
.cardcontainer {
  background-color: #f9f8ff;
}

/* ===== Galería de Proveedores ===== */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  padding: clamp(32px, 5vw, 48px) 40px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto clamp(32px, 5vw, 56px);
  align-items: center;
  justify-items: center;
  background: transparent;
  border: none;
  box-sizing: border-box;
}

.galeria-item {
  width: 100%;
  height: 100%;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.5vw, 24px);
  background: transparent;
  border: none;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.galeria-item:hover {
  transform: scale(1.05);
  border: none;
  background: transparent;
}

.galeria-item img {
  max-width: 100%;
  max-height: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.galeria-item:hover img {
  transform: scale(1.08);
  opacity: 0.9;
}

/* Ajuste para tablets medianos */
@media (max-width: 900px) {
  .galeria {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
    padding: 32px 40px;
    width: calc(100% - 80px);
    max-width: calc(100vw - 80px);
  }
  
  .galeria-item {
    min-height: 117px;
    padding: 14px;
  }
  
  .galeria-item img {
    max-height: 104px;
  }
}

/* Ajuste para tablets pequeños */
@media (max-width: 700px) {
  .galeria {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
    padding: 28px 30px;
    width: calc(100% - 60px);
    max-width: calc(100vw - 60px);
  }
  
  .galeria-item {
    min-height: 104px;
    padding: 12px;
  }
  
  .galeria-item img {
    max-height: 91px;
  }
}

/* Ajuste para móviles */
@media (max-width: 600px) {
  .galeria {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 16px;
    width: calc(100% - 32px);
    max-width: 100%;
  }
  
  .galeria-item {
    min-height: 80px;
    padding: 8px;
  }
  
  .galeria-item img {
    max-height: 70px;
  }
  
  .galeria-item:hover {
    transform: scale(1.03);
  }
}

/* Ajuste para móviles muy pequeños */
@media (max-width: 400px) {
  .galeria {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 12px;
    width: calc(100% - 24px);
    max-width: 100%;
  }
  
  .galeria-item {
    min-height: 70px;
    padding: 6px;
  }
  
  .galeria-item img {
    max-height: 60px;
  }
}

/* ===== Cards ===== */
.cardwrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(.8rem, 2.5vw, 1.25rem);
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

/* Ajustes responsive para tarjetas */
@media (max-width: 768px) {
  .cardwrap {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: var(--space-4) var(--space-2);
    width: calc(100% - 32px);
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .cardwrap {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-3) var(--space-2);
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .cardwrap {
    grid-template-columns: 1fr;
    padding: var(--space-3) var(--space-2);
    gap: 1rem;
  }
}

.card1 {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
  max-width: 280px;
  width: 100%;
  align-self: start;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .card1 {
    max-width: 100%;
  }
}
.card1:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 16px 40px rgba(21,101,192,.22);
  border-color: #1565c0;
  background: linear-gradient(135deg, #e0f7fa 70%, #f8fafd 100%);
}
.card1__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
}
.card1__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Card Badges Container ===== */
.card1__badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  gap: var(--space-2);
  background: #f8f9fa;
  border-bottom: 1px solid var(--card-border);
}

.card1__cefr {
  background: #16a34a;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: .35rem .6rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.card1__fav {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card1__fav:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.card1__fav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card1__header {
  padding: var(--space-4) var(--space-4) 0;
}
.card1__title {
  margin: 0 0 .25rem;
  font-size: clamp(1rem, .9rem + .6vw, 1.15rem);
}
.card1__subtitle {
  margin: 0;
  color: #6b7280;
  font-size: .9rem;
  max-width: 600px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  margin-left: auto;
  margin-right: auto;
}

.additionalcontent, .hidden {
  display: none;
} 

.card1__meta {
  display: inline-block;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4) 0;
}
.card1__rating {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: .15rem;
  font-size: 1.1rem;
  line-height: 1;
  margin-top: 0.2em;
  margin-bottom: 0.5em;
  width: 100%;
  order: 2;
}
.card1__rating span {
  position: relative;
  --fill: calc(var(--score,1)*100%);
}
.card1__rating span::before { content: "☆"; }
.card1__rating span::after {
  content: "★";
  position: absolute;
  inset: 0;
  width: var(--fill);
  overflow: hidden;
  color: #f5b301;
}
.card1__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.2em;
  text-align: left;
  width: 100%;
  margin: 0.5em 0 0.2em 0;
  order: 1;
}
.card1__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  padding: var(--space-4);
  padding-bottom: 1rem;
  margin-top: auto;
}
.btn {
  padding: .75rem 1rem;
  border-radius: .8rem;
  border: 1px solid var(--card-border);
  cursor: pointer;
}
.btn--primary {
  background: #2b59ff;
  color: #fff;
  border-color: transparent;
}
.btn--ghost {
  background: transparent;
}
@media (max-width: 380px) {
  .card1__actions { flex-direction: column; }
}

/* ===== Additional Gallery Styles ===== */
.card1__additional-gallery {
  padding: 0 var(--space-4) var(--space-3);
  margin-top: var(--space-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 5;
}

.card1__additional-gallery h4 {
  margin: 0 0 var(--space-2) 0;
  font-size: 0.9rem;
  color: var(--muted-text);
  font-weight: 600;
  text-align: center;
}

.card1__gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 300px;
  position: relative;
  z-index: 6;
}

.card1__gallery-item {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
}

.card1__gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.card1__gallery-item a {
  pointer-events: auto !important;
  cursor: pointer;
  display: block;
  width: 100%;
  height: 100%;
}

.card1__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: auto !important;
  cursor: pointer;
}

.card1__gallery-item.empty {
  background: #f8f9fa;
  border-style: dashed;
  border-color: #ddd;
  font-size: 0.7rem;
  color: var(--muted-text);
  text-align: center;
  padding: 0.25rem;
}

.card1__gallery-item.empty span {
  line-height: 1.1;
}

/* Responsive adjustments for additional gallery */
@media (max-width: 480px) {
  .card1__gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Lenguajes Section ===== */
.lenguajes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(10px, 2vw, 20px);
  justify-content: center;
  margin: clamp(25px, 5vw, 40px) auto;
  max-width: 1600px;
  padding: 0 40px;
  box-sizing: border-box;
  width: 100%;
}

.lenguajes article {
  position: relative;
  height: clamp(70px, 8vw, 90px);
  border-radius: clamp(8px, 1.5vw, 12px);
  text-align: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.lenguajes article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
  z-index: -1;
}

.lenguajes article::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.lenguajes1 { 
  background: linear-gradient(135deg, rgba(1, 133, 249, 0.85) 0%, rgba(160, 183, 252, 0.9) 100%), 
              url('images/uk-us-flag-silk-260nw-1144752740.webp') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(1, 133, 249, 0.3);
}
.lenguajes2 { 
  background: linear-gradient(135deg, rgba(133, 31, 184, 0.85) 0%, rgba(201, 119, 255, 0.9) 100%), 
              url('images/Fotolia_41940248_L.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(133, 31, 184, 0.3);
}
.lenguajes3 { 
  background: linear-gradient(135deg, rgba(17, 112, 1, 0.85) 0%, rgba(0, 255, 89, 0.9) 100%),
              url('/images/bandera-italia.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(17, 112, 1, 0.3);
}

.lenguajes4 { 
  background: linear-gradient(135deg, rgba(253, 0, 0, 0.85) 0%, rgba(255, 167, 167, 0.9) 100%),
              url('/images/fotolia-41940239-1.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(253, 0, 0, 0.3);
}

.lenguajes5 { 
  background: linear-gradient(135deg, rgba(248, 100, 2, 0.85) 0%, rgba(249, 212, 0, 0.9) 100%),
              url('/images/bandera-espana.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(248, 100, 2, 0.3);
}
.lenguajes6 { 
  background: linear-gradient(135deg, rgba(255, 0, 157, 0.85) 0%, rgba(251, 194, 235, 0.9) 100%), 
              url('images/Fotolia_42099910_L.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(255, 0, 157, 0.3);
}

.lenguajes article:hover {
  transform: translateY(-8px) scale(1.05) rotateX(5deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.lenguajes article:hover::after {
  left: 100%;
}

.lenguajes article h4 {
  margin: 0;
  font-size: clamp(0.75rem, 1.3vw, 1.1rem);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: clamp(0.3px, 0.8vw, 0.8px);
  text-transform: uppercase;
  z-index: 2;
  position: relative;
  padding: clamp(4px, 1vw, 8px) clamp(6px, 1.5vw, 12px);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.lenguajes article:hover h4 {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.lenguajes a { 
  text-decoration: none; 
  display: block;
  width: 100%;
}

/* Responsive para tablets */
@media (max-width: 900px) {
  .lenguajes {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 2.5vw, 15px);
  }
}

/* Responsive para móviles */
@media (max-width: 600px) {
  .lenguajes {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px auto;
    padding: 0 16px;
    width: calc(100% - 32px);
    max-width: 100%;
  }
  
  .lenguajes article {
    height: 70px;
    border-radius: 10px;
  }
  
  .lenguajes article h4 {
    font-size: 0.8rem;
    padding: 6px 10px;
    letter-spacing: 0.5px;
    border-radius: 5px;
  }
}

/* Responsive para móviles muy pequeños */
@media (max-width: 400px) {
  .lenguajes {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px auto;
  }
  
  .lenguajes article {
    height: 55px;
  }
  
  .lenguajes article h4 {
    font-size: 0.65rem;
    padding: 3px 6px;
  }
}

/* ===== Formulario de contacto ===== */
.formulario-contacto,
.contact-form-container {
  max-width: 620px;
  margin: 2rem auto 2.5rem auto;
  background: #fbfaff;
  border-radius: 24px;
  box-shadow: 0 6px 32px rgba(44,62,80,0.12);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.contact-form {
  position: relative;
  z-index: 1;
}
.contact-form label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: block;
  color: #1565c0;
  letter-spacing: 0.5px;
  width: fit-content;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.8em 1em;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  border: 1.5px solid #bcd0ee;
  font-size: 1.08rem;
  background: #ffffff;
  color: #2d2929;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 6px rgba(44,62,80,0.07);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: #1565c0;
  box-shadow: 0 2px 12px rgba(44,62,80,0.12);
  outline: none;
}
.contact-form .checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7em 1.2em;
  width: 100%;
  margin-bottom: 1.2rem;
}
.contact-form .checkbox-group label {
  font-weight: 400;
  color: #222;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  gap: 0.4em;
  background: #5875f9;
  padding: 0.3em 0.8em;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(44,62,80,0.04);
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form .checkbox-group label:hover {
  background: #e3f0ff;
}
.contact-form .checkbox-group input[type="checkbox"] {
  accent-color: #00f908;
  width: 18px;
  margin: 0;
}
.contact-form .form-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  margin-top: 0.5rem;
  width: 100%;
}
.contact-form button,
.btn-clear, .btn-mark {
  background: linear-gradient(90deg, #fff 60%, #e3f0ff 100%);
  color: #0077ff;
  border: none;
  border-radius: 12px;
  padding: 0.9em 2.2em;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(44,62,80,0.10);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  letter-spacing: 0.5px;
}
.contact-form button:hover,
.btn-clear:hover, .btn-mark:hover {
  background: linear-gradient(90deg, #1565c0 60%, #51c65b 100%);
  color: #fff;
  transform: scale(1.05);
}
.btn-clear, .btn-mark {
  padding: 0.7em 1.5em;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  display: inline-block;
}
.contact-info {
  max-width: 620px;
  margin: 0 auto 2rem auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 6px 32px rgba(44,62,80,0.12);
  padding: 2rem;
  color: #222;
  position: relative;
}
.contact-info h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1565c0;
  letter-spacing: 0.5px;
}
.contact-info p {
  margin: 0.5em 0;
  font-size: 1.08rem;
}
.contact-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(90deg, #1565c0 60%, #51c65b 100%);
  color: #fff;
  padding: 2rem 0 1rem 0;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(44,62,80,0.10);
}
.contact-header img {
  max-width: 160px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 12px #1565c0);
}
.contact-header h1 {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0;
  text-align: center;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(44,62,80,0.10);
}
@media (max-width: 700px) {
  .contact-header h1 { font-size: 1.4rem; }
  .contact-header img { max-width: 100px; }
  .contact-form-container, .contact-info { padding: 1rem; border-radius: 16px; }
  .contact-form button { padding: 0.8em 2em; font-size: 1rem; }
}
.contact-body {
  background-color: #c4d5e8;
}

/* ===== Mejoras específicas para el formulario de contacto ===== */
.page-header {
  text-align: center;
  margin: 2rem auto 3rem auto;
  max-width: 800px;
  padding: 0 2rem;
}

.page-header h1 {
  color: #1565c0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.page-header p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.5;
}

/* Mejoras para grupos de formulario */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #1565c0;
  letter-spacing: 0.3px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* Estilos para mensajes de error */
.error-message {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
  font-weight: 500;
}

.error-message[style*="block"] {
  display: block;
}

/* Estilos mejorados para fieldsets */
fieldset {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem;
  margin: 0;
  background: #f8fafc;
}

fieldset legend {
  color: #1565c0;
  font-weight: 600;
  font-size: 1rem;
  padding: 0 0.75rem;
  margin-left: 0.25rem;
}

/* Checkboxes personalizados */

.checkbox-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-content: center;
  align-items: center;
  text-align: center;
}

.radio-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-content: center;
  align-items: center;
  text-align: center;
}

.checkbox-label {
  position: relative;
  display: flex !important;
  align-items: center;
  cursor: pointer;
  padding: 0.6rem 0.8rem !important;
  background: #fff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  margin: 0 !important;
  font-weight: 500 !important;
  color: #374151 !important;
}

.checkbox-label:hover {
  background: #f1f5f9 !important;
  border-color: #1565c0 !important;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  margin-right: 0.6rem;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #1565c0;
  border-color: #1565c0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Checkbox especial para términos */
.privacy-label {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
  align-items: flex-start !important;
  padding: 1rem !important;
}

/* Botones mejorados */
.btn-mark, .btn-clear {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mark:hover, .btn-clear:hover {
  background: linear-gradient(135deg, #1565c0, #3b82f6);
  color: #fff;
  border-color: #1565c0;
  transform: translateY(-1px);
}

/* Botón de envío mejorado */
.btn-submit {
  background: linear-gradient(135deg, #1565c0, #3b82f6);
  color: #fff;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-width: 200px;
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f52ba, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(21, 101, 192, 0.3);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-section {
  text-align: center;
  margin-top: 2rem;
}

/* Texto de ayuda */
.form-help {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* Responsive para el formulario */
@media (max-width: 768px) {
  .contact-form-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr !important;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-mark, .btn-clear {
    width: 100%;
  }
}

/* ===== Eventos ===== */
.containereventos {
  background: #14b451;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
  padding: var(--space-4);
  margin: 40px auto;
  border-radius: var(--radius-lg);
  max-width: 100%;
}
.containereventos.is-aqua { background: aqua; }
.containereventos.is-indigo {
  background: rgb(45,17,185);
  border: 3px solid #000;
}
.containereventos.is-lime {
  background: rgb(178,219,75);
  border: 3px solid rgb(95,6,173);
}

/* ===== Utility ===== */
h1, .titulo {
  text-align: center;
  margin: 30px 0;
  color: #333;
}
.titulo { font-size: clamp(1.4rem, 3vw, 1.8rem); color: #e40a0a; }
.descripcion {
  font-size: 1rem;
  margin: 10px 15px 20px;
  color: var(--muted-text);
  text-align: center;
}

/* ===== Misc ===== */

/* Filtroscatalogo: diseño bonito, alineado y botón limpiar arriba, mejorado para responsive */
.filtroscatalogo {
  max-width: 1400px;
  margin: 2rem auto 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 50%, #f3f8ff 100%);
  border-radius: 18px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 
    0 8px 32px rgba(21, 101, 192, 0.12),
    0 4px 16px rgba(81, 198, 91, 0.08),
    0 2px 8px rgba(44, 62, 80, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 2.2rem 2rem 1.2rem 2rem;
  align-items: start;
  position: relative;
  transition: all 0.3s ease;
}

.filtroscatalogo::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #1565c0, #51c65b, #1565c0);
  border-radius: 20px;
  z-index: -1;
  opacity: 0.8;
}

.filtroscatalogo:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(21, 101, 192, 0.15),
    0 6px 20px rgba(81, 198, 91, 0.1),
    0 3px 12px rgba(44, 62, 80, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.filtroscatalogo:hover::before {
  opacity: 1;
}

.filtroscatalogo > div {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  min-width: 0;
}

.filtroscatalogo label {
  font-weight: 600;
  margin-bottom: 0.2em;
  color: #1565c0;
  letter-spacing: 0.5px;
}

.filtroscatalogo select,
.filtroscatalogo input[type="number"],
.filtroscatalogo input[type="text"] {
  padding: 0.5em 1em;
  border-radius: 8px;
  border: 1px solid #bcd0ee;
  font-size: 1.08rem;
  background: #fff;
  color: #222;
  box-shadow: 0 1px 4px rgba(44,62,80,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.filtroscatalogo select:focus,
.filtroscatalogo input[type="number"]:focus,
.filtroscatalogo input[type="text"]:focus {
  border-color: #1565c0;
  box-shadow: 0 2px 12px rgba(44,62,80,0.12);
  outline: none;
}

.filtroscatalogo #btn-clear-filtros {
  grid-column: 1 / -1;
  justify-self: end;
  margin-bottom: 1rem;
  padding: 0.7em 2em;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #1565c0 60%, #51c65b 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.10);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  z-index: 2;
}

.filtroscatalogo #btn-clear-filtros:hover {
  background: linear-gradient(90deg, #51c65b 60%, #1565c0 100%);
  color: #fff;
  transform: scale(1.05);
}

/* Responsive: una sola columna en móvil, botón arriba centrado */
@media (max-width: 900px) {
  .filtroscatalogo {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.2rem 1rem 0.8rem 1rem;
  }
  .filtroscatalogo #btn-clear-filtros {
    justify-self: center;
    width: 100%;
    font-size: 1rem;
    padding: 0.6em 1.2em;
  }
  
  /* Agrupar filtros de precio solo en responsive */
  .filtro-precio-min {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .filtro-precio-max {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    margin-top: -0.3rem;
  }
  
  .filtro-precio-min input[type="number"],
  .filtro-precio-max input[type="number"] {
    width: 100px !important;
    flex-shrink: 0;
  }
  
  .filtro-precio-min label,
  .filtro-precio-max label {
    margin-right: 0 !important;
    white-space: nowrap;
    font-size: 0.95rem;
  }
}

/* ===== Sharing Modal Styles ===== */
.sharing-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.sharing-modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 90%;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sharing-modal-header {
  background: linear-gradient(90deg, #1565c0 60%, #51c65b 100%);
  color: #fff;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sharing-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.sharing-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.sharing-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sharing-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sharing-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.sharing-btn-email {
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: #fff;
  border-color: #4285f4;
}

.sharing-btn-email:hover {
  background: linear-gradient(135deg, #3367d6, #2e8b57);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.3);
}

.sharing-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border-color: #25d366;
}

.sharing-btn-whatsapp:hover {
  background: linear-gradient(135deg, #1da851, #0f6b5c);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

/* Responsive modal */
@media (max-width: 480px) {
  .sharing-modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .sharing-modal-header {
    padding: 1rem;
  }
  
  .sharing-modal-header h3 {
    font-size: 1rem;
  }
  
  .sharing-modal-body {
    padding: 1rem;
  }
  
  .sharing-btn {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
}

/* ===== PÁGINA DE SERVICIOS ACADÉMICOS ===== */

/* Hero Section */
.hero-servicios {
  background: linear-gradient(135deg, #1565c0 0%, #4f3c7e 30%, #51c65b 70%, #1565c0 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  color: white;
  text-align: center;
  padding: clamp(60px, 10vw, 120px) 20px;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.hero-servicios::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: floatingCircles 15s ease-in-out infinite;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-servicios h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.hero-description {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  line-height: 1.6;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Modalidades Section */
.modalidades-section {
  padding: 60px 0;
  background: #f8fafc;
}

.modalidades-section h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #1e293b;
  margin-bottom: 3rem;
  font-weight: 600;
}

.modalidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.modalidad-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(21, 101, 192, 0.1);
  position: relative;
}

.modalidad-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
  border-color: rgba(21, 101, 192, 0.3);
}

.modalidad-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.modalidad-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  z-index: 3;
}

.modalidad-card:hover .modalidad-header::after {
  left: 100%;
}

.modalidad-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.modalidad-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.modalidad-card:hover .modalidad-image img {
  transform: scale(1.1);
}

.modalidad-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.8) 0%, rgba(79, 60, 126, 0.7) 50%, rgba(81, 198, 91, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.modalidad-card:hover .modalidad-overlay {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.9) 0%, rgba(79, 60, 126, 0.8) 50%, rgba(81, 198, 91, 0.9) 100%);
}

.modalidad-icon {
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.modalidad-card:hover .modalidad-icon {
  transform: scale(1.2) rotate(5deg);
}

.modalidad-content {
  padding: 2rem;
  text-align: center;
}

.modalidad-content h3 {
  font-size: 1.6rem;
  color: #1e293b;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.modalidad-content p {
  color: #64748b;
  line-height: 1.7;
  font-size: 1.1rem;
  margin: 0;
}

/* Catálogo Section */
.catalogo-section {
  padding: 80px 0;
  background: white;
}

.catalogo-section > .container > h2 {
  text-align: center;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: #1e293b;
  margin-bottom: 4rem;
  font-weight: 600;
}

.charlas-categoria {
  margin-bottom: 4rem;
}

.categoria-titulo {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #1e293b;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #1565c0;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
}

.nuevo-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.charlas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.charla-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.charla-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #1565c0;
}

.charla-card.destacada {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.charla-card.destacada:hover {
  border-color: #d97706;
}

.charla-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.charla-card h4 {
  font-size: 1.2rem;
  color: #1e293b;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}

.charla-badge {
  background: linear-gradient(135deg, #1565c0, #3b82f6);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.charla-badge.español {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.charla-badge.clil {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.charla-badge.pbl {
  background: linear-gradient(135deg, #059669, #10b981);
}

.charla-description {
  color: #475569;
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
}

/* Reserva Section */
.reserva-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.reserva-card {
  background: white;
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 0 auto;
}

.reserva-card h2 {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #1e293b;
  margin-bottom: 2.5rem;
  font-weight: 600;
}

.reserva-info {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 16px;
  border-left: 4px solid #1565c0;
}

.info-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.info-content h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.info-content p {
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #1565c0, #3b82f6);
  color: white;
  box-shadow: 0 4px 15px rgba(21, 101, 192, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(21, 101, 192, 0.4);
}

.btn-secondary {
  background: white;
  color: #1565c0;
  border: 2px solid #1565c0;
}

.btn-secondary:hover {
  background: #1565c0;
  color: white;
  transform: translateY(-2px);
}

/* Footer CTA */
.footer-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  text-align: center;
}

.footer-cta h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-cta p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-cta {
  background: linear-gradient(135deg, #51c65b, #4ade80);
  color: white;
  padding: 1.2rem 2.5rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 8px 30px rgba(81, 198, 91, 0.3);
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(81, 198, 91, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .charlas-grid {
    grid-template-columns: 1fr;
  }
  
  .charla-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .modalidades-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .modalidad-header {
    height: 180px;
  }
  
  .modalidad-content {
    padding: 1.5rem;
  }
  
  .modalidad-content h3 {
    font-size: 1.4rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .reserva-card {
    padding: 2rem 1.5rem;
  }
  
  .info-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* Advisory Request Form Styles */
.advisory-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem 2rem;
  margin: 2rem auto;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.advisory-hero h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 700;
}

.advisory-hero p {
  font-size: 1.2rem;
  color: #34495e;
  margin-bottom: 0;
  opacity: 0.9;
}

.advisory-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.advisory-form {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.form-section {
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.15) 100%);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.form-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
  border-color: rgba(52, 152, 219, 0.5);
}

.form-section legend {
  font-weight: 700;
  color: #2c3e50;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  border: none;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.form-grid.full-width {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem;
  border: 2px solid rgba(52, 152, 219, 0.2);
  border-radius: 10px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-item,
.radio-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  border: 2px solid rgba(52, 152, 219, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  text-align: center;
}

.checkbox-item:hover,
.radio-item:hover {
  background: rgba(52, 152, 219, 0.1);
  border-color: #3498db;
  transform: translateX(2px);
}

.radio-item input[type="radio"] {
  margin: 0;
  margin-top: 0.1rem;
  width: 18px;
  height: 18px;
  accent-color: #3498db;
  cursor: pointer;
  flex-shrink: 0;
}

.radio-item label {
  margin: 0;
  cursor: pointer;
  line-height: 1.4;
  font-size: 0.95rem;
  color: #2c3e50;
  flex: 1;
}

.radio-item:has(input[type="radio"]:checked) {
  background: rgba(52, 152, 219, 0.15);
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.radio-item:has(input[type="radio"]:checked) label {
  color: #2980b9;
  font-weight: 600;
}

.checkbox-item input[type="checkbox"]:checked + label,
.radio-item input[type="radio"]:checked + label {
  color: #3498db;
  font-weight: 600;
}

.checkbox-item input[type="checkbox"]:checked,
.radio-item input[type="radio"]:checked {
  accent-color: #3498db;
}

.conditional-fields {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(52, 152, 219, 0.05);
  border-radius: 10px;
  border-left: 4px solid #3498db;
  display: none;
}

.conditional-fields.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-info {
  padding: 1rem 2rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(149, 165, 166, 0.6);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.6);
}

.json-preview {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #2c3e50;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
}

.json-preview.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.json-preview h3 {
  color: #ecf0f1;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.json-preview pre {
  background: #34495e;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #a8e6cf;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design for Advisory Form */
@media (max-width: 768px) {
  .advisory-hero {
    padding: 2rem 1rem;
    margin: 1rem;
  }

  .advisory-hero h1 {
    font-size: 2rem;
  }

  .advisory-hero p {
    font-size: 1rem;
  }

  .advisory-container {
    padding: 1rem;
  }

  .advisory-form {
    padding: 1.5rem;
    margin: 0;
  }

  .form-section {
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-info {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .advisory-hero h1 {
    font-size: 1.8rem;
  }

  .form-section legend {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.6rem;
  }

  .checkbox-item,
  .radio-item {
    padding: 0.4rem 0.8rem;
  }
}

/* ===== COMPREHENSIVE MOBILE RESPONSIVE FIXES ===== */
/* Prevent horizontal overflow on all mobile devices */
@media (max-width: 768px) {
  /* Global overflow prevention */
  * {
    max-width: 100%;
  }
  
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
  }
  
  /* Ensure all containers respect mobile width */
  .container,
  .cardwrap,
  .galeria,
  .lenguajes,
  .catalogodigital,
  .main-footer,
  .encabezado,
  .banner-extended,
  .banner-rotativo {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Fix images */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Fix iframes */
  iframe {
    max-width: 100%;
  }
  
  /* Menu adjustments */
  .menu-fullscreen-nav ul {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .menu-fullscreen-nav a {
    min-height: 80px;
    font-size: 1.2rem;
    padding: 1rem;
  }
  
  /* Ensure footer content is properly contained */
  .footer-content {
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .distributor-link {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .encabezado {
    padding: 10px 12px 8px 12px;
    min-height: 70px;
  }
  
  .titulo-pagina {
    font-size: 1.2rem !important;
  }
  
  .logo {
    width: 60px !important;
  }
  
  .menu-hamburguesa {
    width: 36px;
    height: 36px;
  }
  
  .menu-fullscreen-nav a {
    min-height: 70px;
    font-size: 1rem;
    padding: 0.8rem;
  }
}

/* Very small devices */
@media (max-width: 360px) {
  .encabezado {
    padding: 8px 8px 6px 8px;
    min-height: 65px;
  }
  
  .titulo-pagina {
    font-size: 1rem !important;
  }
  
  .logo {
    width: 50px !important;
  }
  
  .lenguajes {
    padding: 0 8px;
    gap: 8px;
  }
  
  .lenguajes article {
    height: 60px;
  }
  
  .lenguajes article h4 {
    font-size: 0.7rem;
    padding: 4px 6px;

  }
}

#menu-hamburguesa {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

#menu-hamburguesa span {
  display: block !important;
  background: #ffffff !important;
}

@media (max-width: 768px) {
  .logo-titulo {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
    min-width: 60px;
    position: relative;
    z-index: 3;
  }

  .logo-titulo a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 72px !important;
    height: auto !important;
  }
}

@media (max-width: 360px) {
  .logo {
    width: 54px !important;
  }
}

@media (max-width: 480px) {
  .encabezado {
    position: sticky;
  }

  #menu-hamburguesa {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  #menu-hamburguesa.active {
    transform: translateY(-50%) scale(1.1);
  }
  
  .galeria {
    padding: 12px 8px;
    gap: 8px;
  }
}

.sharing-extra-links {
  margin-top: 18px;
  text-align: left;
}

.sharing-extra-links h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.sharing-extra-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sharing-sample-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f7fb;
  text-decoration: none;
  color: #1565c0;
  font-weight: 600;
  transition: 0.2s ease;
}

.sharing-sample-link:hover {
  background: #e8f1ff;
  transform: translateY(-1px);
  
 .semaforo {
    margin-top: 15px;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
}

.verde { background: #dcfce7; color: #166534; }
.amarillo { background: #fef9c3; color: #854d0e; }
.rojo { background: #fee2e2; color: #b91c1c; }


.galeria {
  outline: none;
  background: transparent;
}

.lenguajes {
  outline: none;
  background: transparent;
}
/* ===== PARCHE DASHBOARD: evitar textos desbordados ===== */

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

td a,
td span,
td strong,
td small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Correos largos */
td.email-cell {
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* Botones dentro de tablas */
td .btn,
td a.btn,
td button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  white-space: nowrap;
  flex-shrink: 0;
}
/* ===== PARCHE LISTAS DE PRECIOS ===== */

.lista-precios-disponibles li,
.download-item,
.price-file-item,
.card-panel ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.lista-precios-disponibles li span,
.download-item span,
.price-file-item span,
.card-panel ul li span,
.card-panel ul li strong,
.card-panel ul li a.nombre-archivo {
  flex: 1 1 220px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lista-precios-disponibles li .btn,
.download-item .btn,
.price-file-item .btn,
.card-panel ul li .btn {
  flex-shrink: 0;
}
/* ===== PARCHE LISTAS DE PRECIOS ===== */

.file-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.file-list li span {
    flex: 1 1 220px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

.file-list li .btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.logo {
    width: 90px;
}

.titulo {
    text-align: center;
    flex: 1;
}

.folio-box {
    text-align: right;
    font-size: 13px;
    color: #334155;
    background: none;
    border: none;
}
.datos-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.datos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 40px;
}

.datos-grid strong {
    color: #1e293b;
}
.texto-confirmacion {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 25px;
    text-align: justify;
}
.logo {
  height: 60px;       /* 🔥 ajusta aquí el tamaño */
  width: auto;
  max-height: 60px;
  object-fit: contain;
}