/* DISEÑO MÓVIL PROFESIONAL - ENFOQUE BALANCEADO */

/* Reset profesional para móviles */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }
    
    body {
        font-size: 14px;
        line-height: 1.5;
        margin: 0;
        padding: 0;
        color: #333;
        background-color: #f8f9fa;
    }
    
    /* HEADER PROFESIONAL */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: linear-gradient(135deg, #e91e63 0%, #f06292 100%);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        padding: 8px 0;
    }
    
    .header-content {
        max-width: 100%;
        padding: 0 12px;
    }
    
    .header-top {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .logo-search-section {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .logo-image {
        height: 32px;
        width: auto;
        max-width: 120px;
        flex-shrink: 0;
    }
    
    .search-container {
        flex: 1;
        min-width: 0;
    }
    
    .search-input {
        width: 100%;
        height: 36px;
        padding: 8px 40px 8px 12px;
        border: none;
        border-radius: 18px;
        font-size: 14px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .search-input:focus {
        outline: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .search-btn-icon {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        background: #e91e63;
        color: white;
        border: none;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    .nav-actions-section {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .user-actions {
        display: flex;
        gap: 4px;
        align-items: center;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
        height: 32px;
        border-radius: 16px;
        border: none;
        cursor: pointer;
        font-weight: 600;
        white-space: nowrap;
    }
    
    .btn-primary {
        background: #28a745;
        color: white;
    }
    
    .btn-secondary {
        background: rgba(255,255,255,0.2);
        color: white;
        border: 1px solid rgba(255,255,255,0.3);
    }
    
    .nav-container {
        display: none;
    }
    
    /* CONTENIDO PRINCIPAL PROFESIONAL */
    .main-content {
        padding: 16px 12px;
    }
    
    .container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* HERO SECTION PROFESIONAL */
    .hero-section {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 24px 16px;
        text-align: center;
        margin-bottom: 24px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .hero-title {
        font-size: 1.5em;
        margin-bottom: 20px;
        font-weight: 700;
        line-height: 1.2;
    }
    
    .hero-stats {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    .stat-number {
        font-size: 1.2em;
        font-weight: 700;
        color: white;
    }
    
    .stat-label {
        font-size: 0.7em;
        opacity: 0.8;
        text-align: center;
    }
    
    .hero-actions {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-btn {
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 20px;
        text-decoration: none;
        transition: transform 0.2s;
        min-width: 120px;
        text-align: center;
    }
    
    .hero-btn:hover {
        transform: translateY(-1px);
    }
    
    /* SECCIÓN DE ANUNCIOS PROFESIONAL */
    #anuncios {
        margin-bottom: 32px;
    }
    
    #anuncios h2 {
        font-size: 1.3em;
        margin-bottom: 8px;
        text-align: center;
        color: #333;
        font-weight: 600;
    }
    
    #anuncios p {
        font-size: 0.9em;
        margin-bottom: 20px;
        text-align: center;
        color: #666;
    }
    
    .ads-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 0;
        padding: 0;
    }
    
    .ad-card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: transform 0.2s, box-shadow 0.2s;
        border: 1px solid #e2e8f0;
    }
    
    .ad-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    }
    
    .ad-image-container {
        position: relative;
        width: 100%;
        height: 200px;
        overflow: hidden;
    }
    
    .ad-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }
    
    .ad-card:hover .ad-image {
        transform: scale(1.05);
    }
    
    .ad-content {
        padding: 16px;
    }
    
    .ad-title {
        font-size: 1rem;
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .ad-price {
        font-size: 1.1rem;
        font-weight: 700;
        color: #059669;
        margin-bottom: 12px;
    }
    
    .ad-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .ad-meta-item {
        font-size: 0.8rem;
        color: #666;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .ad-meta-item i {
        font-size: 0.7rem;
        width: 12px;
        text-align: center;
    }
    
    .ad-price-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        background: #059669;
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
    }
    
    .category-badge {
        display: inline-block;
        background: #f0f9ff;
        color: #0369a1;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 0.7rem;
        font-weight: 500;
        margin-bottom: 8px;
    }
    
    /* FOOTER PROFESIONAL */
    .footer {
        background: #2d3748;
        color: #e2e8f0;
        padding: 24px 0;
        margin-top: 32px;
    }
    
    .footer-main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 12px;
        max-width: 100%;
    }
    
    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 12px;
        color: #e2e8f0;
        font-weight: 600;
    }
    
    .footer-section ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .footer-section ul li {
        margin-bottom: 8px;
    }
    
    .footer-section ul li a {
        color: #a0aec0;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.2s;
    }
    
    .footer-section ul li a:hover {
        color: #e2e8f0;
    }
    
    .footer-bottom {
        padding: 16px 12px 0;
        border-top: 1px solid #4a5568;
        text-align: center;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
        color: #a0aec0;
    }
    
    .newsletter-form {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }
    
    .newsletter-input {
        flex: 1;
        padding: 8px 12px;
        border: 1px solid #4a5568;
        border-radius: 6px;
        background: #4a5568;
        color: white;
        font-size: 0.9rem;
    }
    
    .newsletter-input::placeholder {
        color: #a0aec0;
    }
    
    .newsletter-btn {
        padding: 8px 16px;
        background: #e91e63;
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
    }
    
    /* Ocultar elementos innecesarios en móviles */
    .adsense-banner-header {
        display: none;
    }
}

/* Optimizaciones para móviles pequeños */
@media (max-width: 480px) {
    .header {
        padding: 6px 0;
    }
    
    .header-content {
        padding: 0 8px;
    }
    
    .logo-image {
        height: 28px;
        max-width: 100px;
    }
    
    .search-input {
        height: 32px;
        font-size: 13px;
        padding: 6px 36px 6px 10px;
    }
    
    .search-btn-icon {
        width: 20px;
        height: 20px;
        right: 4px;
    }
    
    .btn {
        padding: 4px 8px;
        font-size: 11px;
        height: 28px;
    }
    
    .main-content {
        padding: 12px 8px;
    }
    
    .hero-section {
        padding: 20px 12px;
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 1.3em;
        margin-bottom: 16px;
    }
    
    .hero-stats {
        gap: 12px;
    }
    
    .stat-number {
        font-size: 1.1em;
    }
    
    .stat-label {
        font-size: 0.65em;
    }
    
    .hero-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .ad-image-container {
        height: 180px;
    }
    
    .ad-content {
        padding: 12px;
    }
    
    .ad-title {
        font-size: 0.95rem;
    }
    
    .ad-price {
        font-size: 1.05rem;
    }
    
    .ad-meta-item {
        font-size: 0.75rem;
    }
}

/* Optimizaciones para móviles muy pequeños */
@media (max-width: 360px) {
    .header-content {
        padding: 0 6px;
    }
    
    .logo-image {
        height: 24px;
        max-width: 80px;
    }
    
    .search-input {
        height: 30px;
        font-size: 12px;
        padding: 5px 32px 5px 8px;
    }
    
    .search-btn-icon {
        width: 18px;
        height: 18px;
        right: 3px;
    }
    
    .btn {
        padding: 3px 6px;
        font-size: 10px;
        height: 26px;
    }
    
    .main-content {
        padding: 10px 6px;
    }
    
    .hero-section {
        padding: 16px 10px;
        margin-bottom: 16px;
    }
    
    .hero-title {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
    
    .hero-stats {
        gap: 10px;
    }
    
    .stat-number {
        font-size: 1em;
    }
    
    .stat-label {
        font-size: 0.6em;
    }
    
    .hero-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .ad-image-container {
        height: 160px;
    }
    
    .ad-content {
        padding: 10px;
    }
    
    .ad-title {
        font-size: 0.9rem;
    }
    
    .ad-price {
        font-size: 1rem;
    }
    
    .ad-meta-item {
        font-size: 0.7rem;
    }
}
