/* ========================================
   STARCONEXIÓN - CSS RESPONSIVO
   Adaptación para Tablets y Móviles
   ======================================== */

/* ========== TABLETS (768px) ========== */
@media (max-width: 768px) {
    
    /* Variables ajustadas */
    :root {
        --font-size-3xl: 2rem;
        --font-size-2xl: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }
    
    /* Navegación */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 20, 25, 0.98);
        padding: var(--spacing-lg);
        gap: 0;
        backdrop-filter: blur(10px);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
        padding-top: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Sobre Nosotros */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    /* Servicios */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: var(--spacing-md);
    }
    
    /* Industrias */
    .industries-grid {
        grid-template-columns: 1fr;
    }
    
    /* Trust */
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trust-number {
        font-size: 2rem;
    }
    
    /* Contacto */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-form,
    .contact-info {
        padding: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== MÓVILES PEQUEÑOS (480px) ========== */
@media (max-width: 480px) {
    
    :root {
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 1.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navegación */
    .navbar {
        padding: var(--spacing-sm) 0;
    }
    
    .navbar-brand h1 {
        font-size: 1.25rem;
    }
    
    .navbar .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Hero */
    .hero {
        min-height: 80vh;
    }
    
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        margin-bottom: var(--spacing-lg);
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
        padding-top: var(--spacing-lg);
    }
    
    .stat {
        padding-bottom: var(--spacing-md);
        border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    }
    
    .stat:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Secciones */
    .about,
    .services,
    .industries,
    .trust-section,
    .contact-section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Sobre Nosotros */
    .about-text h2 {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .feature i {
        font-size: 2rem;
    }
    
    /* Servicios */
    .service-card {
        padding: var(--spacing-md);
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
    }
    
    .service-benefits li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    /* Industrias */
    .industry-icon {
        font-size: 2.5rem;
    }
    
    .industry-card h3 {
        font-size: 1.1rem;
    }
    
    /* Trust */
    .trust-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .trust-card {
        padding: var(--spacing-md);
    }
    
    .trust-number {
        font-size: 1.75rem;
    }
    
    .trust-content {
        padding: var(--spacing-md);
    }
    
    .trust-content h3 {
        font-size: 1.5rem;
    }
    
    .trust-content p {
        font-size: 0.95rem;
    }
    
    /* CTA Final */
    .cta-final {
        padding: var(--spacing-lg) 0;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Contacto */
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .form-group {
        margin-bottom: var(--spacing-sm);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .contact-info {
        padding: var(--spacing-md);
    }
    
    .contact-info h3 {
        font-size: 1.25rem;
    }
    
    .info-item {
        gap: var(--spacing-sm);
    }
    
    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .social-links {
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-section h4 {
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-section p {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
        padding-top: var(--spacing-md);
    }
}

/* ========== MÓVILES MUY PEQUEÑOS (320px) ========== */
@media (max-width: 320px) {
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .hero-stats {
        gap: var(--spacing-sm);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat p {
        font-size: 0.8rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
}

/* ========== LANDSCAPE (HORIZONTAL) ========== */
@media (max-height: 600px) and (orientation: landscape) {
    
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-content {
        padding: var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-buttons {
        margin-bottom: var(--spacing-md);
    }
    
    .hero-stats {
        gap: var(--spacing-md);
        padding-top: var(--spacing-md);
    }
}

/* ========== IMPRESIÓN ========== */
@media print {
    
    .navbar,
    .hamburger,
    .contact-section,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
    }
    
    .btn {
        border: 1px solid black;
        color: black;
        background: white;
    }
}

/* ========== ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== PREFERENCIA OSCURA (DARK MODE - Futuro) ========== */
@media (prefers-color-scheme: dark) {
    
    body {
        background: #0F1419;
        color: #E0E0E0;
    }
    
    .about,
    .industries,
    .contact-section {
        background: #1a2b4f;
    }
    
    .service-card {
        background: #1a2b4f;
        color: #E0E0E0;
    }
    
    .contact-form {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    .section-header h2 {
        color: #E0E0E0;
    }
    
    .section-header p {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* ========== OPTIMIZACIONES ADICIONALES ========== */

/* Mejorar rendimiento */
.hero-background {
    will-change: contents;
}

/* Touch targets (mínimo 44x44px) */
.btn,
.social-icon,
.nav-menu a {
    min-height: 44px;
    min-width: 44px;
}

/* Scroll suave solo si es soportado */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* Sombras más suaves en móvil */
@media (max-width: 768px) {
    
    .btn:active {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .service-card:active {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Evitar zoom en inputs en iOS */
@supports (display: grid) {
    input,
    select,
    textarea {
        font-size: 16px;
    }
}
