/* ============================================================
   QHidrico Portal – app.css
   ============================================================ */

/* --- Base & Fonts --- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fff;
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Utility */
.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }

/* ============================================================
   NAVBAR
============================================================ */
.qh-navbar {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.qh-navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.qh-brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.qh-brand-accent { color: #38bdf8; }

.qh-nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.qh-nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.08);
}

.qh-btn-whatsapp {
    background: #25d366;
    color: white !important;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.qh-btn-whatsapp:hover {
    background: #20ba58;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    color: white !important;
}

.qh-btn-admin {
    background: #0ea5e9;
    color: white !important;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.qh-btn-admin:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14,165,233,0.4);
    color: white !important;
}

/* ============================================================
   HERO SECTION
============================================================ */
.qh-hero {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #0c3a6e 45%, #0ea5e9 100%);
    min-height: 100vh;
    overflow: hidden;
}

.qh-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(56,189,248,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(14,165,233,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Animated bubbles */
.qh-water-animation { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.qh-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(56,189,248,0.06);
    border: 1px solid rgba(56,189,248,0.12);
    animation: float-bubble 12s infinite ease-in-out;
}

.qh-bubble:nth-child(1) { width: 80px; height: 80px; left: 10%; top: 20%; animation-delay: 0s; animation-duration: 15s; }
.qh-bubble:nth-child(2) { width: 50px; height: 50px; left: 30%; top: 60%; animation-delay: 2s; animation-duration: 12s; }
.qh-bubble:nth-child(3) { width: 120px; height: 120px; left: 60%; top: 30%; animation-delay: 4s; animation-duration: 18s; }
.qh-bubble:nth-child(4) { width: 40px; height: 40px; left: 75%; top: 65%; animation-delay: 1s; animation-duration: 10s; }
.qh-bubble:nth-child(5) { width: 90px; height: 90px; left: 85%; top: 15%; animation-delay: 3s; animation-duration: 14s; }
.qh-bubble:nth-child(6) { width: 60px; height: 60px; left: 50%; top: 80%; animation-delay: 5s; animation-duration: 11s; }

@keyframes float-bubble {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    33% { transform: translateY(-30px) rotate(120deg); opacity: 0.7; }
    66% { transform: translateY(15px) rotate(240deg); opacity: 0.5; }
}

.qh-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(56,189,248,0.15);
    border: 1px solid rgba(56,189,248,0.3);
    color: #7dd3fc;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.qh-hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: white;
    letter-spacing: -1px;
}

.qh-title-highlight {
    color: #38bdf8;
    display: inline-block;
    position: relative;
}

.qh-title-highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, transparent);
    border-radius: 2px;
}

.qh-hero-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 520px;
}

.qh-btn-primary-hero {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white !important;
    border: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.qh-btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14,165,233,0.5);
    color: white !important;
}

.qh-btn-ghost {
    background: rgba(255,255,255,0.08);
    color: white !important;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.qh-btn-ghost:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    color: white !important;
}

.qh-hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.qh-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.qh-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.qh-stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    font-weight: 500;
}

.qh-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

.qh-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qh-treatment-diagram {
    width: 100%;
    max-width: 520px;
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.qh-wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.qh-wave-bottom svg { display: block; width: 100%; height: 80px; }

/* ============================================================
   FEATURES STRIP
============================================================ */
.bg-light-blue { background: #f0f9ff; }

.qh-feature-chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.qh-feature-chip i { font-size: 1.1rem; }

/* ============================================================
   SECTIONS
============================================================ */
.qh-section { background: white; }
.qh-section-alt { background: #f8fafc; }

.qh-section-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.qh-badge-green { background: #dcfce7; color: #166534; }
.qh-badge-orange { background: #ffedd5; color: #9a3412; }

.qh-section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.qh-section-subtitle {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

/* Map card */
.qh-map-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.qh-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 10px;
}

.qh-mini-stat strong { font-size: 1.4rem; line-height: 1; }
.qh-mini-stat small { font-size: 0.7rem; color: #64748b; }

/* Feature cards */
.qh-feature-card {
    padding: 1.5rem;
    border-radius: 16px;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qh-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.qh-fc-blue { background: #eff6ff; border: 1px solid #bfdbfe; }
.qh-fc-green { background: #f0fdf4; border: 1px solid #bbf7d0; }
.qh-fc-orange { background: #fff7ed; border: 1px solid #fed7aa; }
.qh-fc-purple { background: #faf5ff; border: 1px solid #e9d5ff; }

.qh-fc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.875rem;
}

.qh-fc-blue .qh-fc-icon { background: #dbeafe; color: #1d4ed8; }
.qh-fc-green .qh-fc-icon { background: #dcfce7; color: #16a34a; }
.qh-fc-orange .qh-fc-icon { background: #ffedd5; color: #ea580c; }
.qh-fc-purple .qh-fc-icon { background: #ede9fe; color: #7c3aed; }

.qh-feature-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.qh-feature-card p {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Table preview */
.qh-table-preview {
    border: 1px solid #e2e8f0;
}

/* ============================================================
   BITACORAS
============================================================ */
.qh-bitacora-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: white;
}

.qh-bitacora-header {
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    padding: 1.25rem 1.5rem;
}

.qh-field-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    padding: 0;
}

.qh-param-row {
    display: flex;
    gap: 1rem;
}

.qh-param-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.qh-param-label { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.qh-param-value { font-size: 0.95rem; font-weight: 700; }

.qh-params-grid { }
.qh-param-bar { }

.qh-obs-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}

/* Info cards */
.qh-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.qh-info-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.qh-info-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.bg-blue-subtle { background: #eff6ff; }
.text-purple { color: #7c3aed; }
.bg-purple-subtle { background: #faf5ff; }

.qh-info-card h6 { font-size: 0.9rem; font-weight: 700; color: #0f172a; }
.qh-info-card p { font-size: 0.82rem; line-height: 1.5; }

.qh-regulation-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.qh-regulation-box li { padding: 0.2rem 0; }

/* ============================================================
   REPORTS
============================================================ */
.qh-report-nav {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.qh-report-nav-title {
    padding: 1rem 1.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.qh-report-nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
    gap: 0.5rem;
}

.qh-report-nav-item:last-child { border-bottom: none; }
.qh-report-nav-item:hover { background: #f8fafc; }

.qh-report-nav-item.active {
    background: #eff6ff;
    border-left: 3px solid #0ea5e9;
}

.qh-report-nav-item > div:first-of-type { flex: 1; }
.qh-report-nav-item .fw-semibold { font-size: 0.85rem; color: #0f172a; }

/* Report preview */
.qh-report-preview {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.qh-report-header-bar {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.qh-report-logo { flex-shrink: 0; }

.qh-report-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.qh-kpi-value { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.qh-kpi-label { font-size: 0.7rem; color: #64748b; margin-top: 0.2rem; text-align: center; }

.qh-compliance-chart { display: flex; flex-direction: column; gap: 0.75rem; }

.qh-compliance-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qh-cr-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    min-width: 80px;
}

.qh-cr-bar {
    flex: 1;
    height: 28px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.qh-cr-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    transition: width 1s ease;
}

.qh-cr-fill.bg-warning {
    background: linear-gradient(90deg, #f59e0b, #d97706) !important;
}

.qh-cr-pct { font-size: 0.75rem; font-weight: 700; color: white; }

.qh-cr-status { font-size: 1.1rem; min-width: 24px; text-align: center; }

.qh-report-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

/* Entity cards */
.qh-entity-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.qh-entity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #bfdbfe;
}

.qh-entity-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.qh-entity-name { font-weight: 800; color: #0f172a; font-size: 1.1rem; margin-bottom: 0.25rem; }
.qh-entity-desc { font-size: 0.75rem; color: #64748b; line-height: 1.4; }

/* ============================================================
   CTA BANNER
============================================================ */
.qh-cta-banner {
    background: linear-gradient(135deg, #0c3a6e, #0ea5e9);
    position: relative;
    overflow: hidden;
}

.qh-cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
}

/* ============================================================
   FOOTER
============================================================ */
.qh-footer {
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.qh-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.qh-footer-links a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.qh-footer-links a:hover { color: white; }

.qh-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.12);
}

.qh-social-btn:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-2px);
}

.qh-footer-made {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.qh-heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.qh-noverti-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.qh-noverti-link:hover { color: #7dd3fc; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991px) {
    .qh-hero-stats { gap: 1rem; }
    .qh-stat-num { font-size: 1.4rem; }
    #navbarContent { padding: 1rem 0; }
    .qh-btn-whatsapp, .qh-btn-admin { width: 100%; justify-content: center; }
}

@media (max-width: 767px) {
    .qh-hero-title { font-size: 2rem; }
    .qh-section-title { font-size: 1.7rem; }
    .qh-compliance-row { flex-wrap: wrap; }
    .qh-cr-label { min-width: 60px; font-size: 0.75rem; }
    .qh-report-footer-bar { flex-direction: column; }
}

/* Blazor error boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after { content: "Ha ocurrido un error."; }
