/* 
 * Mobile Fixes CSS
 * Soluciona problemas de diseño responsive en dispositivos móviles
 */

/* ===================================
   BUSCADOR DEL HOME
   =================================== */

/* Search hint - texto de ejemplo */
.search-hint {
    margin: 0.75rem 0 0 0;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: #64748b; /* Gris para contraste con fondo blanco */
    text-align: center;
    font-style: normal;
    font-weight: 400;
    background: transparent;
    border: none;
}

.search-hint i {
    color: #f59e0b; /* Naranja/amarillo para la bombilla */
    margin-right: 0.25rem;
}

@media (max-width: 768px) {
    /* Contenedor del buscador */
    .hero-search {
        margin-bottom: 2rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    /* Input de búsqueda en móvil */
    .search-input {
        width: 100%;
        padding: 1rem 1rem 1rem 3rem !important;
        font-size: 1rem;
    }
    
    /* Placeholder más corto en móvil */
    .search-input::placeholder {
        font-size: 0.9rem;
    }
    
    /* Botón de búsqueda - evitar que se corte */
    .search-button {
        width: 100%;
        padding: 1rem 1.5rem;
        white-space: nowrap;
        font-size: 1rem;
        font-weight: 600;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    
    /* Icono de búsqueda */
    .search-icon {
        top: 1rem;
        left: 1rem;
    }
    
    /* Search hint en móvil */
    .search-hint {
        margin-top: 0.75rem;
        font-size: 0.75rem;
        color: #64748b;
        text-align: center;
        padding: 0 1rem;
    }
}

@media (min-width: 769px) {
    /* En desktop, ocultar el hint (ya está en el placeholder) */
    .search-hint {
        display: none;
    }
}

/* ===================================
   BOTONES CTA (Publicar / Saber Más)
   =================================== */

@media (max-width: 768px) {
    /* Contenedor de botones */
    .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Todos los botones en móvil */
    .btn-lg {
        width: 100%;
        margin: 0 !important; /* Quitar márgenes laterales */
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Espaciado entre botones */
    .btn + .btn {
        margin-top: 1rem !important;
    }
    
    /* Botones dentro de divs o secciones */
    .btn {
        margin-bottom: 1rem;
    }
    
    /* Específico para footer */
    .footer-section .btn + .btn,
    .cta-section .btn + .btn {
        margin-top: 1rem !important;
    }
}

/* ===================================
   BOTONES GENERALES EN MÓVIL
   =================================== */

@media (max-width: 768px) {
    /* Asegurar espaciado vertical */
    .btn {
        margin-bottom: 0.75rem;
    }
    
    /* Último botón sin margen inferior */
    .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Botones que están juntos horizontalmente */
    .btn.me-2,
    .btn.me-3 {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
}

/* ===================================
   STATS DEL HERO
   =================================== */

@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .stat-item {
        text-align: center;
        width: 100%;
    }
}

/* ===================================
   CATEGORÍAS EN MÓVIL
   =================================== */

@media (max-width: 576px) {
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .category-name {
        font-size: 1rem;
    }
}

/* ===================================
   BENEFICIOS EN MÓVIL
   =================================== */

@media (max-width: 768px) {
    .benefit-item {
        flex-direction: row !important;
        text-align: left !important;
        gap: 1.5rem;
        padding: 1.5rem;
        align-items: flex-start;
    }
    
    .benefit-icon {
        margin-right: 0;
        flex-shrink: 0;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .benefit-content {
        flex: 1;
    }
}

/* ===================================
   STEPS (01, 02, 03) - MAYOR CONTRASTE
   =================================== */

.step-number {
    opacity: 1 !important;
    font-weight: 800 !important;
    color: rgba(59, 130, 246, 0.25) !important; /* Azul más visible */
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .step-card {
        text-align: center;
        padding: 2rem 1.5rem;
        position: relative;
    }
    
    .step-number {
        font-size: 5rem !important;
        opacity: 1 !important;
        color: rgba(59, 130, 246, 0.3) !important; /* Más visible en móvil */
        font-weight: 900 !important;
    }
    
    .step-icon {
        margin: 0 auto 1.5rem;
    }
    
    .step-title {
        font-size: 1.25rem;
    }
}

/* ===================================
   ESPACIADO GENERAL
   =================================== */

@media (max-width: 768px) {
    /* Reducir padding en secciones */
    section {
        padding: 3rem 0;
    }
    
    /* Títulos de sección más pequeños */
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Hero title más pequeño */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ===================================
   ARREGLOS ESPECÍFICOS
   =================================== */

@media (max-width: 768px) {
    /* Contenedor flex que tiene botones */
    .d-flex.flex-wrap.gap-2,
    .d-flex.gap-3 {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Botones dentro de flex */
    .d-flex > .btn {
        width: 100%;
    }
}

/* ===================================
   NAVBAR EN MÓVIL
   =================================== */

@media (max-width: 991px) {
    /* Menú móvil */
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Botones del navbar en móvil */
    .navbar .btn {
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* ===================================
   INPUTS Y FORMS EN MÓVIL
   =================================== */

@media (max-width: 768px) {
    /* Todos los inputs en móvil */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important; /* Evita zoom en iOS */
    }
    
    /* Botones de submit en forms */
    form .btn[type="submit"],
    form button[type="submit"] {
        width: 100%;
    }
}

/* ===================================
   CARDS EN MÓVIL
   =================================== */

@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* ===================================
   SECCIÓN "POR QUÉ PUBLICAR" EN MÓVIL
   =================================== */

@media (max-width: 768px) {
    .why-publish-section {
        text-align: center;
    }
    
    .why-publish-content {
        text-align: center;
        padding: 0 1rem;
    }
    
    .section-badge {
        display: inline-block;
        margin: 0 auto;
    }
    
    .benefit-list {
        text-align: left;
        max-width: 100%;
    }
    
    .benefit-item {
        text-align: left !important;
        margin-bottom: 1.5rem;
    }
    
    /* Asegurar que el título y lead text estén centrados */
    .why-publish-content .section-title,
    .why-publish-content .lead {
        text-align: center;
    }
}

/* ===================================
   FOOTER BOTONES EN MÓVIL
   =================================== */

@media (max-width: 768px) {
    .footer-section .mt-4,
    .cta-section .mt-4,
    footer .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 1rem !important;
    }
    
    footer .btn,
    .footer-section .btn,
    .cta-section .btn {
        margin-bottom: 1rem !important;
    }
    
    footer .btn:last-child,
    .footer-section .btn:last-child,
    .cta-section .btn:last-child {
        margin-bottom: 0 !important;
    }
}
