/* =========================================
   SHK — RESPONSIVE MÓVIL PREMIUM
   ========================================= */

html {
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-tap-highlight-color: transparent;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

main {
    position: relative;
    z-index: 1;
}

body.menu-open {
    overflow: hidden;
}

/* --- Header móvil --- */
@media (max-width: 768px) {
    header {
        top: max(12px, env(safe-area-inset-top, 12px));
        padding: 0 0.75rem;
    }

    .floating-nav {
        width: calc(100% - 1rem);
        max-width: none;
        padding: 0.65rem 1rem;
        border-radius: 20px;
    }

    .shk-logo {
        height: 26px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        transition: background 0.2s ease;
    }

    body.menu-open .mobile-menu-toggle {
        background: rgba(112, 0, 223, 0.25);
    }

    .mobile-nav {
        padding: max(5rem, calc(env(safe-area-inset-top, 0px) + 4rem)) 1.5rem max(2rem, env(safe-area-inset-bottom, 2rem));
    }

    .mobile-link {
        font-size: 1.35rem;
        padding: 0.85rem 0;
        min-height: 48px;
    }

    .mobile-cta-btn {
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
}

/* --- Secciones generales --- */
@media (max-width: 768px) {
    section {
        padding: 4.5rem 1.25rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
        padding: 0 0.25rem;
    }

    .section-tag {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .section-title {
        font-size: clamp(1.65rem, 7vw, 2.2rem);
        line-height: 1.2;
    }

    .section-desc {
        font-size: 0.95rem;
        line-height: 1.65;
    }
}

/* --- Hero --- */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 6.5rem 1.25rem 3rem;
    }

    .hero-container {
        gap: 2rem;
    }

    .hero-text-wrapper {
        max-width: 100%;
    }

    .badge-pill {
        font-size: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .filling-text {
        font-size: clamp(2.4rem, 11vw, 3.2rem) !important;
        line-height: 1.05;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 1.25rem auto 0;
        max-width: 100%;
        line-height: 1.65;
    }

    .hero-buttons {
        margin-top: 1.75rem;
        gap: 0.75rem;
    }

    .animated-logo-container {
        height: 220px;
        width: 100%;
    }

    .animated-shk-logo {
        width: 65%;
        max-width: 260px;
    }
}

@media (max-width: 380px) {
    .filling-text {
        font-size: 2.15rem !important;
    }
}

/* --- Servicios bento --- */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .grid-card {
        padding: 1.75rem 1.5rem;
    }

    .grid-card.featured {
        grid-column: auto;
    }

    .grid-card h3 {
        font-size: 1.25rem;
    }

    .grid-card p {
        font-size: 0.9rem;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 1rem;
    }
}

/* --- Proceso: scroll horizontal snap --- */
@media (max-width: 768px) {
    .process-steps {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 0.5rem 0.25rem 1.25rem;
        margin: 0 -0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .process-steps::-webkit-scrollbar {
        display: none;
    }

    .process-step {
        flex: 0 0 82%;
        scroll-snap-align: center;
        min-width: 82%;
        padding: 1.75rem 1.25rem;
    }

    .process-step::after {
        display: none !important;
    }

    .process-steps::after {
        content: '';
        flex: 0 0 0.5rem;
    }
}

/* --- Galería: scroll horizontal snap --- */
@media (max-width: 768px) {
    .gallery-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        grid-auto-rows: unset;
        padding: 0.25rem 0.25rem 1.25rem;
        margin: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gallery-grid::-webkit-scrollbar {
        display: none;
    }

    .gallery-item,
    .gallery-item.large {
        flex: 0 0 88%;
        scroll-snap-align: center;
        min-width: 88%;
        height: auto;
        grid-column: unset;
        grid-row: unset;
    }

    .gallery-item-media {
        aspect-ratio: 16 / 11;
    }

    .gallery-item-caption h3 {
        -webkit-line-clamp: 3;
    }

    .gallery-caption-text {
        -webkit-line-clamp: 4;
        font-size: 0.82rem;
    }

    .gallery-grid::after {
        content: '';
        flex: 0 0 0.5rem;
    }

    .gallery-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.75rem;
        font-family: var(--font-mono);
        font-size: 0.7rem;
        color: var(--text-muted);
        letter-spacing: 1px;
    }
}

.gallery-scroll-hint {
    display: none;
}

/* --- Demo IA --- */
@media (max-width: 768px) {
    .ai-demo-grid {
        gap: 2rem;
    }

    .ai-demo-info {
        text-align: center;
    }

    .ai-demo-info h3 {
        font-size: 1.4rem;
    }

    .ai-demo-features {
        text-align: left;
    }

    .ai-chat-panel {
        height: auto;
        min-height: 440px;
        border-radius: 16px;
    }

    .ai-chat-messages {
        min-height: 220px;
        max-height: 280px;
    }

    .ai-quick-btn {
        min-height: 40px;
        font-size: 0.8rem;
        padding: 0.5rem 0.9rem;
    }
}

/* --- Formulario contacto --- */
@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        padding: 2rem 1.25rem;
        gap: 2rem;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: span 1;
    }

    .contact-intro {
        text-align: center;
    }

    .contact-quick {
        align-items: center;
    }

    .contact-whatsapp-link {
        justify-content: center;
        width: 100%;
        max-width: 220px;
    }

    .contact-required-legend {
        text-align: center;
    }
}

/* --- Impresión 3D --- */
@media (max-width: 768px) {
    .print3d-inner {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .print3d-visual {
        min-height: 260px;
        order: -1;
    }

    .print3d-float {
        display: none;
    }

    .print3d-title {
        text-align: center;
    }

    .print3d-desc {
        text-align: center;
    }

    .print3d-section .btn-primary {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* --- Home teaser portafolio --- */
@media (max-width: 768px) {
    .home-teaser-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-teaser-card {
        padding: 1.35rem 1.25rem;
    }
}

/* --- Nosotros --- */
@media (max-width: 768px) {
    .about-story-grid,
    .about-approach {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-values-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .about-stats-inline {
        justify-content: center;
    }

    .about-grid {
        gap: 2.5rem;
    }

    .about-text {
        text-align: center;
    }

    .about-text h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .stats-row {
        flex-wrap: wrap;
        gap: 1.5rem 2rem;
        justify-content: center;
        padding-top: 2rem;
        margin-top: 2rem;
    }

    .stat-item h4 {
        font-size: 2rem;
    }

    .glass-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .about-values-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Testimonios --- */
@media (max-width: 768px) {
    .testimonials-track {
        min-height: 320px;
        touch-action: pan-y;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-quote {
        font-size: 0.92rem;
        margin-bottom: 1.5rem;
    }

    .testimonial-nav {
        width: 48px;
        height: 48px;
    }

    .clients-logos {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        margin-bottom: 2rem;
    }

    .client-logo-item {
        text-align: center;
        font-size: 0.7rem;
        padding: 0.55rem 0.5rem;
    }
}

/* --- FAQ --- */
@media (max-width: 768px) {
    .faq-question {
        padding: 1.15rem 1rem;
        font-size: 0.95rem;
        min-height: 56px;
    }

    .faq-item.active .faq-answer {
        max-height: 600px;
    }

    .faq-answer p {
        font-size: 0.9rem;
    }
}

/* --- Contacto --- */
@media (max-width: 768px) {
    .contact-section {
        padding-bottom: 5rem;
    }

    .cta-container {
        padding: 2.5rem 1.25rem;
        border-radius: 16px;
    }

    .cta-container h2 {
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .cta-container p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

/* --- Footer --- */
@media (max-width: 768px) {
    footer {
        padding: 3.5rem 1.25rem 2rem;
        margin-top: 3rem;
    }

    .footer-top {
        gap: 2rem;
    }

    .footer-column h4 {
        margin-bottom: 1rem;
    }
}

/* --- WhatsApp flotante --- */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: max(18px, env(safe-area-inset-bottom, 18px));
        right: max(16px, env(safe-area-inset-right, 16px));
    }

    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* --- Preloader móvil --- */
@media (max-width: 768px) {
    .preloader-logo {
        width: 80px;
    }

    .preloader-text-logo {
        height: 24px;
    }

    .preloader-bar {
        width: 150px;
    }
}

/* --- Lightbox móvil --- */
@media (max-width: 768px) {
    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox img {
        max-width: 100%;
        max-height: 70vh;
    }

    .gallery-lightbox-close {
        top: max(1rem, env(safe-area-inset-top, 1rem));
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .gallery-lightbox-caption {
        bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
        font-size: 0.85rem;
        padding: 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* --- Reducir partículas en móvil --- */
@media (max-width: 768px) {
    #cyber-particles {
        opacity: 0.25;
    }

    .cyber-grid-bg {
        background-size: 32px 32px;
    }

    .glow-bg-top,
    .glow-bg-bottom {
        opacity: 0.08;
    }
}

/* --- Tablet intermedio --- */
@media (min-width: 769px) and (max-width: 1024px) {
    section {
        padding: 6rem 3%;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-step:nth-child(2)::after {
        display: none;
    }
}
