/**
 * ============================================================
 * RESPONSIVE.CSS - Media Queries y diseño responsive
 * ============================================================
 * 
 * Archivo: responsive.css
 * Descripción: Todas las adaptaciones responsive para diferentes
 *              tamaños de pantalla (mobile-first approach)
 * 
 * Autor: TeknoSoft Development Team
 * Fecha: Febrero 2026
 * 
 * Dependencias: Todos los archivos CSS anteriores
 * 
 * BREAKPOINTS:
 * - Mobile: 320px - 767px (base)
 * - Tablet: 768px - 1023px
 * - Desktop: 1024px - 1439px
 * - Desktop XL: 1440px+
 * ============================================================
 */

/* ============================================================
   MOBILE PEQUEÑO (hasta 479px)
   ============================================================ */

@media (max-width: 479px) {
    /* Tipografía reducida */
    html {
        font-size: 14px;
    }
    
    .hero__title {
        font-size: var(--font-size-2xl);
    }
    
    .hero__subtitle {
        font-size: var(--font-size-base);
    }
    
    .section-header h2 {
        font-size: var(--font-size-xl);
    }
    
    /* Estadísticas en 2 columnas */
    .hero__stats {
        gap: var(--spacing-3);
    }
    
    .hero__stat {
        flex: 1 1 calc(50% - var(--spacing-3));
        padding: var(--spacing-2);
    }
    
    .hero__stat-text {
        font-size: var(--font-size-xs);
    }
    
    /* Formulario en 1 columna */
    .cta-form__grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MOBILE (hasta 767px)
   ============================================================ */

@media (max-width: 767px) {
    /* Contenedor */
    .container {
        padding-left: var(--spacing-4);
        padding-right: var(--spacing-4);
    }
    
    /* Secciones con menos padding */
    section {
        padding: var(--spacing-12) 0;
    }
    
    /* ============================================
       HEADER / NAVEGACIÓN
       ============================================ */
    
    /* Mostrar hamburguesa */
    .hamburger {
        display: flex;
    }
    
    /* Ocultar navegación desktop */
    .nav {
        display: none;
    }
    
    /* Mostrar menú móvil */
    .mobile-menu {
        display: block;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    /* ============================================
       HERO
       ============================================ */
    
    .hero {
        padding: var(--spacing-24) 0 var(--spacing-12);
        min-height: auto;
    }
    
    .hero__container {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
        text-align: center;
    }
    
    .hero__content {
        max-width: 100%;
    }
    
    .hero__title {
        font-size: var(--font-size-3xl);
    }
    
    .hero__buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero__buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero__stats {
        justify-content: center;
    }
    
    .hero__image {
        order: -1;
    }
    
    .hero__illustration-placeholder {
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Ocultar elementos decorativos */
    .hero__decoration {
        display: none;
    }
    
    .hero__scroll {
        display: none;
    }
    
    /* ============================================
       SOLUCIONES
       ============================================ */
    
    .solutions__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
    
    .solution-card {
        padding: var(--spacing-6);
    }
    
    /* ============================================
       CRM SECTION
       ============================================ */
    
    .crm-section__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }
    
    .crm-section__visual {
        position: relative;
        top: 0;
        order: -1;
    }
    
    .crm-visual-container {
        padding: var(--spacing-4);
    }
    
    .crm-visual-float {
        display: none;
    }
    
    .crm-why__grid {
        grid-template-columns: 1fr;
    }
    
    .crm-benefits__list {
        grid-template-columns: 1fr;
    }
    
    .crm-cta__buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* ============================================
       POR QUÉ TEKNOSOFT
       ============================================ */
    
    .why-teknosoft__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
    
    .why-card {
        padding: var(--spacing-6);
    }
    
    /* ============================================
       PROCESO / TIMELINE
       ============================================ */
    
    .process__timeline {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }
    
    /* Ocultar línea conectora horizontal */
    .process__timeline::before {
        display: none;
    }
    
    .process__step {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: var(--spacing-4);
        text-align: left;
    }
    
    .process__step-number {
        width: 60px;
        height: 60px;
        margin: 0;
        font-size: var(--font-size-xl);
    }
    
    .process__step-content {
        padding-top: var(--spacing-2);
    }
    
    /* ============================================
       ESTADÍSTICAS
       ============================================ */
    
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-6);
    }
    
    .stat-item__number {
        font-size: var(--font-size-3xl);
    }
    
    .stat-item__label {
        font-size: var(--font-size-sm);
    }
    
    /* ============================================
       TESTIMONIOS
       ============================================ */
    
    .testimonial-card {
        padding: var(--spacing-6);
    }
    
    .testimonial-card__quote {
        font-size: var(--font-size-lg);
    }
    
    .testimonial-card__quote::before {
        font-size: var(--font-size-4xl);
        top: -10px;
        left: 0;
    }
    
    .testimonial-card__author {
        flex-direction: column;
        text-align: center;
    }
    
    /* ============================================
       CTA SECTION
       ============================================ */
    
    .cta-section__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }
    
    .cta-section__title {
        font-size: var(--font-size-2xl);
    }
    
    .cta-form {
        padding: var(--spacing-6);
    }
    
    .cta-form__grid {
        grid-template-columns: 1fr;
    }
    
    /* ============================================
       FOOTER
       ============================================ */
    
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }
    
    .footer__column {
        padding-left: 0;
    }
    
    .footer__about {
        max-width: 100%;
        text-align: center;
    }
    
    .footer__social {
        justify-content: center;
    }
    
    .footer__title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer__nav {
        text-align: center;
    }
    
    .footer__nav-link::before {
        display: none;
    }
    
    .footer__contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer__legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-4);
    }
    
    .footer__legal li:not(:last-child)::after {
        display: none;
    }
    
    /* Back to top más pequeño */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--spacing-4);
        right: var(--spacing-4);
    }
    
    /* ============================================
       MODAL
       ============================================ */
    
    .modal__content {
        margin: var(--spacing-4);
        max-height: calc(100vh - var(--spacing-8));
    }
    
    /* ============================================
       GRIDS GENÉRICOS
       ============================================ */
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   TABLET (768px - 1023px)
   ============================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Contenedor */
    .container {
        padding-left: var(--spacing-6);
        padding-right: var(--spacing-6);
    }
    
    /* ============================================
       HERO
       ============================================ */
    
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero__content {
        max-width: 700px;
        margin: 0 auto;
    }
    
    .hero__title {
        font-size: var(--font-size-4xl);
    }
    
    .hero__buttons {
        justify-content: center;
    }
    
    .hero__stats {
        justify-content: center;
    }
    
    .hero__image {
        display: none;
    }
    
    /* ============================================
       SOLUCIONES
       ============================================ */
    
    .solutions__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ============================================
       CRM SECTION
       ============================================ */
    
    .crm-section__content {
        grid-template-columns: 1fr;
    }
    
    .crm-section__visual {
        position: relative;
        top: 0;
    }
    
    .crm-why__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ============================================
       PROCESO
       ============================================ */
    
    .process__timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-8);
    }
    
    .process__timeline::before {
        display: none;
    }
    
    /* ============================================
       ESTADÍSTICAS
       ============================================ */
    
    .stats__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ============================================
       CTA SECTION
       ============================================ */
    
    .cta-section__content {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .cta-section__text {
        text-align: center;
    }
    
    /* ============================================
       FOOTER
       ============================================ */
    
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ============================================
       GRIDS GENÉRICOS
       ============================================ */
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   DESKTOP (1024px - 1439px)
   ============================================================ */

@media (min-width: 1024px) {
    /* Contenedor más amplio */
    .container {
        padding-left: var(--spacing-8);
        padding-right: var(--spacing-8);
    }
    
    /* Secciones con más padding */
    section {
        padding: var(--spacing-20) 0;
    }
    
    /* ============================================
       NAVEGACIÓN
       ============================================ */
    
    .hamburger {
        display: none;
    }
    
    .nav {
        display: flex;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    /* ============================================
       HERO
       ============================================ */
    
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }
    
    /* ============================================
       CRM SECTION
       ============================================ */
    
    .crm-section__content {
        grid-template-columns: 1fr 1fr;
    }
    
    .crm-section__visual {
        position: sticky;
        top: 100px;
    }
    
    /* ============================================
       PROCESO
       ============================================ */
    
    .process__timeline {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .process__timeline::before {
        display: block;
    }
    
    /* ============================================
       CTA SECTION
       ============================================ */
    
    .cta-section__content {
        grid-template-columns: 1fr 1fr;
    }
    
    /* ============================================
       FOOTER
       ============================================ */
    
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* ============================================================
   DESKTOP XL (1440px+)
   ============================================================ */

@media (min-width: 1440px) {
    /* Contenedor máximo */
    .container {
        max-width: 1400px;
    }
    
    /* Tipografía más grande */
    .hero__title {
        font-size: var(--font-size-6xl);
    }
    
    .section-header h2 {
        font-size: var(--font-size-4xl);
    }
    
    /* Más espaciado en hero */
    .hero {
        padding: var(--spacing-32) 0 var(--spacing-20);
    }
    
    /* Stats más grandes */
    .stat-item__number {
        font-size: var(--font-size-6xl);
    }
}

/* ============================================================
   SOPORTE PARA LANDSCAPE EN MÓVILES
   ============================================================ */

@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: var(--spacing-20);
        padding-bottom: var(--spacing-12);
    }
    
    .hero__stats {
        display: none;
    }
}

/* ============================================================
   SOPORTE PARA PANTALLAS DE ALTA DENSIDAD (RETINA)
   ============================================================ */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Asegurar imágenes nítidas */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ============================================================
   SOPORTE PARA IMPRESIÓN
   ============================================================ */

@media print {
    /* Ocultar elementos no necesarios */
    .header,
    .hamburger,
    .mobile-menu,
    .back-to-top,
    .hero__scroll,
    .hero__decoration,
    .modal {
        display: none !important;
    }
    
    /* Fondo blanco */
    body {
        background: white;
        color: black;
    }
    
    /* Eliminar sombras y efectos */
    * {
        box-shadow: none !important;
    }
    
    /* Links visibles */
    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* ============================================================
   FIN DEL ARCHIVO
   ============================================================ */
