/* ========================================
   RESPONSIVE STYLES
======================================== */

/* Public mobile safety net
   These rules protect old/static public pages from horizontal overflow. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

iframe {
    border: 0;
}

.container,
.nav-container,
.article-main,
.article-body,
.blog-article,
.section-wrap {
    max-width: 100%;
}

.article-body table,
.compare-table,
.comparison-table table,
table.comparison-table {
    width: 100%;
    max-width: 100%;
}

.comparison-table,
.comparison-table-wrap,
.table-responsive,
.article-body:has(> table),
.compare-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.article-body table,
.compare-table {
    display: table;
    border-collapse: collapse;
}

.article-body p,
.article-body li,
.hub-card,
.public-seo-hub__card {
    overflow-wrap: anywhere;
}

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

.public-seo-hub {
    padding: 48px 0;
    background: #0f0d0b;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.public-seo-hub__title {
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    text-align: center;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin: 0 0 8px;
}

.public-seo-hub__intro {
    text-align: center;
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 28px;
}

.public-seo-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 12px;
    max-width: 960px;
    margin: 0 auto;
}

.public-seo-hub__card {
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,160,23,0.25);
    border-radius: 12px;
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
}

.public-seo-hub__badge {
    color: #d4a017;
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

/* Tablet Landscape */
@media (max-width: 1200px) {
    .hero-container {
        gap: 40px;
    }

    .hero-title {
        font-size: 48px;
    }
}

/* Tablet & Small Desktop - compact navbar → hamburguesa desde 1200px */
@media (max-width: 1200px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 88vw);
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--dark);
        flex-direction: column;
        align-items: flex-start;
        padding: 88px 24px 32px;
        gap: 4px;
        z-index: 998;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        border-left: 1px solid rgba(212, 160, 23, 0.2);
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 999;
    }

    .nav-buttons {
        display: none;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* ... rest of styles ... */
    .hero-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-subtitle {
        margin: 0 auto 36px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }

    .hero-visual {
        display: block !important;
        overflow: hidden;
        max-width: 100%;
        width: 100%;
        height: 168px;
        min-height: 168px;
        margin: 28px auto 0;
        padding: 0;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
        mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    }

    .hero-visual-track {
        display: flex;
        gap: 12px;
        width: max-content;
        animation: hero-visual-marquee 26s linear infinite;
        will-change: transform;
    }

    .hero-visual-track:hover {
        animation-play-state: paused;
    }

    .hero-visual-slide {
        flex: 0 0 152px;
        width: 152px;
        height: 152px;
        overflow: hidden;
        border-radius: 14px;
        border: 1px solid rgba(212, 160, 23, 0.18);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    }

    .hero-visual-slide--dup {
        display: block;
    }

    .hero-visual-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .hero-stats {
        justify-content: center;
    }

    /* hero-visual carousel: reglas en bloque hero-trust arriba */

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

    .steps-container-new {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 450px;
    }

    .step-arrow {
        transform: rotate(90deg);
        padding: 8px 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .pricing-domain {
        flex-direction: column;
        gap: 16px;
    }

    .domain-option {
        width: 100%;
    }

    .includes-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .navbar .nav-container > .nav-link {
        display: none;
    }

    .navbar .nav-container:not(:has(.nav-toggle)) {
        gap: 12px;
    }

    .navbar .nav-container:not(:has(.nav-toggle)) .nav-buttons {
        display: flex;
        margin-left: auto;
    }

    .navbar .nav-container:not(:has(.nav-toggle)) .nav-buttons .btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: normal;
    }

    .article-wrapper,
    .blog-featured,
    .hero-container,
    .hero-collage,
    .pricing-domain,
    .footer-grid,
    .feat-grid,
    .steps-3,
    .hub-grid,
    .card-grid,
    .results-grid,
    .guarantee-grid {
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    .container {
        padding: 0 16px;
    }

    .navbar {
        padding: 16px 0;
    }

    .navbar.scrolled {
        padding: 10px 0;
    }

    .nav-container {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo-accent {
        display: none;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .hero {
        min-height: 0;
        padding: 120px 0 60px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 8px 16px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .btn,
    .btn-primary,
    .btn-outline,
    .btn-whatsapp,
    .btn-sm,
    .btn-lg,
    .btn-xl {
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }

    a.btn[style*="margin-left"],
    button.btn[style*="margin-left"] {
        margin-left: 0 !important;
    }

    .hero-cta,
    .cta-box > div,
    .cta-box p[style*="display:flex"],
    .section-wrap p[style*="margin-top"],
    .nav-buttons,
    .sticky-cta-buttons {
        flex-wrap: wrap;
    }

    .cta-box .btn,
    .section-wrap .btn,
    .blog-article .btn,
    .article-body .btn,
    .comparison-section .btn,
    .pricing-section .btn {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero-cta .btn,
    .cta-buttons .btn,
    .cta-buttons-row .btn {
        width: 100%;
        max-width: 420px;
        justify-content: center;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .hero-collage {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .hero-collage .collage-cell {
        aspect-ratio: 1 / 1;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-scroll {
        display: none;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
    }

    .step-card-new {
        padding: 24px 20px;
    }

    .step-icon-new {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .step-card-new h3 {
        font-size: 18px;
    }

    .pricing-card-single {
        padding: 24px 16px;
    }

    .pricing-header h3 {
        font-size: 22px;
    }

    .price-tag {
        font-size: 40px;
    }

    .price-tag .currency {
        font-size: 22px;
    }

    /* Plans responsive - fix scale overflow */
    .plans-container {
        grid-template-columns: 1fr !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }

    .plan-card.featured {
        transform: scale(1) !important;
    }

    /* Demos grid responsive */
    .demos-grid {
        grid-template-columns: 1fr !important;
    }

    .faq-question {
        padding: 20px 16px;
    }

    .faq-question span {
        font-size: 15px;
    }

    .faq-answer p {
        padding: 0 16px 20px;
        font-size: 14px;
    }

    .faq-answer {
        max-height: none !important;
    }

    .cta-section {
        padding: 60px 0;
    }

    .cta-content h2 {
        font-size: 24px;
    }

    .cta-content p {
        font-size: 16px;
    }

    .btn-whatsapp {
        padding: 16px 32px;
        font-size: 16px;
    }

    /* CTA buttons stack on mobile */
    .cta-buttons-row {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons-row .btn {
        width: 100%;
    }

    .btn-xl {
        padding: 16px 32px;
        font-size: 16px;
    }

    .cta-trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links ul {
        margin-bottom: 24px;
    }

    .footer-links a {
        justify-content: flex-start;
    }

    .whatsapp-btn {
        width: 52px;
        height: 52px;
        font-size: 24px;
        bottom: 16px;
        right: 16px;
        z-index: 9990;
    }

    .public-seo-hub {
        padding: 36px 0;
    }

    .public-seo-hub__grid {
        grid-template-columns: 1fr 1fr;
    }

    .public-seo-hub__card {
        width: 100%;
    }

    .comparison-table,
    .comparison-table-wrap,
    .compare-table-wrap,
    .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: 0;
        margin-right: 0;
        padding-bottom: 8px;
    }

    .comparison-table table,
    .comparison-table-wrap table,
    .compare-table-wrap table,
    .table-responsive table,
    .article-body .comparison-table table {
        display: table;
        width: max-content;
        min-width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

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

    .stat-number {
        font-size: 28px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .price-tag {
        font-size: 36px;
    }

    .include-item {
        padding: 10px 12px;
    }

    .include-item span {
        font-size: 13px;
    }

    .bonus-badge {
        font-size: 13px;
        padding: 12px 16px;
    }

    .container,
    .nav-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nav-logo-wordmark,
    .logo-text {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar .nav-container:not(:has(.nav-toggle)) .nav-buttons .btn {
        max-width: 150px;
        padding: 9px 10px;
    }
}

/* Comparison table responsive */
@media (max-width: 768px) {
    .comparison-table-wrap {
        overflow-x: auto;
    }

    table.comparison-table,
    .comparison-table > table,
    .compare-table {
        min-width: 560px;
    }

    .comparison-table th,
    .comparison-table td,
    .compare-table th,
    .compare-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Results section responsive */
@media (max-width: 992px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }

    .result-card {
        padding: 30px 20px;
    }

    .result-number {
        font-size: 36px;
    }

    .result-suffix {
        font-size: 24px;
    }
}

/* Guarantee section responsive */
@media (max-width: 992px) {
    .guarantee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .guarantee-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }
}

/* Sticky CTA responsive */
@media (max-width: 768px) {
    .sticky-cta-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 0 16px;
    }

    .sticky-cta-text strong {
        font-size: 14px;
    }

    .sticky-cta-text span {
        font-size: 12px;
    }

    .sticky-cta-buttons {
        width: 100%;
    }

    .sticky-cta-buttons .btn-sm,
    .sticky-cta-buttons .btn-whatsapp {
        flex: 1;
        padding: 10px 14px;
        font-size: 13px;
        justify-content: center;
    }
}

/* Social proof responsive */
@media (max-width: 480px) {
    .social-proof-popup {
        left: 12px;
        right: 12px;
        max-width: none;
        bottom: 80px;
    }
}

/* Whatsapp btn adjust for sticky bar */
.sticky-cta-bar.visible ~ .whatsapp-btn {
    bottom: 80px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chatbot adjust for sticky bar */
.sticky-cta-bar.visible ~ .dp-chatbot-widget {
    bottom: 80px !important;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .sticky-cta-bar.visible ~ .whatsapp-btn {
        bottom: 110px;
    }

    .sticky-cta-bar.visible ~ .dp-chatbot-widget {
        bottom: 110px !important;
    }

    .sticky-cta-bar.visible ~ .social-proof-popup {
        bottom: 130px;
    }
}

/* Animation for mobile menu */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* High contrast mode */
@media (prefers-contrast: high) {

    .feature-card,
    .step-card-new,
    .pricing-card-single,
    .testimonial-card,
    .faq-item {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    @media (max-width: 1200px) {
        .hero-visual-track {
            animation: none !important;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            padding: 0 16px;
            width: 100%;
            justify-content: flex-start;
        }

        .hero-visual-slide {
            scroll-snap-align: center;
        }
    }
}

@keyframes hero-visual-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}