/* =========================================
   VARIABLES Y BASE (DARK PREMIUM ORANGE)
   ========================================= */
:root {
    --bg-deep: #0a0a0b;
    --bg-card: #141415;
    --orange-main: #f97316;
    --orange-hover: #ea580c;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #27272a;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Manrope', sans-serif; }
body { background-color: var(--bg-deep); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-orange { color: var(--orange-main); }
.bg-darker { background-color: #050505; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

/* =========================================
   BOTONES
   ========================================= */
.btn-orange {
    background: var(--orange-main); color: #000; padding: 15px 32px; border-radius: 8px; 
    font-weight: 800; font-size: 16px; transition: 0.3s; border: 2px solid var(--orange-main); display: inline-block;
}
.btn-orange:hover { background: var(--orange-hover); border-color: var(--orange-hover); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2); }
.btn-outline-orange {
    background: transparent; color: var(--text-main); border: 2px solid var(--border-color);
    padding: 15px 32px; border-radius: 8px; font-weight: 700; font-size: 16px; transition: 0.3s; display: inline-block;
}
.btn-outline-orange:hover { border-color: var(--orange-main); color: var(--orange-main); }

/* =========================================
   HERO SECTION
   ========================================= */
.hero-alguacil { 
    padding: 180px 20px 100px; 
    text-align: center; 
    background-image: radial-gradient(circle at 50% -20%, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
}
.stats-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 8px 20px; border-radius: 30px; font-size: 14px; color: var(--text-muted);
    margin-bottom: 30px; font-weight: 600;
}
.stats-badge i { color: var(--orange-main); }
.hero-content h1 { font-size: 64px; font-weight: 800; line-height: 1.1; margin-bottom: 25px; letter-spacing: -2px; }
.hero-content p { font-size: 18px; color: var(--text-muted); max-width: 700px; margin: 0 auto 40px; }
.hero-buttons { display: flex; justify-content: center; align-items: center; gap: 20px; }

/* =========================================
   SECCIONES GLOBALES
   ========================================= */
.section-dark { padding: 100px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 42px; font-weight: 800; letter-spacing: -1px; margin-bottom: 15px; }
.section-title p { color: var(--text-muted); font-size: 18px; }

/* =========================================
   NOSOTROS (QUIÉNES SOMOS)
   ========================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: 36px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.about-text p { color: var(--text-muted); margin-bottom: 30px; font-size: 16px; }
.trust-features { display: flex; flex-direction: column; gap: 15px; }
.feature-item { display: flex; align-items: center; gap: 15px; font-size: 16px; font-weight: 600; color: #fff; background: var(--bg-card); padding: 15px 20px; border-radius: 12px; border: 1px solid var(--border-color); }
.image-placeholder { width: 100%; height: 400px; background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: 20px; display: flex; justify-content: center; align-items: center; font-size: 60px; color: var(--border-color); }

/* =========================================
   PANELES DE PESTAÑAS (SERVICIOS) - TABS
   ========================================= */
.services-layout { display: flex; gap: 40px; background: var(--bg-deep); border-radius: 20px; border: 1px solid var(--border-color); overflow: hidden; min-height: 400px; }
.services-sidebar { width: 300px; background: var(--bg-card); padding: 30px 20px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 10px;}
.tab-btn { width: 100%; text-align: left; background: transparent; border: 1px solid transparent; padding: 15px; font-size: 15px; font-weight: 700; color: var(--text-muted); border-radius: 12px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 12px; }
.tab-btn i { width: 20px; text-align: center; }
.tab-btn:hover { background: rgba(249, 115, 22, 0.05); color: var(--text-main); }
.tab-btn.active { background: rgba(249, 115, 22, 0.1); color: var(--orange-main); border-color: rgba(249, 115, 22, 0.2); }

.services-content-area { flex: 1; padding: 50px; }
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tab-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.tab-icon { width: 60px; height: 60px; background: rgba(249, 115, 22, 0.1); color: var(--orange-main); border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 24px; border: 1px solid rgba(249, 115, 22, 0.3); flex-shrink: 0; }
.tab-content h3 { font-size: 32px; font-weight: 800; color: #fff; }
.tab-content p { color: var(--text-muted); font-size: 16px; line-height: 1.8; margin-bottom: 20px; }

/* =========================================
   CONTACTO Y HORARIO DINÁMICO
   ========================================= */
.contact-card-wrapper { display: flex; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; }
.contact-info { flex: 1; padding: 50px; }
.contact-info h2 { font-size: 32px; font-weight: 800; margin-bottom: 15px; }
.contact-info p { color: var(--text-muted); margin-bottom: 40px; }
.detail-item { display: flex; gap: 15px; margin-bottom: 25px; }
.detail-item i { font-size: 20px; color: var(--orange-main); margin-top: 3px; }
.detail-item span { display: block; color: var(--text-muted); font-size: 13px; margin-bottom: 3px;}
.detail-item strong { color: #fff; font-size: 15px; }
.contact-map-side { flex: 1; background: #000; min-height: 400px; border-left: 1px solid var(--border-color); display: flex; }


.schedule-block { background-color: #050505; border-radius: 12px; border: 1px solid var(--border-color); margin-top: 30px; overflow: hidden; }
.schedule-status { display: flex; align-items: center; gap: 12px; padding: 15px 20px; font-size: 15px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-color); }
.status-indicator { width: 10px; height: 10px; border-radius: 50%; }
.schedule-block.open .status-indicator { background-color: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.5); }
.schedule-block.open .status-text { color: #fff; }
.schedule-block.closed .status-indicator { background-color: #ef4444; }
.schedule-block.closed .status-text { color: var(--text-muted); }
.status-time { color: var(--text-muted); font-size: 13px; margin-left: auto; }

.schedule-details-visible { padding: 20px; }
.schedule-details-visible h4 { font-size: 14px; color: #fff; margin-bottom: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.schedule-details-visible ul { list-style: none; font-size: 14px; }
.schedule-details-visible li { display: flex; justify-content: space-between; color: var(--text-muted); padding: 8px 0; border-bottom: 1px dashed var(--border-color); }
.schedule-details-visible li:last-child { border-bottom: none; padding-bottom: 0; }
.schedule-details-visible li span:last-child { color: #fff; font-weight: 600; }
.schedule-details-visible li.closed-day span:last-child { color: #ef4444; }

/* FOOTER */
.alguacil-footer { border-top: 1px solid var(--border-color); padding: 40px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.brand h3 { font-size: 20px; font-weight: 800; margin-bottom: 5px; display: flex; gap: 8px; align-items: center;}
.brand p { color: var(--text-muted); font-size: 14px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 14px; transition: 0.3s; }
.footer-links a:hover { color: #fff; }

/* =========================================
   WIDGET WHATSAPP CHATBOT
   ========================================= */
.wa-widget-container { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
.wa-floating-btn {
    width: 60px; height: 60px; background-color: #25D366; color: #fff; border: none; border-radius: 50%;
    font-size: 32px; cursor: pointer; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    display: flex; justify-content: center; align-items: center; transition: 0.3s; position: relative;
}
.wa-floating-btn:hover { transform: scale(1.1); }
.wa-tooltip {
    position: absolute; right: 75px; background-color: #111; color: #fff; font-size: 13px;
    padding: 8px 15px; border-radius: 20px; border: 1px solid #333; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: 0.3s; transform: translateX(10px);
}
.wa-tooltip::after {
    content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%);
    border-left: 5px solid #111; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.wa-floating-btn:hover .wa-tooltip { opacity: 1; transform: translateX(0); }

.wa-chat-window {
    position: absolute; bottom: 80px; right: 0; width: 320px; background-color: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95);
    transform-origin: bottom right; transition: all 0.3s ease-out;
}
.wa-chat-window.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.wa-chat-header { background-color: var(--bg-deep); padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.wa-header-info { display: flex; align-items: center; gap: 12px; }
.wa-avatar { width: 40px; height: 40px; background-color: rgba(249, 115, 22, 0.1); color: var(--orange-main); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 18px; border: 1px solid rgba(249, 115, 22, 0.3); }
.wa-header-info h4 { color: #fff; font-size: 15px; margin-bottom: 2px; font-weight: 700;}
.wa-header-info span { color: #25D366; font-size: 12px; font-weight: 600; }
.wa-close { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; transition: 0.2s; }
.wa-close:hover { color: #fff; }

.wa-chat-body { padding: 25px 20px; min-height: 150px; background-color: #0d0d0e; }
.wa-typing { display: flex; gap: 5px; background-color: var(--bg-card); padding: 12px 18px; border-radius: 20px; width: fit-content; border-bottom-left-radius: 4px; border: 1px solid var(--border-color); }
.wa-typing .dot { width: 8px; height: 8px; background-color: var(--orange-main); border-radius: 50%; animation: waBounce 1.4s infinite ease-in-out both; }
.wa-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.wa-typing .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes waBounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

.wa-message { background-color: var(--bg-card); padding: 15px; border-radius: 12px; border-bottom-left-radius: 4px; border: 1px solid var(--border-color); animation: fadeIn 0.4s ease; }
.wa-message p { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; line-height: 1.5; }
.wa-message p:first-child { color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 8px;}
.btn-wa-redirect { display: flex; align-items: center; justify-content: center; gap: 8px; background-color: #25D366; color: #000; padding: 12px; border-radius: 8px; font-weight: 800; font-size: 14px; transition: 0.2s; border: none;}
.btn-wa-redirect:hover { background-color: #20b858; transform: translateY(-2px); }

/* =========================================
    PÁGINAS LEGALES (UI LUXURY)
   ========================================= */
.legal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-box h3 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.legal-box h3:first-child {
    margin-top: 0;
}

.legal-box p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* =========================================
   RESEÑAS (SOCIAL PROOF)
   ========================================= */
.reviews-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
}

.review-box {
    background: var(--bg-card); 
    border: 1px solid var(--border-color);
    padding: 40px 30px; 
    border-radius: 16px; 
    transition: 0.3s;
    display: flex; 
    flex-direction: column;
}

.review-box:hover { 
    border-color: var(--orange-main); 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.05);
}

.highlight-review { 
    border-color: rgba(249, 115, 22, 0.4); 
    background: rgba(249, 115, 22, 0.03); 
    transform: scale(1.02); 
}

.highlight-review:hover {
    transform: scale(1.02) translateY(-5px);
}

.stars { 
    color: var(--orange-main); 
    font-size: 14px; 
    margin-bottom: 20px; 
    letter-spacing: 2px; 
}

.review-text { 
    font-size: 15px; 
    color: var(--text-main); 
    font-style: italic; 
    margin-bottom: 30px; 
    line-height: 1.7; 
    flex-grow: 1; 
}

.review-author { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border-top: 1px solid var(--border-color); 
    padding-top: 20px; 
}

.author-icon { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background: rgba(249, 115, 22, 0.1); 
    color: var(--orange-main); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 16px; 
}

.review-author strong { 
    color: #fff; 
    font-size: 14px; 
    display: block; 
    margin-bottom: 2px;
}

.review-author span { 
    color: var(--text-muted); 
    font-size: 12px; 
}


/* RESPONSIVE */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .trust-features { align-items: center; }
    .services-layout { flex-direction: column; }
    .services-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); flex-direction: row; flex-wrap: wrap; }
    .tab-btn { width: auto; flex-grow: 1; justify-content: center; }

    .contact-card-wrapper { 
        flex-direction: column; 
    }
    
    .contact-map-side { 
        flex: none;
        width: 100%; 
        height: 400px; 
        border-left: none; 
        border-top: 1px solid var(--border-color);
    }
    .contact-map-side iframe {
        width: 100% !important;
        height: 100% !important;
        display: block;
        border: none;
    }

    .reviews-grid { 
        grid-template-columns: 1fr; 
    }
    .highlight-review { 
        transform: scale(1); 
    }
    .highlight-review:hover { 
        transform: translateY(-5px); 
    }
}
@media (max-width: 768px) {
    .hero-content h1 { font-size: 46px; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
    .btn-orange, .btn-outline-orange { width: 100%; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .wa-tooltip { display: none; }

    .legal-box {
        padding: 30px 20px;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .tab-content h3 {
        font-size: 26px; 
    }
}