/* ============================================================
   WIZFIBRA - responsive.css
   Overrides móviles (max-width: 767px) extraídos de mobile.css
   Se carga DESPUÉS de styles.css, tarifas.css, contratacion.css
   ============================================================ */

/* ——— Utilidades responsive ——— */
.mobile-only  { display: none !important; }
.desktop-only { display: initial; }
.mobile-br    { display: none; }

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

    /* ——— Utilidades responsive ——— */
    .mobile-only  { display: initial !important; }
    .desktop-only { display: none !important; }
    .mobile-br    { display: block; }

    /* ——— Base ——— */
    html {
        font-size: 15px;
        overflow-x: hidden;
    }

    body {
        width: 100%;
        max-width: 100vw;
    }

    /* Ocultar blobs en móvil (rendimiento) */
    .blob { display: none; }

    /* Reducir duración AOS */
    [data-aos] {
        transition-duration: 500ms !important;
    }

    /* ============================================================
       NAVEGACIÓN MÓVIL
       ============================================================ */
    #navbar {
        padding: 0.75rem 1rem;
        max-width: 100vw;
        left: 0;
    }

    #navbar.scrolled {
        padding: 0.5rem 1rem;
    }

    #navbar.scrolled .nav-inner {
        background: rgba(255, 255, 255, 0.98);
    }

    .nav-inner {
        background: rgba(255, 255, 255, 0.95);
        border-radius: var(--radius-2xl);
        padding: 0.75rem 1.1rem;
    }

    .logo {
        font-size: 1.35rem;
        letter-spacing: -0.04em;
    }

    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-toggle:hover {
        background: none;
    }

    .nav-toggle:active {
        background: var(--color-slate-100);
    }

    .nav-links a {
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
        border-radius: var(--radius-md);
    }

    .nav-links a:hover {
        color: inherit;
    }

    .nav-links a:active {
        background: var(--color-slate-100);
    }

    .nav-links .btn-cta {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
        font-weight: 700;
        min-height: 48px;
        margin-top: 0.25rem;
    }

    .nav-links .btn-cta:hover {
        transform: none;
    }

    /* ============================================================
       HERO MÓVIL
       ============================================================ */
    .hero-section {
        padding-top: 6rem;
        padding-bottom: 3rem;
        min-height: auto;
        display: block;
        background: linear-gradient(160deg, #f0f6ff 0%, var(--color-slate-50) 100%);
        overflow: hidden;
        max-width: 100%;
    }

    .hero-content {
        max-width: 100%;
        width: 100%;
        padding: 0 1.1rem;
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        box-sizing: border-box;
    }

    .hero-badge {
        font-size: 0.68rem;
        padding: 0.35rem 0.9rem;
        margin-bottom: 1.1rem;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.15;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.75rem;
        line-height: 1.7;
        max-width: none;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .hero-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 52px;
        text-align: center;
        width: 100%;
    }

    .hero-btn.primary {
        box-shadow: 0 10px 25px -5px rgb(37 99 235 / 0.4);
    }

    .hero-btn.primary:hover {
        transform: none;
        box-shadow: 0 10px 25px -5px rgb(37 99 235 / 0.4);
    }

    .hero-btn.primary:active {
        background: var(--color-blue-700);
    }

    .hero-btn.secondary:hover {
        transform: none;
        background: transparent;
    }

    .hero-btn.secondary:active {
        background: rgba(37, 99, 235, 0.06);
    }

    .hero-badges {
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    .hero-badges span {
        font-size: 0.75rem;
        color: var(--color-slate-500);
    }

    /* Imagen hero */
    .hero-image-wrapper {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .hero-image-bg {
        inset: -0.75rem;
        border-radius: var(--radius-2xl);
    }

    .hero-image {
        border-radius: var(--radius-2xl);
        width: 100%;
    }

    .hero-image:hover {
        transform: none;
    }

    /* ============================================================
       ESTADÍSTICAS MÓVIL
       ============================================================ */
    .stats-section {
        padding: 1.5rem 1rem;
    }

    .stats-container {
        max-width: 100%;
        border-radius: var(--radius-xl);
        padding: 1.25rem 1rem;
        gap: 1.25rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .stat-divider {
        display: none;
    }

    /* ============================================================
       TARIFAS MÓVIL
       ============================================================ */
    #tarifas {
        padding: 4rem 0 3rem;
    }

    .tarifas-container {
        padding: 0 1rem;
    }

    .tarifas-header {
        margin-bottom: 1.75rem;
    }

    .tarifas-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .tarifas-subtitle {
        font-size: 0.9rem;
    }

    /* Tabs */
    .tarifas-tabs {
        gap: 0.4rem;
        margin-bottom: 2rem;
        padding: 0.35rem;
    }

    .tab-btn {
        padding: 0.55rem 1.25rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .tab-btn:hover {
        color: var(--color-slate-400);
    }

    .tab-btn.active:hover {
        color: var(--color-white);
    }

    /* Sub-tabs velocidad fibra */
    .fibra-speed-tabs {
        gap: 0.4rem;
        margin-bottom: 2rem;
        padding: 0.35rem;
    }

    .speed-tab-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.82rem;
    }

    /* Grid tarjetas: 1 columna */
    .tarifas-grid {
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
        margin-bottom: 2.5rem;
    }

    /* Tarjeta */
    .tarifa-card {
        border-radius: var(--radius-xl);
        padding: 1.5rem;
    }

    .tarifa-card:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(71, 85, 105, 0.4);
    }

    .tarifa-card.featured:hover {
        transform: none;
        border-color: transparent;
        box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
    }

    .tarifa-badge {
        top: -0.65rem;
        font-size: 0.6rem;
        padding: 0.25rem 0.9rem;
    }

    .tarifa-tipo-badge {
        font-size: 0.65rem;
        margin-bottom: 0.75rem;
    }

    .tarifa-name {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .tarifa-desc {
        font-size: 0.82rem;
        margin-bottom: 1.1rem;
    }

    .price-amount {
        font-size: 2.25rem;
    }

    .price-period {
        font-size: 0.9rem;
    }

    .price-fixed-note {
        font-size: 0.72rem;
    }

    .price-iva {
        font-size: 0.6rem;
        margin-bottom: 1.1rem;
    }

    .tarifa-features li {
        font-size: 0.85rem;
        padding: 0.35rem 0;
    }

    .tarifa-features i {
        font-size: 0.78rem;
    }

    .tarifa-features {
        margin-bottom: 1.5rem;
    }

    .tarifa-btn {
        padding: 0.95rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .tarifa-btn:hover {
        transform: none;
        box-shadow: none;
        background: var(--color-slate-700);
    }

    .tarifa-card.featured .tarifa-btn:hover {
        background: var(--color-white);
        transform: none;
    }

    /* Loading / error */
    .tarifas-loading,
    .tarifas-error {
        padding: 2rem;
        font-size: 0.9rem;
    }

    /* Tabla de precios: ocultar en móvil */
    .pricing-table-section {
        display: none;
    }

    /* Tabla de precios */
    .pricing-table-section {
        border-radius: var(--radius-2xl);
        padding: 1.5rem 1rem;
    }

    .pricing-table-title {
        font-size: 1.05rem;
    }

    .pricing-table-wrapper {
        border-radius: var(--radius-lg);
    }

    .pricing-table {
        min-width: 480px;
    }

    .pricing-table thead th {
        font-size: 0.65rem;
        padding: 0.75rem 1rem;
    }

    .pricing-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
    }

    .pricing-note {
        font-size: 0.7rem;
    }

    /* ============================================================
       POR QUÉ WIZFIBRA MÓVIL
       ============================================================ */
    .porque-section {
        padding: 4rem 0;
    }

    .porque-container {
        padding: 0 1rem;
    }

    .porque-header {
        margin-bottom: 2rem;
    }

    .porque-title {
        font-size: 1.65rem;
        margin-top: 0.5rem;
    }

    .porque-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.85rem;
    }

    .porque-card {
        padding: 1.25rem;
        border-radius: var(--radius-xl);
    }

    .porque-card:hover {
        transform: none;
        border-color: rgba(71, 85, 105, 0.4);
    }

    .porque-icon {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 0.85rem;
        font-size: 0.95rem;
    }

    .porque-card h3 {
        font-size: 0.88rem;
        margin-bottom: 0.45rem;
    }

    .porque-card p {
        font-size: 0.78rem;
        line-height: 1.6;
    }

    /* ============================================================
       PROCESO DE ENTREGA MÓVIL
       ============================================================ */
    .proceso-section {
        padding: 4rem 0 3rem;
    }

    .proceso-container {
        padding: 0 1.1rem;
    }

    .proceso-header {
        margin-bottom: 2.25rem;
    }

    .proceso-title {
        font-size: 1.8rem;
    }

    .proceso-subtitle {
        font-size: 0.95rem;
    }

    .proceso-card-header {
        padding: 1.35rem 1.25rem;
        gap: 0.75rem;
    }

    .proceso-card-icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.15rem;
    }

    .proceso-card-header h3 {
        font-size: 1.05rem;
    }

    .proceso-steps {
        padding: 1.35rem 1.25rem;
        gap: 1rem;
    }

    .proceso-scenarios {
        padding-left: 0;
    }

    .proceso-note {
        padding: 1rem 1.15rem;
        gap: 0.65rem;
    }

    .proceso-note p {
        font-size: 0.855rem;
    }

    /* ============================================================
       CONTRATACIÓN — WIZARD MÓVIL
       ============================================================ */
    .contratacion-section {
        padding: 4rem 0 3rem;
    }

    .contratacion-container {
        padding: 0 0.85rem;
    }

    .contratacion-header {
        margin-bottom: 2rem;
    }

    .contratacion-title {
        font-size: 1.65rem;
        margin-bottom: 0.5rem;
    }

    .contratacion-subtitle {
        font-size: 0.9rem;
    }

    /* Wizard */
    .wizard {
        border-radius: var(--radius-2xl);
        padding: 1.5rem 1rem;
        box-shadow: var(--shadow-xl);
    }

    /* Stepper compacto */
    .wizard-stepper {
        margin-bottom: 2rem;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
        width: 100%;
    }

    .wizard-stepper::-webkit-scrollbar {
        display: none;
    }

    .wizard-stepper .step {
        flex-shrink: 0;
    }

    .step-circle {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 0.75rem;
    }

    .step.completed .step-circle::before {
        font-size: 0.65rem;
    }

    .step-label {
        font-size: 0.55rem;
        letter-spacing: 0.04em;
    }

    .step-line {
        min-width: 1.25rem;
        max-width: 2.5rem;
        margin-bottom: 0.95rem;
    }

    /* Contenido pasos */
    .step-title {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }

    .step-note {
        font-size: 0.82rem;
        padding: 0.65rem 0.85rem;
        margin-bottom: 1.25rem;
    }

    /* Paso 1 — tabs tipo */
    .step1-tabs {
        margin-bottom: 1.25rem;
        width: 100%;
    }

    .step1-tab {
        flex: 1;
        padding: 0.6rem 0.5rem;
        font-size: 0.82rem;
        min-height: 44px;
    }

    /* Sub-tabs velocidad fibra (wizard) */
    .step1-speed-tabs {
        margin-bottom: 1.25rem;
        width: 100%;
    }

    .step1-speed-btn {
        flex: 1;
        padding: 0.55rem 0.4rem;
        font-size: 0.82rem;
        text-align: center;
        min-height: 44px;
    }

    .step1-tarifas-grid {
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
        margin-bottom: 1.5rem;
    }

    .step1-tarifa-card {
        padding: 1rem;
    }

    .step1-tarifa-card:hover {
        border-color: var(--color-slate-200);
        box-shadow: none;
    }

    .step1-tarifa-card:active {
        background: var(--color-slate-50);
    }

    .step1-tarifa-card.selected:hover {
        border-color: var(--color-blue-600);
    }

    .step1-badge {
        top: -0.55rem;
        right: 0.65rem;
        font-size: 0.57rem;
        padding: 0.18rem 0.55rem;
    }

    .step1-name {
        font-size: 0.95rem;
    }

    .step1-price {
        font-size: 1.35rem;
        line-height: 1;
    }

    .step1-price span {
        font-size: 0.8rem;
    }

    .step1-desc {
        font-size: 0.73rem;
    }

    .step1-loading {
        padding: 1.5rem;
    }

    /* Formularios */
    .form-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.9rem 1rem;
        font-size: 1rem; /* evita zoom en iOS */
        min-height: 48px;
    }

    /* Provincia full-width en móvil */
    #provincia {
        width: 100%;
    }

    /* DNI upload mobile */
    .dni-upload-zone {
        min-height: 8rem;
    }

    .dni-upload-placeholder {
        padding: 1rem;
        font-size: 0.82rem;
    }

    .dni-upload-placeholder i {
        font-size: 1.75rem;
    }

    /* Pago tabs */
    .pago-tabs {
        flex-direction: column;
        gap: 0.6rem;
    }

    .pago-tab {
        width: 100%;
        min-height: 52px;
    }

    /* Botones acción */
    .step-actions {
        justify-content: space-between;
        gap: 0.65rem;
        padding-top: 1.25rem;
    }

    .btn-next,
    .btn-back,
    .btn-submit {
        padding: 0.9rem 1.25rem;
        flex: 1;
        min-height: 52px;
    }

    .btn-next:hover,
    .btn-submit:hover {
        transform: none;
    }

    .btn-next:active,
    .btn-submit:active {
        background: var(--color-blue-700);
    }

    .btn-back {
        flex: 0 0 auto;
        padding: 0.9rem;
        min-width: 52px;
    }

    .btn-back:hover {
        background: var(--color-slate-100);
    }

    .btn-back:active {
        background: var(--color-slate-200);
    }

    /* Resumen */
    .resumen-content {
        margin-bottom: 1.5rem;
    }

    .resumen-tarifa {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .resumen-tarifa h4 {
        font-size: 0.68rem;
    }

    .resumen-nombre {
        font-size: 1.2rem;
    }

    .resumen-precio {
        font-size: 1.3rem;
    }

    .resumen-promo-note {
        font-size: 0.73rem;
    }

    .resumen-blocks {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .resumen-block {
        padding: 1rem;
    }

    .resumen-block h4 {
        font-size: 0.68rem;
    }

    .resumen-block p {
        font-size: 0.85rem;
    }

    /* RGPD */
    .rgpd-block {
        padding: 1rem;
        margin-bottom: 0.85rem;
    }

    .checkbox-label {
        font-size: 0.82rem;
    }

    .checkbox-label input[type="checkbox"] {
        width: 1.15rem;
        height: 1.15rem;
    }

    /* Pantalla éxito */
    #step-success {
        padding: 2.5rem 0.5rem;
    }

    .success-icon {
        font-size: 3.5rem;
        margin-bottom: 1.25rem;
    }

    #step-success h3 {
        font-size: 1.35rem;
        margin-bottom: 0.85rem;
    }

    #step-success p {
        max-width: 22rem;
        margin-bottom: 1.75rem;
        font-size: 0.9rem;
    }

    .btn-home {
        padding: 0.9rem 1.75rem;
        min-height: 52px;
    }

    .btn-home:hover {
        transform: none;
    }

    /* Alertas wizard */
    .wizard-alert {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 0.85rem;
    }

    /* ============================================================
       FOOTER MÓVIL
       ============================================================ */
    .site-footer {
        padding: 3rem 0 0;
    }

    .footer-inner {
        padding: 0 1rem 2.5rem;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .footer-brand .footer-logo {
        font-size: 1.35rem;
        margin-bottom: 0.6rem;
    }

    .footer-tagline {
        font-size: 0.82rem;
        margin-bottom: 1rem;
    }

    .footer-social a {
        width: 2.4rem;
        height: 2.4rem;
    }

    /* Links del footer en 2 columnas */
    .footer-links-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-links-group h4 {
        font-size: 0.68rem;
        margin-bottom: 0.3rem;
    }

    .footer-links-group a {
        min-height: 32px;
        display: flex;
        align-items: center;
    }

    .footer-links-group p {
        font-size: 0.82rem;
    }

    .footer-bottom {
        padding: 1.25rem 1rem;
    }

    .footer-bottom p {
        font-size: 0.7rem;
    }

    /* ============================================================
       BOTÓN SCROLL TO TOP MÓVIL
       ============================================================ */
    .scroll-top-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 0.85rem;
    }

    .scroll-top-btn:hover {
        transform: none;
    }

    /* ============================================================
       SECTION BADGE MÓVIL
       ============================================================ */
    .section-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.85rem;
        margin-bottom: 0.85rem;
    }
}

/* ============================================================
   DESKTOP: footer-links-wrapper (sin grid en desktop)
   ============================================================ */
@media (min-width: 768px) {
    .footer-links-wrapper {
        display: contents;
    }
}
