/* ===== MEJORAS MÓVILES COMPLETAS ===== */

/* Variables para móvil */
:root {
  --mobile-padding: 1rem;
  --mobile-margin: 0.75rem;
  --mobile-font-base: 0.9rem;
  --mobile-line-height: 1.5;
}

/* ===== MEJORAS GENERALES MÓVILES ===== */

/* Contenedores responsive */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 992px) {
  .container {
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
  }
  
  /* Espaciado de secciones */
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Títulos responsive */
  h1 { font-size: 2.2rem; line-height: 1.2; }
  h2 { font-size: 1.8rem; line-height: 1.3; }
  h3 { font-size: 1.5rem; line-height: 1.3; }
  h4 { font-size: 1.3rem; line-height: 1.4; }
  h5 { font-size: 1.1rem; line-height: 1.4; }
  h6 { font-size: 1rem; line-height: 1.4; }
}

@media (max-width: 768px) {
  /* Contenedor móvil */
  .container {
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
  }
  
  /* Espaciado móvil */
  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  .py-4 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .mb-5 { margin-bottom: 2rem !important; }
  .mb-4 { margin-bottom: 1.5rem !important; }
  .mb-3 { margin-bottom: 1rem !important; }
  
  /* Tipografía móvil */
  body {
    font-size: var(--mobile-font-base);
    line-height: var(--mobile-line-height);
  }
  
  h1 { font-size: 2rem; margin-bottom: 1rem; }
  h2 { font-size: 1.6rem; margin-bottom: 0.875rem; }
  h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
  h4 { font-size: 1.2rem; margin-bottom: 0.75rem; }
  h5 { font-size: 1.1rem; margin-bottom: 0.5rem; }
  h6 { font-size: 1rem; margin-bottom: 0.5rem; }
  
  p { margin-bottom: 1rem; }
  
  /* Botones móviles */
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 8px;
    min-height: 44px; /* Tamaño mínimo para touch */
  }
  
  .btn-lg {
    padding: 1rem 1.75rem;
    font-size: 1.1rem;
    min-height: 48px;
  }
  
  .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: 40px;
  }
}

@media (max-width: 576px) {
  /* Extra pequeño */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Espaciado extra pequeño */
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Tipografía extra pequeña */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.15rem; }
  
  /* Botones extra pequeños */
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* ===== SOPORTE - MEJORAS MÓVILES ===== */

@media (max-width: 768px) {
  /* Hero móvil */
  .support-hero {
    padding: 3rem 0;
    min-height: 60vh;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.4;
  }
  
  /* Buscador móvil */
  .search-box {
    max-width: 100%;
    margin: 0 auto 1.5rem;
  }
  
  .search-input {
    height: 50px;
    font-size: 1rem;
    padding: 0 50px 0 1rem;
    border-radius: 25px;
  }
  
  .btn-search {
    width: 40px;
    height: 40px;
    right: 5px;
    top: 5px;
  }
  
  /* Sugerencias de búsqueda móvil */
  .quick-searches {
    margin-top: 1rem;
    text-align: center;
  }
  
  .quick-search-btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
    margin: 0.2rem !important;
  }
  
  /* Cards móviles */
  .category-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .category-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 15px;
  }
  
  .category-icon i,
  .category-icon svg {
    font-size: 1.5rem;
    width: 24px;
    height: 24px;
  }
  
  .category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  /* Enlaces móviles */
  .category-links {
    margin: 0;
  }
  
  .category-links li {
    margin-bottom: 0.5rem;
  }
  
  .category-links a {
    padding: 0.75rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: all 0.2s ease;
  }
  
  .category-links a i {
    margin-right: 0.75rem;
    font-size: 0.8rem;
    min-width: 16px;
  }
  
  .category-links a:hover {
    padding-left: 0.5rem;
    background: rgba(255, 107, 53, 0.08);
  }
}

@media (max-width: 576px) {
  /* Hero extra pequeño */
  .support-hero {
    padding: 2.5rem 0;
    min-height: 50vh;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
  
  /* Cards extra pequeñas */
  .category-card {
    padding: 1.25rem;
  }
  
  .category-icon {
    width: 50px;
    height: 50px;
  }
  
  .category-card h3 {
    font-size: 1.2rem;
  }
  
  .category-links a {
    font-size: 0.9rem;
    padding: 0.6rem 0;
  }
}

/* ===== GUÍAS - MEJORAS MÓVILES ===== */

@media (max-width: 768px) {
  /* Hero de guías móvil */
  .guide-hero {
    padding: 3rem 0;
    min-height: 50vh;
  }
  
  .guide-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }
  
  .guide-subtitle {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .guide-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 15px;
  }
  
  /* Pasos de guía móvil */
  .guide-step {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }
  
  .guide-step h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  
  .guide-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
  }
  
  .guide-step h4 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .guide-step h5 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
  }
  
  .step-number {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  /* Listas móviles */
  .guide-step ol,
  .guide-step ul {
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .guide-step ol li,
  .guide-step ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.95rem;
  }
  
  /* Cajas informativas móviles */
  .info-box,
  .success-box,
  .warning-box {
    padding: 1.25rem;
    margin: 1.25rem 0;
    border-radius: 10px;
    font-size: 0.95rem;
  }
  
  .info-box i,
  .success-box i,
  .warning-box i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }
  
  /* Códigos móviles */
  code {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    word-break: break-word;
  }
  
  pre {
    padding: 1.25rem;
    border-radius: 10px;
    margin: 1.25rem 0;
    overflow-x: auto;
    font-size: 0.85rem;
  }
  
  pre code {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}

@media (max-width: 576px) {
  /* Hero de guías extra pequeño */
  .guide-hero {
    padding: 2.5rem 0;
  }
  
  .guide-title {
    font-size: 1.75rem;
  }
  
  .guide-subtitle {
    font-size: 0.95rem;
  }
  
  .guide-icon {
    width: 50px;
    height: 50px;
  }
  
  /* Pasos extra pequeños */
  .guide-step {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .guide-step h2 {
    font-size: 1.3rem;
  }
  
  .guide-step h3 {
    font-size: 1.2rem;
  }
  
  .guide-step h4 {
    font-size: 1.1rem;
  }
  
  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* ===== MEJORAS DE NAVEGACIÓN MÓVIL ===== */

@media (max-width: 768px) {
  /* Header móvil */
  .site-header {
    padding: 0.5rem 0;
  }
  
  .navbar-brand img {
    height: 35px;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-nav {
    padding-top: 1rem;
  }
  
  .nav-link {
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .btn-area-cliente {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
  }
}

/* ===== MEJORAS DE FORMULARIOS MÓVILES ===== */

@media (max-width: 768px) {
  .form-control {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 44px;
  }
  
  .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.25);
  }
  
  .form-label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  
  .form-text {
    font-size: 0.85rem;
  }
}

/* ===== MEJORAS DE TABLAS MÓVILES ===== */

@media (max-width: 768px) {
  .table-responsive {
    border: none;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
  }
  
  th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}

/* ===== MEJORAS DE ACORDEÓN MÓVILES ===== */

@media (max-width: 768px) {
  .accordion-button {
    padding: 1.25rem;
    font-size: 1rem;
  }
  
  .accordion-body {
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .accordion-item {
    margin-bottom: 0.75rem;
    border-radius: 10px;
  }
}

/* ===== MEJORAS DE VIDEOS MÓVILES ===== */

@media (max-width: 768px) {
  .video-card {
    margin-bottom: 1.5rem;
  }
  
  .video-thumbnail {
    border-radius: 10px 10px 0 0;
  }
  
  .play-button {
    width: 50px;
    height: 50px;
  }
  
  .play-button i {
    font-size: 1rem;
  }
  
  .video-duration {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
  
  .video-info {
    padding: 1.25rem;
  }
  
  .video-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }
  
  .video-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
}

/* ===== OPTIMIZACIONES DE RENDIMIENTO MÓVIL ===== */

@media (max-width: 768px) {
  /* Reducir animaciones en móvil */
  * {
    animation-duration: 0.3s !important;
    transition-duration: 0.2s !important;
  }
  
  /* Optimizar imágenes */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Mejorar scroll */
  body {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Optimizar touch targets */
  a, button, .btn, .category-links a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .category-links a {
    justify-content: flex-start;
    padding-left: 0;
  }
}

/* ===== MEJORAS DE ACCESIBILIDAD MÓVIL ===== */

@media (max-width: 768px) {
  /* Focus mejorado */
  *:focus {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
  }
  
  /* Contraste mejorado */
  .text-muted {
    color: #6c757d !important;
  }
  
  /* Espaciado para lectores de pantalla */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* ===== LANDSCAPE MÓVIL ===== */

@media (max-width: 768px) and (orientation: landscape) {
  .support-hero,
  .guide-hero {
    min-height: 70vh;
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
}
