/* Mobile Responsive CSS para MyPhoneBooth - Versión Mejorada */
/* Mantiene la apariencia original pero optimizada para móvil */

/* Responsive device styles for single device showcase */
.responsive-device {
    position: relative;
    z-index: 1;
}

.responsive-frame {
    width: 500px;
    height: 320px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.responsive-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

/* Responsive content visibility */
.mobile-content {
    display: none;
}

.desktop-content {
    display: block;
}

.mobile-only {
    display: none;
}

/* Base mobile styles - Preserva el diseño original */
@media screen and (max-width: 768px) {
    /* NO sobreescribir el container original - solo mejorar */
    body {
        overflow-x: hidden !important;
    }

    /* Header móvil - mantener el estilo original */
    .main-header {
        padding: 16px 0 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }

    .header-content {
        padding: 0 20px !important;
        position: relative !important;
    }

    /* Navegación móvil - ocultar nav-menu en móvil */
    .nav-menu {
        display: none !important;
    }

    /* Agregar botón móvil si no existe */
    .mobile-menu-toggle {
        display: block !important;
        background: none !important;
        border: none !important;
        font-size: 24px !important;
        color: #333 !important;
        cursor: pointer !important;
        padding: 8px !important;
    }

    /* Hero section - preservar el estilo pero ajustar padding */
    .hero {
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }

    .hero-content {
        flex-direction: column !important;
        gap: 40px !important;
        text-align: center !important;
    }

    .hero-text {
        order: 1 !important;
    }

    .mobile-mockup {
        order: 2 !important;
        padding-right: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* Mobile mockup - ajustar tamaño */
    .phone-mockup {
        width: 240px !important;
        height: 480px !important;
        transform: scale(0.9) !important;
    }

    /* Devices showcase - layout stack para móvil */
    .devices-container {
        flex-direction: column !important;
        gap: 30px !important;
        padding: 20px !important;
        align-items: center !important;
    }

    .desktop-device {
        order: 2 !important;
        position: relative !important;
    }

    .mobile-device {
        order: 1 !important;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
    }

    /* Desktop frame - ajustar para móvil */
    .desktop-frame {
        width: 100% !important;
        max-width: 320px !important;
        height: 240px !important;
        transform: scale(0.8) !important;
    }

    /* Mobile frame - optimizar */
    .mobile-frame {
        width: 260px !important;
        height: 480px !important;
    }

    /* Features grid - una columna en móvil */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        margin-top: 40px !important;
    }

    .feature-card {
        padding: 30px 20px !important;
        margin: 0 10px !important;
    }

    /* Industries y pricing - una columna */
    .industries-grid,
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Pricing cards - mejor spacing */
    .pricing-card {
        margin: 0 10px !important;
        padding: 30px 20px !important;
    }

    /* Footer - ajustar para móvil */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center !important;
    }

    /* Typography adjustments */
    .hero-text h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    .section-title {
        font-size: 28px !important;
        padding: 0 20px !important;
    }

    /* Button adjustments */
    .btn-primary {
        padding: 14px 28px !important;
        font-size: 16px !important;
        display: inline-block !important;
        width: auto !important;
    }

    /* Container adjustments - NO sobreescribir completamente */
    .container {
        padding: 0 20px !important;
        max-width: 100% !important;
    }

    /* Dashboard stats - ajustar para móvil */
    .dashboard-stats {
        flex-wrap: wrap !important;
        gap: 15px !important;
        justify-content: center !important;
    }

    .dashboard-main {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Chart adjustments */
    .stat-value {
        font-size: 16px !important;
    }

    .chart-title {
        font-size: 18px !important;
    }

    /* Chat conversation adjustments */
    .chat-conversation {
        padding: 12px !important;
    }

    .message-content {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    /* Input adjustments */
    .input-container {
        padding: 6px 12px !important;
    }

    .input-placeholder {
        font-size: 12px !important;
    }

    /* Better spacing for mobile */
    .features,
    .industries,
    .pricing {
        padding: 60px 0 !important;
    }
}

/* Extra small devices - iPhone SE y similares */
@media screen and (max-width: 375px) {
    .container {
        padding: 0 16px !important;
    }

    .hero-text h1 {
        font-size: 24px !important;
    }

    .phone-mockup {
        width: 200px !important;
        height: 400px !important;
        transform: scale(0.8) !important;
    }

    .mobile-frame {
        width: 220px !important;
        height: 400px !important;
    }

    .desktop-frame {
        max-width: 280px !important;
        height: 200px !important;
        transform: scale(0.7) !important;
    }

    .feature-card,
    .pricing-card {
        margin: 0 5px !important;
        padding: 25px 15px !important;
    }

    .section-title {
        font-size: 24px !important;
    }
}

/* Landscape en móvil - optimizar uso del espacio */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding-top: 100px !important;
        padding-bottom: 40px !important;
    }

    .hero-content {
        gap: 20px !important;
    }

    .phone-mockup {
        transform: scale(0.7) !important;
    }

    .mobile-frame {
        height: 320px !important;
    }

    .features,
    .industries,
    .pricing {
        padding: 40px 0 !important;
    }
}

/* Mejoras específicas para touch */
@media (hover: none) and (pointer: coarse) {
    /* Elementos táctiles más grandes */
    .btn-primary,
    .btn-login {
        min-height: 44px !important;
        padding: 14px 24px !important;
    }

    /* Links más fáciles de tocar */
    .nav-menu a,
    .footer-links a {
        padding: 8px 4px !important;
        display: inline-block !important;
    }

    /* Feature cards con mejor touch target */
    .feature-card,
    .pricing-card {
        margin-bottom: 20px !important;
    }

    /* Responsive device - mobile format */
    .responsive-frame {
        width: 240px !important;
        height: 440px !important;
        border-radius: 30px !important;
        padding: 8px !important;
    }

    .responsive-screen {
        border-radius: 22px !important;
    }

    /* Ocultar controles de ventana en móvil y mostrar elementos móviles */
    .window-controls {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-content {
        display: none !important;
    }

    .mobile-content {
        display: block !important;
        flex: 1 !important;
        padding: 10px !important;
        overflow-y: auto !important;
    }

    .device-header {
        background: #000 !important;
        color: white !important;
        text-align: center !important;
        padding: 10px !important;
        border-radius: 22px 22px 0 0 !important;
        flex-direction: column !important;
        gap: 5px !important;
    }

    .status-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        font-size: 12px !important;
        color: white !important;
    }

    .chat-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: #f8f9fa !important;
        color: black !important;
        padding: 10px !important;
        border-radius: 0 !important;
    }
}

/* Estados de hover para móvil - usar :active en lugar de :hover */
@media (hover: none) {
    .feature-card:hover,
    .pricing-card:hover,
    .industry-item:hover {
        transform: none !important;
    }

    .feature-card:active,
    .pricing-card:active,
    .industry-item:active {
        transform: translateY(-2px) !important;
        transition: transform 0.1s !important;
    }
}

/* Chat styles for mobile device showcase */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-info h3 {
    font-size: 16px;
    margin: 0;
}

    .chat-status {
        font-size: 12px;
        opacity: 0.8;
    }

    /* Messages área */
    .chat-messages {
        height: 400px;
        padding: 16px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .message {
        display: flex;
        align-items: flex-end;
        gap: 8px;
    }

    .message.sent {
        flex-direction: row-reverse;
    }

    .message-bubble {
        max-width: 75%;
        padding: 12px 16px;
        border-radius: 18px;
        font-size: 14px;
        line-height: 1.4;
    }

    .message.received .message-bubble {
        background: #f3f4f6;
        color: #1f2937;
        border-bottom-left-radius: 4px;
    }

    .message.sent .message-bubble {
        background: #023c40;
        color: white;
        border-bottom-right-radius: 4px;
    }

    .message-time {
        font-size: 11px;
        opacity: 0.6;
        margin-top: 4px;
    }

    /* Input área */
    .chat-input {
        padding: 16px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .input-field {
        flex: 1;
        padding: 12px 16px;
        border: 1px solid #d1d5db;
        border-radius: 24px;
        font-size: 14px;
        outline: none;
    }

    .send-button {
        width: 44px;
        height: 44px;
        background: #023c40;
        color: white;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    /* Features section móvil */
    .features {
        padding: 60px 0;
    }

    .features-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
    }

    .feature-card {
        background: white;
        padding: 24px;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        text-align: center;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        background: #f0fdf4;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px;
        font-size: 24px;
    }

    .feature-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #1f2937;
    }

    .feature-description {
        font-size: 14px;
        color: #6b7280;
        line-height: 1.5;
    }

    /* CTA Section móvil */
    .cta-section {
        background: linear-gradient(135deg, #023c40 0%, #059669 100%);
        color: white;
        padding: 60px 0;
        text-align: center;
    }

    .cta-title {
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .cta-description {
        font-size: 16px;
        margin-bottom: 32px;
        opacity: 0.9;
    }

    .cta-button {
        background: white;
        color: #023c40;
        padding: 16px 32px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
        display: inline-block;
        transition: transform 0.2s;
    }

    .cta-button:hover {
        transform: translateY(-2px);
    }

    /* Footer móvil */
    .footer {
        background: #1f2937;
        color: white;
        padding: 40px 0 20px;
        text-align: center;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .footer-section h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-links li {
        margin-bottom: 8px;
    }

    .footer-links a {
        color: #d1d5db;
        text-decoration: none;
        font-size: 14px;
    }

    .footer-bottom {
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid #374151;
        font-size: 12px;
        color: #9ca3af;
    }

    /* Modal fixes para móvil */
    .modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .modal-content {
        width: 90% !important;
        max-width: 400px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        background: white !important;
        border-radius: 16px !important;
        padding: 24px !important;
    }

    /* Utilities móvil */
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .mb-mobile {
        margin-bottom: 16px !important;
    }

    .p-mobile {
        padding: 16px !important;
    }
}

/* Extra small devices */
@media screen and (max-width: 375px) {
    .container {
        padding: 0 12px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .chat-interface {
        max-width: 320px;
        height: 550px;
    }

    .message-bubble {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Landscape orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding-top: 60px;
        padding-bottom: 40px;
    }

    .chat-interface {
        height: 400px;
    }

    .chat-messages {
        height: 250px;
    }
}
