/* ============================
   RESPONSIVE STYLES
   ============================ */

/* Configuración de base para todos los tamaños */
:root {
  --primary-color: #536dfe;
  --secondary-color: #42a5f5;
  --dark-blue: #303f9f;
  --light-blue: #bbdefb;
  --text-color: #333;
  --light-text: #ffffff;
  --dark-bg: #1a1a2e;
  --light-bg: #f5f5f5;
  --border-radius: 0.5rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* Estilos generales responsive */
html {
  font-size: 16px;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

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

/* Contenedor principal ajustado para evitar desbordamiento */
.container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Asegurarse de que todas las secciones respeten el ancho */
section {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Estilos para el formulario y los radio buttons de Telegram */
.form-group {
  margin-bottom: 1.5rem;
  width: 100%;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.form-check-input {
  margin-right: 0.5rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.form-check-label {
  font-weight: 400;
  cursor: pointer;
}

/* Media Queries */

/* Pantallas extra grandes (1600px+) */
@media (min-width: 1600px) {
  html {
    font-size: 18px;
  }
  
  .container {
    max-width: 1440px;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .booking-form-content {
    max-width: 600px;
  }
  
  .videos-container {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
    gap: 3rem;
  }
}

/* Pantallas grandes (1200px-1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
  .container {
    max-width: 1140px;
  }
  
  .hero-visual {
    max-width: 45%;
  }
  
  .videos-container {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }
}

/* Dispositivos de escritorio (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  html {
    font-size: 16px;
  }
  
  .container {
    max-width: 960px;
    padding: 0 1.5rem;
    margin: 0 auto;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-content {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
  
  .hero-text {
    width: 55%;
  }
  
  .hero-visual {
    width: 45%;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  .videos-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 100%;
  }
  
  .availability-container {
    flex-direction: column;
  }
  
  .calendar-container {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .time-slots {
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 100%;
  }
  
  /* Ajustes para mejorar proporciones */
  .about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
  }
  
  .about-image {
    width: 40%;
  }
  
  .about-text {
    width: 60%;
  }
  
  .process-timeline {
    max-width: 900px;
    margin: 0 auto;
  }
  
  .contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
  }
}

/* Pantallas grandes (1200px+) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
    margin: 0 auto;
  }
  
  /* Ajustes para hero en pantallas grandes */
  .hero-content {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .hero-text {
    width: 50%;
  }
  
  .hero-visual {
    width: 45%;
  }
  
  /* Ajustes para otras secciones */
  .services-grid,
  .videos-container,
  .stats-grid,
  .about-content,
  .process-timeline,
  .contact-container,
  .testimonials-slider,
  .footer-content {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Tabletas (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
  html {
    font-size: 15px;
  }
  
  .container {
    max-width: 720px;
    padding: 0 1.5rem;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  .header-content {
    padding: 0.75rem 1rem;
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    flex: 0 0 auto;
  }
  
  .logo img {
    max-height: 40px;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
    position: relative;
    z-index: 101;
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
  }
  
  .hero-text {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin: 0 auto 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin: 0 auto 1.5rem;
  }
  
  .hero-buttons {
    justify-content: center;
    margin: 0 auto;
  }
  
  .hero-visual {
    width: 80%;
    margin: 0 auto;
  }
  
  /* Ajustes para secciones de contenido */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    width: 70%;
    margin: 0 auto 2rem;
  }
  
  .about-text {
    width: 100%;
  }
  
  .about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .videos-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 100%;
  }
  
  /* Proceso */
  .process-timeline {
    padding: 2rem 0;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }
  
  /* Disponibilidad */
  .availability-container {
    flex-direction: column;
    max-width: 680px;
    margin: 0 auto;
  }
  
  .calendar-container {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .time-slots {
    width: 100%;
  }
  
  .slots-container {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .booking-form-content {
    width: 90%;
    max-width: 500px;
  }
  
  /* Contacto */
  .contact-container {
    flex-direction: column;
    max-width: 680px;
    margin: 0 auto;
  }
  
  .contact-info {
    width: 100%;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .contact-form-container {
    width: 100%;
  }
  
  /* Footer */
  .footer-content {
    flex-direction: column;
  }
  
  .footer-logo {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Ajustes generales para dispositivos móviles */
@media (max-width: 767px) {
  body, html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    padding: 0;
    margin: 0;
  }
  
  body {
    padding-top: 0; /* Eliminar el padding superior del body ya que usamos sticky */
  }
  
  /* Ajustar el espaciado de secciones */
  section, .section {
    padding: 2rem 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Mejorar la visualización del header */
  .header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px 0;
    transition: all 0.3s ease;
    margin-top: 0;
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    margin-right: 0;
  }
  
  .logo img {
    height: 35px;
    width: auto;
    display: block;
  }
  
  .header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  /* Ajustar el hero para compensar el header fijo */
  .hero {
    padding-top: 5rem;
    min-height: auto;
  }
  
  /* Mejorar la visualización de contenedores */
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* Ajustar la visualización del menú móvil */
  .mobile-menu {
    width: 80%;
    max-width: 300px;
    z-index: 1000;
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  /* Mejorar animación del timeline y proceso */
  .process-timeline {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .timeline-line {
    left: 25px !important;
    transform: none !important;
  }
  
  .timeline-step {
    flex-direction: row !important;
    max-width: 100%;
    margin-left: 25px;
  }
  
  .step-number {
    margin: 0 1rem 0 0;
  }
  
  .step-content {
    max-width: calc(100% - 70px);
  }
  
  /* Mejoras para videos */
  .videos {
    padding: 3rem 0;
  }
  
  .videos-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .video-item {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .video-wrapper {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
  
  .video-wrapper.video-playing {
    z-index: 10;
  }
  
  .video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 3;
  }
  
  .video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
  }
  
  .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
  }
  
  /* Ajustar secciones para mejor alineación en móvil */
  section {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 2rem 0;
  }
  
  /* Mejorar sección hero en móvil */
  .hero-content {
    gap: 1.5rem;
    padding-top: 1rem;
  }
  
  /* Arreglar overflow en formularios */
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Asegurar que la barra de notificación no interfiera con el header */
  .notification-bar {
    position: relative;
    z-index: 1002;
  }
  
  /* Ajustar la sección de servicios */
  .services-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .service-card {
    width: 100%;
  }
  }
  
/* Específico para móviles muy pequeños */
@media (max-width: 575px) {
  html {
    font-size: 14px;
  }
  
  .header-buttons .btn-telegram {
    display: none; /* Ocultar en pantallas muy pequeñas para ahorrar espacio */
  }
  
  .logo img {
    max-width: 110px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  /* Ajuste para botones */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Asegurar que las Floating Cards no causen overflow */
  .floating-card {
    width: 85%;
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin: 1rem auto;
  }
}

/* Soporte para prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Estilos para impresión */
@media print {
  .header, .footer, .mobile-menu, .whatsapp-float, .back-to-top, 
  .booking-form-container, .booking-confirmation {
    display: none !important;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    background: #fff !important;
    color: #000 !important;
  }
  
  a {
    text-decoration: underline;
    color: #000 !important;
  }
  
  .section {
    page-break-inside: avoid;
  }
}

/* Ajustes generales para todos los dispositivos */
body, html {
  overflow-x: hidden;
  max-width: 100vw;
}

section, .section {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.container {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Ajustes adicionales para dispositivos de escritorio (992px-1199px) */
@media (min-width: 992px) {
  /* Ajustar el scroll horizontal */
  .container, section, .section {
    overflow-x: visible;
  }
  
  /* Mejorar la navegación */
  .header-content {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }
  
  /* Mejorar las secciones de contenido */
  .about-content, .contact-container {
    display: flex;
    flex-wrap: nowrap;
  }
  
  .hero-buttons {
    flex-wrap: nowrap;
  }
  
  /* Ajuste de secciones específicas */
  .process-timeline {
    position: relative;
    max-width: 100%;
  }
  
  .timeline-steps {
    position: relative;
  }
  
  .videos-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Ajuste para el footer */
  .footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ajustes adicionales para dispositivos tablet (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .header {
    width: 100%;
    max-width: 100%;
  }
  
  .header-buttons {
    display: flex;
    align-items: center;
    position: relative;
    gap: 0.5rem;
  }
  
  .header-buttons .btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
  
  /* Corregir posicionamiento de secciones */
  .section-header {
    padding: 0 1rem;
  }
  
  .process-timeline {
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  .timeline-step {
    margin-bottom: 2rem;
  }
  
  .step-content {
    padding: 1rem;
    max-width: 80%;
  }
  
  /* Ajustar vídeos en tablet */
  .video-item {
    margin-bottom: 1.5rem;
  }
  
  .video-wrapper {
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
  }
  
  .video-wrapper iframe, 
  .video-wrapper .video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Mejorar formularios y contacto */
  .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .contact-form {
    width: 100%;
  }
}

/* Correcciones para móviles */
@media (max-width: 767px) {
  /* Ajustar el espaciado de secciones */
  section, .section {
    padding: 2rem 0;
  }
  
  /* Mejorar apariencia de secciones */
  .section-header {
    margin-bottom: 1.5rem;
  }
  
  /* Ajustes para el proceso timeline en móvil */
  .process-timeline {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .timeline-line {
    left: 25px !important;
    transform: none !important;
  }
  
  .timeline-step {
    flex-direction: row !important;
    max-width: 100%;
    margin-left: 25px;
  }
  
  .step-number {
    margin: 0 1rem;
  }
  
  .step-content {
    max-width: calc(100% - 70px);
  }
  
  /* Ajustes para los videos */
  .video-wrapper {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }
  
  .video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 3;
  }
  
  .video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
  }
  
  /* Ajustes para los botones y llamadas a la acción */
  .btn {
    width: auto;
    min-width: 150px;
  }
}

/* Estilos para el calendario */
@media (max-width: 768px) {
    .availability-container {
        flex-direction: column;
        padding: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .calendar-container {
        border-radius: 10px;
        margin-bottom: 20px;
        width: 100%;
        overflow: hidden;
    }
    
    .calendar-days {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }
    
    .calendar-day {
        height: 40px;
        width: 100%;
        font-size: 14px;
    }
    
    .time-slots {
        width: 100%;
        margin-top: 20px;
    }
    
    .slots-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .time-slot {
        width: calc(50% - 10px);
        font-size: 14px;
    }
}

/* Asegurar que el logo se muestre correctamente en todas las resoluciones */
@media (min-width: 768px) {
  .logo {
    display: flex;
    align-items: center;
  }
  
  .logo img {
    display: block;
    height: 50px;
    width: auto;
    max-width: 100%;
  }
  
  .logo-dark {
    display: block;
  }
  
  .logo-light {
    display: none;
  }
}

@media (max-width: 768px) {
  .logo img {
    max-height: 40px;
    height: auto;
    width: auto;
  }
} 