/**
 * Mobile Optimizations - RMPowerTech (FINAL FIX)
 * - Sin hamburger menu en móvil
 * - Sin redes sociales en desktop
 */

/* ============================================
   DESKTOP (>= 992px) - OCULTAR REDES
   ============================================ */
@media (min-width: 992px) {

    .mobile-sticky-bar,
    .mobile-social-compact,
    .mobile-lang-compact,
    .social-icon-mini,
    .lang-flag {
        display: none !important;
    }
}

/* ============================================
   MOBILE (<= 768px)
   ============================================ */
@media (max-width: 768px) {

    /* ========== OCULTAR MENÚ HAMBURGUESA ========== */
    #mobileMenuBtn,
    .mobile-menu-btn,
    .mobile-menu-toggle,
    .hamburger-menu,
    .menu-toggle,
    .nav-toggle {
        display: none !important;
    }

    /* ========== OCULTAR BARRA SUPERIOR Y NAV DESKTOP ========== */
    .header-top-dark,
    .header .nav,
    #mainNav {
        display: none !important;
    }

    /* ========== MOSTRAR BOTONES FLOTANTES COMPACTOS ========== */
    .floating-container {
        bottom: 80px !important; /* Arriba de la barra de navegación móvil */
        right: 15px !important;
        gap: 10px !important;
    }

    .whatsapp-pill-text {
        display: none !important; /* Solo mostrar icono en pantallas móviles chicas */
    }

    .whatsapp-pill-btn {
        padding: 8px !important;
        border-radius: 50% !important;
    }

    /* ========== HEADER MÓVIL ========== */
    .header {
        position: relative !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .header-main-white {
        background: linear-gradient(135deg, #0a0e14 0%, #1a2332 100%) !important;
        padding: 1rem 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .header .container {
        padding: 0 1rem !important;
    }

    /* ========== GRID 3 COLUMNAS: Logo | Redes | Banderas ========== */
    .header .header-content {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        gap: 0.75rem;
        align-items: center;
    }

    /* Columna 1: Logo (izquierda) */
    .header .logo {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        grid-column: 1;
    }

    .header .logo img {
        max-height: 40px !important;
        width: auto;
        filter: brightness(1.1);
    }

    /* ========== MOSTRAR STICKY BAR (horizontal) ========== */
    .mobile-sticky-bar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0.75rem;
        grid-column: 2 / 4;
        justify-content: flex-end;
    }

    /* Redes Sociales (horizontal) */
    .mobile-social-compact {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .social-icon-mini {
        width: 32px;
        height: 32px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(14, 165, 233, 0.15);
        border-radius: 50%;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .social-icon-mini svg {
        width: 16px;
        height: 16px;
        color: #0ea5e9;
        transition: transform 0.3s ease;
    }

    .social-icon-mini:active {
        background: #0ea5e9;
        transform: scale(1.1);
    }

    .social-icon-mini:active svg {
        color: #fff;
    }

    /* Banderas (horizontal) */
    .mobile-lang-compact {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0.375rem;
        padding-left: 0.5rem;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
    }

    .lang-flag {
        width: 36px;
        height: 36px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 2px solid transparent;
        transition: all 0.3s ease;
        background: rgba(0, 0, 0, 0.2);
        -webkit-tap-highlight-color: transparent;
    }

    .lang-flag img {
        width: 24px !important;
        height: 18px !important;
        border-radius: 3px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        display: block !important;
    }

    .lang-flag.active {
        border-color: #0ea5e9;
        background: rgba(14, 165, 233, 0.2);
    }

    /* Sin padding superior */
    body {
        padding-top: 0 !important;
    }

    /* ========== ARREGLAR CÍRCULO DEL TELÉFONO ========== */
    .cta-icon-wrapper div {
        width: 80px !important;
        height: 80px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* ========== SECTIONS ========== */
    section,
    .section {
        padding: 3rem 0 !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* ========== HERO ========== */
    .hero-section,
    .section-hero {
        min-height: 60vh;
        padding: 2rem 0 !important;
    }

    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.2;
    }

    h2 {
        font-size: clamp(1.35rem, 6vw, 1.875rem) !important;
    }

    h3 {
        font-size: clamp(1.125rem, 5vw, 1.5rem) !important;
    }

    /* ========== CHECKOUT MODAL ========== */
    .checkout-modal .checkout-container {
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 20px;
    }

    .payment-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .payment-method {
        padding: 1rem;
    }

    /* ========== CARDS ========== */
    .pricing-card,
    .service-card,
    .plan-card {
        margin-bottom: 1.5rem;
    }

    /* ========== BUTTONS ========== */
    .btn,
    button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        border-radius: 12px;
    }

    /* ========== IMAGES ========== */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ============================================
   DISPOSITIVOS PEQUEÑOS (<= 480px)
   ============================================ */
@media (max-width: 480px) {

    .header-main-white {
        padding: 0.75rem 0 !important;
    }

    .header .logo img {
        max-height: 35px !important;
    }

    /* Reducir iconos */
    .social-icon-mini {
        width: 28px;
        height: 28px;
    }

    .social-icon-mini svg {
        width: 14px;
        height: 14px;
    }

    .lang-flag {
        width: 32px;
        height: 32px;
    }

    .lang-flag img {
        width: 20px !important;
        height: 15px !important;
    }

    .mobile-sticky-bar {
        gap: 0.5rem;
    }

    .mobile-social-compact {
        gap: 0.375rem;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* ============================================
   PANTALLAS MUY PEQUEÑAS (<= 360px)
   ============================================ */
@media (max-width: 360px) {

    /* Mostrar solo 3 redes sociales */
    .social-icon-mini:nth-child(4) {
        display: none !important;
    }

    .header .header-content {
        gap: 0.5rem;
    }

    .social-icon-mini {
        width: 26px;
        height: 26px;
    }

    .social-icon-mini svg {
        width: 13px;
        height: 13px;
    }
}