/* 
 * VHIVHE CORE STYLES v3.1 (Enterprise Ready)
 * Este archivo contiene la base de Tailwind + Parches de compatibilidad v3
 */

@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* --- RESTAURACIÓN DE COLORES SLATE (v3) --- */
.text-slate-900 { color: #0f172a; }
.text-slate-600 { color: #475569; }
.text-slate-500 { color: #64748b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-50 { background-color: #f8fafc; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }

/* --- RESTAURACIÓN DE TRANSPARENCIAS (v3 / Syntax) --- */
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.bg-indigo-900\/60 { background-color: rgba(49, 46, 129, 0.6); }

/* --- NUEVO LIGHTBOX MINIMALISTA VHIVHE --- */
.vh-lightbox-active { overflow: hidden !important; }
#lightbox { z-index: 10000 !important; background-color: #ffffff; }
.lightbox-btn { background: none; border: none; color: #1e1e1e; opacity: 0.4; transition: opacity 0.3s; }
.lightbox-btn:hover { opacity: 1; }
.lightbox-thumb-active { border-color: #4f46e5 !important; opacity: 1 !important; transform: scale(1.05); }
.text-shadow-none { text-shadow: none !important; }

/* --- RESTAURACIÓN DE EFECTOS VISUALES --- */
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* --- RESTAURACIÓN DE ALTURAS Y MEDIDAS PERSONALIZADAS --- */
.h-\[450px\] { height: 450px; }
.h-\[600px\] { height: 600px; }
/* Sobrescribir Tailwind CDN: .max-w-7xl a 1400px (dossier/portfolio) */
.max-w-7xl { max-width: 1400px !important; }
.max-w-5xl { max-width: 64rem; }

/* --- ANIMACIONES CORE --- */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}
.animate-marquee { animation: marquee 25s linear infinite; }

/* --- OPTIMIZACIONES GENERALES --- */
html { scroll-behavior: smooth; font-family: 'Inter', sans-serif; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }

/* --- VARIABLES DE MARCA (--primary inyectado desde PHP en el template) --- */
.text-indigo-600 { color: var(--primary, #4f46e5) !important; }
.bg-indigo-600 { background-color: var(--primary, #4f46e5) !important; }
.energy-info-box { border-color: var(--primary, #18b058) !important; }
.energy-info-box::after { border-top-color: var(--primary, #18b058) !important; }
.btn-primary-custom { background-color: var(--primary, #4f46e5) !important; border-color: var(--primary, #4f46e5) !important; }

/* --- HEADER STICKY (dossier) --- */
.astronav-sticky-header.is-active {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
}

/* --- ANCHO Y ALTURA PÁGINA DOSSIER (1400px) --- */
.dossier-page-width {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
/* Header portfolio/dossier: forzar 1400px por encima de Tailwind .max-w-7xl (80rem) */
header > .dossier-page-width {
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.dossier-hero-height {
    height: 530px;
}

/* --- SIDEBAR STICKY (formulario siempre visible al hacer scroll, se frena al llegar al borde inferior) --- */
/* La columna derecha debe alinearse al inicio para que el sticky tenga “suelo” donde pegarse */
@media (min-width: 1024px) {
    .dossier-layout-grid {
        align-items: start;
    }
    .dossier-sidebar-col {
        align-self: stretch;
    }
    .dossier-sidebar-sticky {
        position: sticky !important;
        top: 6rem !important;
    }
}
@media (max-width: 1023px) {
    .dossier-sidebar-sticky {
        position: static !important;
    }
}

/* --- MAPA UBICACIÓN (altura fija para que Google Maps se renderice) --- */
#company-location-map {
    height: 450px;
    min-height: 450px;
}

/* --- BOTONES CONTACTO DIRECTO (teléfono = borde corporativo, WhatsApp = borde verde, ancho completo, bordes redondeados) --- */
.dossier-btn-phone {
    border: 2px solid var(--primary, #4f46e5);
    color: var(--primary, #4f46e5);
}
.dossier-btn-phone:hover {
    background-color: #f8fafc !important;
}
.dossier-btn-whatsapp {
    border: 2px solid #25D366;
    color: #25D366;
}
.dossier-btn-whatsapp:hover {
    background-color: #f0fdf4 !important;
}

/* --- MÓDULO EFICIENCIA ENERGÉTICA --- */
.energy-info-box {
    border: 2px solid var(--primary, #18b058);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}
.energy-info-box p {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0;
}
.energy-info-box p + p {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.energy-info-box::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: calc(21.4286% - 12px);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--primary, #18b058);
}
.energy-bar {
    display: flex;
    width: 100%;
    height: 35px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
}
.bar-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
}

/* --- BOTONES DOCUMENTACIÓN --- */
.docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}
.doc-button {
    background-color: #e0faf4;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}
.doc-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.doc-icon {
    width: 50px;
    height: 50px;
    margin-right: 20px;
}
.doc-text h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #333;
}
.doc-text span {
    font-size: 12px;
    color: #777;
}
@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MODAL CONTACTO (encima del lightbox) --- */
#dossier-contact-modal {
    z-index: 10001;
}