* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #8B5CF6;
    --accent-light: #A78BFA;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --cyan: #06B6D4;
    --text: #0F172A;
    --text-light: #64748B;
    --text-lighter: #94A3B8;
    --border: #E2E8F0;
    --bg-light: #F8FAFC;
    --bg-lighter: #F1F5F9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --gradient-accent: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 100%);
}

html, body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;   /* IE / Edge legacy */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;               /* Chrome, Safari, Opera */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========== HEADER ========== */
.header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.25rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6)); }
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, #fff 0%, #E0E7FF 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    opacity: 0.8;
    font-weight: 600;
}

.admin-badge {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.admin-badge span {
    opacity: 0.95;
}

.badge-link {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
}

.badge-link:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.badge-link.logout {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.badge-link.logout:hover {
    background: #EF4444;
    transform: scale(1.05);
}

/* ========== SEARCH SECTION ========== */
.search-section {
    background: var(--gradient-accent);
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    color: white;
    margin-bottom: 0;
    border-radius: 0 0 24px 24px;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.search-container {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

#searchInput {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

#searchInput::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

#searchInput:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.btn-search {
    padding: 0.9rem 2rem;
    background: white;
    color: var(--accent);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-search:active {
    transform: translateY(0);
}

.location-info {
    font-size: 0.95rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.location-info label {
    color: white;
    font-weight: 600;
}

.city-select {
    padding: 0.6rem 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.city-select:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

.city-select:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    border-color: #06B6D4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.city-select option {
    background: #0F172A;
    color: white;
    padding: 0.5rem;
}

/* ========== RESULTS SECTION ========== */
.results-section {
    margin: 2rem 0;
}

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.no-results small {
    display: block;
    margin-bottom: 1rem;
    color: #9CA3AF;
}

/* ========== RESULTS LIST ========== */
.results-list {
    margin: 2rem 0;
}

.results-count {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ========== SERVICE CARD ========== */
.card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: var(--accent);
}

.card.featured {
    border-color: var(--warning);
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.card.featured::before {
    background: linear-gradient(90deg, var(--warning) 0%, var(--accent-light) 100%);
}

.card .badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: var(--gradient-accent);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.card-content {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.card .info {
    flex: 1;
    min-width: 0;
}

.card-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    word-break: break-word;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #FEF3C7 0%, #FED7AA 100%);
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.star-icon {
    color: #F59E0B;
    font-size: 1rem;
}

.rating-value {
    color: var(--text);
}

.servicios {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.zona {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.zona svg {
    flex-shrink: 0;
    color: var(--accent);
    width: 16px;
    height: 16px;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: flex-start;
}

.btn-whatsapp,
.btn-admin-toggle {
    padding: 0.65rem 1.1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.btn-whatsapp {
    background: #10B981;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-whatsapp:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-admin-toggle {
    background: var(--bg-light);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-admin-toggle:hover {
    border-color: var(--accent);
    background: white;
}

.btn-admin-toggle.is-featured {
    background: var(--gradient-accent);
    color: white;
    border-color: var(--accent);
}

.btn-admin-toggle.is-featured:hover {
    transform: scale(1.08);
}

/* ========== LOAD MORE ========== */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.btn-load-more,
.btn-google-fallback {
    padding: 0.9rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}

.btn-load-more:hover,
.btn-google-fallback:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3);
}

.btn-load-more:active,
.btn-google-fallback:active {
    transform: translateY(0);
}

.btn-google-fallback {
    background: linear-gradient(135deg, #4F46E5 0%, #2D63DC 100%);
}

/* ========== MODALS ========== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.service-modal {
    max-width: 650px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-light);
}

.close:hover {
    color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.modal-content h2,
.modal-content h3 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* ========== BUTTONS ========== */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ========== ADMIN SECTION ========== */
.admin-section {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-section h2 {
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.admin-actions {
    margin-bottom: 2.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.admin-service-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.admin-service-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.admin-service-card h4 {
    margin-bottom: 1.2rem;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-service-card small {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.6;
}

.admin-actions-btn {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.admin-actions-btn button {
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ========== ERROR MESSAGES ========== */
.error-message {
    color: var(--error);
    margin-top: 1rem;
    padding: 1rem;
    background: #FEE2E2;
    border-radius: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.02) 100%);
}

.footer p {
    margin-bottom: 1rem;
    font-weight: 500;
}

.admin-login-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.admin-login-btn:hover {
    color: white;
    background: var(--gradient-accent);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-brand {
        gap: 0.75rem;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .search-section {
        padding: 2.5rem 1rem 1.5rem;
        border-radius: 0 0 16px 16px;
    }
    
    .search-form {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    #searchInput,
    .btn-search {
        width: 100%;
    }
    
    .card-content {
        flex-direction: column;
    }
    
    .card-actions {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .btn-whatsapp,
    .btn-admin-toggle {
        flex: 1;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .admin-section {
        padding: 1.5rem;
    }
    
    .admin-section h2 {
        font-size: 1.5rem;
    }
    
    .admin-services {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        max-width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-badge {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .search-section::before {
        width: 200px;
        height: 200px;
        right: -50px;
    }
}
