:root {
    --primary: #1e3a8a;
    --secondary: #0ea5e9;
    --accent: #00f5ff;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --whatsapp: #25D366;
    --facebook: #1877F2;
    --instagram: #E1306C;
    --location: #10b981;
    --website: #8b5cf6;
    --warning: #f59e0b;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Segoe UI', system-ui, sans-serif;
    padding-bottom: 100px;
    overflow-x: hidden;
}

/* Splash Screen Tecnológico */
.splash-screen {
    position: fixed;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #121212 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    opacity: 1;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    animation: float 6s infinite ease-in-out;
}

.splash-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 2;
    opacity: 0.3;
}

.splash-logo {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6200 0%, #ff9e2c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    z-index: 3;
    box-shadow: 0 20px 60px rgba(255, 98, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s infinite alternate;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.splash-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    animation: shine 3s infinite;
}

.logo-icon {
    font-size: 80px;
    color: white;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    width: 230px;
    height: 230px;
}

.splash-text {
    color: #f8f9fa !important;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.loading-bar-container {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    z-index: 3;
    margin-top: 20px;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff6200, #ff9e2c);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
    animation: shimmer 1.5s infinite;
}

.loading-text {
    color:#f8f9fa;
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards 1.2s;
    z-index: 3;
}

.skip-btn {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards 1.5s;
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 98, 0, 0.3);
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 20px 60px rgba(255, 98, 0, 0.4);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 20px 60px rgba(255, 98, 0, 0.6);
        transform: scale(1.05);
    }
}

@keyframes shine {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50%) rotate(0deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(50%) translateY(50%) rotate(180deg);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, 15px);
    }
    50% {
        transform: translate(-10px, 5px);
    }
    75% {
        transform: translate(5px, -10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header con logo */
.logo-icon-1 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.logo-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    color: #fff;
}

.logo-btn p {
    margin: 0;
    padding: 0;
}

.install-btn {
    text-transform: none;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-size: 10px;
}

.install-btn:hover {
    background-color: #45a049;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.2), transparent);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { transform: translateX(-50%) translateY(-50%) rotate(45deg); }
    100% { transform: translateX(50%) translateY(50%) rotate(45deg); }
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 24px;
    opacity: 0.95;
}

/* Fondos temáticos por sección */
.oficio-section {
    position: relative;
    padding: 60px 20px 40px;
    border-radius: 20px;
    margin: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.oficio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* Plomeros - Azul agua */
#plomeros .oficio-section {
    background: linear-gradient(135deg, #0c4a6e 0%, #075985 30%, #0369a1 100%);
}

#plomeros .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='water' x='0' y='0' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='30' cy='30' r='8' fill='%2338bdf8'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23water)'/%3E%3C/svg%3E");
}

/* Electricistas - Rojo eléctrico */
#electricistas .oficio-section {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 30%, #dc2626 100%);
}

#electricistas .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='bolt' x='0' y='0' width='80' height='80' patternUnits='userSpaceOnUse'%3E%3Cpath d='M40,10 L30,30 L50,30 L20,60 L40,40 L30,40 Z' fill='%23fbbf24'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23bolt)'/%3E%3C/svg%3E");
}

/* Cerrajeros - Gris metálico */
#cerrajeros .oficio-section {
    background: linear-gradient(135deg, #374151 0%, #4b5563 30%, #6b7280 100%);
}

#cerrajeros .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='lock' x='0' y='0' width='70' height='70' patternUnits='userSpaceOnUse'%3E%3Crect x='25' y='25' width='20' height='20' rx='4' fill='%239ca3af'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23lock)'/%3E%3C/svg%3E");
}

/* Albañiles - Tierra */
#albaniles .oficio-section {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 30%, #b45309 100%);
}

#albaniles .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='brick' x='0' y='0' width='50' height='50' patternUnits='userSpaceOnUse'%3E%3Crect x='0' y='0' width='25' height='25' fill='%23d97706'/%3E%3Crect x='25' y='25' width='25' height='25' fill='%23d97706'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23brick)'/%3E%3C/svg%3E");
}

/* Pintores - Paleta */
#pintores .oficio-section {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 30%, #8b5cf6 100%);
}

#pintores .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='paint' x='0' y='0' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='20' cy='20' r='6' fill='%23f472b6'/%3E%3Ccircle cx='40' cy='40' r='6' fill='%2334d399'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23paint)'/%3E%3C/svg%3E");
}

/* Mecánicos - Engranajes */
#mecanicos .oficio-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 30%, #475569 100%);
}

#mecanicos .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='gear' x='0' y='0' width='80' height='80' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='40' cy='40' r='12' fill='none' stroke='%2394a3b8' stroke-width='2'/%3E%3Cpath d='M40,28 L44,24 M40,52 L44,56 M28,40 L24,44 M52,40 L56,36' stroke='%2394a3b8' stroke-width='2'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23gear)'/%3E%3C/svg%3E");
}

/* Herreros - Fuego */
#herreros .oficio-section {
    background: linear-gradient(135deg, #92400e 0%, #b45309 30%, #f59e0b 100%);
}

#herreros .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='fire' x='0' y='0' width='70' height='70' patternUnits='userSpaceOnUse'%3E%3Cpath d='M35,10 Q40,5 45,10 T55,10 Q50,15 45,15 T35,15 Q30,10 35,10 Z' fill='%23fbbf24'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23fire)'/%3E%3C/svg%3E");
}

/* Jardineros - Verde */
#jardineros .oficio-section {
    background: linear-gradient(135deg, #166534 0%, #15803d 30%, #16a34a 100%);
}

#jardineros .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='leaf' x='0' y='0' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M30,10 Q40,20 30,30 Q20,20 30,10 Z' fill='%2334d399'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23leaf)'/%3E%3C/svg%3E");
}

/* Limpieza - Violeta */
#limpieza .oficio-section {
    background: linear-gradient(135deg, #4338ca 0%, #5b21b6 30%, #7c3aed 100%);
}

#limpieza .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='clean' x='0' y='0' width='50' height='50' patternUnits='userSpaceOnUse'%3E%3Cpath d='M10,10 L40,10 L40,40 L10,40 Z' fill='none' stroke='%23c084fc' stroke-width='2'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23clean)'/%3E%3C/svg%3E");
}

/* Transporte - Púrpura */
#transporte .oficio-section {
    background: linear-gradient(135deg, #7e22ce 0%, #9333ea 30%, #a855f7 100%);
}

#transporte .oficio-section::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='truck' x='0' y='0' width='80' height='80' patternUnits='userSpaceOnUse'%3E%3Cpath d='M20,30 L60,30 L60,50 L20,50 Z M30,20 L50,20 L50,30 L30,30 Z' fill='%23ddd6fe'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23truck)'/%3E%3C/svg%3E");
}

.section-title {
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

strong{
    color: #fff;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 149, 255, 0.3);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title,
.card-text,
.text-muted {
    color: var(--text-light) !important;
}

/* Contact buttons en tarjetas */
.contact-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: transform 0.2s;
    color: white !important;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    transform: scale(1.05);
}

.whatsapp-btn { background: var(--whatsapp); }
.facebook-btn { background: var(--facebook); }
.instagram-btn { background: var(--instagram); }
.location-btn { background: var(--location); }
.website-btn { background: var(--website); }
.review-btn { background: var(--warning); }

/* Sistema de Rating */
.professional-rating {
    min-height: 24px;
    margin-bottom: 10px;
}

.star-rating {
    font-size: 1.5rem;
    cursor: pointer;
}

.star-icon {
    transition: all 0.2s ease;
    margin-right: 2px;
}

.star-icon:hover {
    transform: scale(1.2);
}

/* Modal de tarjeta completa */
.card-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-modal.show {
    display: flex;
    opacity: 1;
}

.modal-card-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 0 40px var(--accent);
    position: relative;
    padding: 25px;
    color: var(--text-light);
}

.modal-card-content img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0,0,0,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal contact buttons */
.modal-contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.modal-contact-btn {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s;
    justify-content: center;
    color: white !important;
}

.modal-contact-btn:hover {
    transform: scale(1.05);
}

/* Modal de reseñas */
.modal-content {
    background: var(--card-bg) !important;
    border: 1px solid rgba(56, 189, 248, 0.2);
    z-index: 1200;
}

.modal-header, .modal-footer {
    border-color: rgba(255,255,255,0.1) !important;
}

.form-control {
    background: var(--dark-bg);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-light);
}

.form-control:focus {
    background-color: var(--dark-bg);
    border-color: var(--accent);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 245, 255, 0.25);
}

/* Barra de navegación inferior */
.navbar-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 20px rgba(0, 212, 255, 0.2);
    z-index: 1000;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
}

.scroll-container {
    display: flex;
    gap: 14px;
    padding: 0 20px;
    align-items: center;
    width: 80%;
    margin: auto;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 85px;
    padding: 10px 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: 10px;
    transition: all 0.25s;
}

.nav-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.nav-btn.active,
.nav-btn:hover {
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.05);
}

/* Loading spinner */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--accent);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sección de reseñas en modal */
.reviews-section {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.review-item {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-author {
    font-weight: bold;
    color: var(--accent);
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.review-rating {
    color: var(--warning);
    margin-bottom: 5px;
}

.review-comment {
    color: var(--text-light);
    line-height: 1.4;
}

.no-reviews {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    .modal-card-content { padding: 20px; }
    .modal-card-content img { height: 220px; }
    .contact-buttons { flex-direction: column; }
    .contact-btn { width: 100%; justify-content: center; }
    .splash-logo {
        width: 280px;
        height: 280px;
    }
    .splash-text {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .splash-logo {
        width: 250px;
        height: 250px;
    }
    .splash-text {
        font-size: 1.4rem;
    }
}