/* ══════════════════════════════════════════════════════════════
   RHA Construction Ltd — Custom Styles
   ══════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
    background: rgba(184, 134, 11, 0.3);
    color: #ffffff;
}

/* ── HTMX transitions ─────────────────────────────────────── */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline-flex;
}
.htmx-request.htmx-indicator {
    display: inline-flex;
}
.htmx-indicator-hide {
    display: inline-flex;
}
.htmx-request .htmx-indicator-hide {
    display: none;
}
.htmx-request.htmx-indicator-hide {
    display: none;
}

/* Smooth page transitions */
.htmx-swapping {
    opacity: 0;
    transition: opacity 150ms ease;
}

/* ── Navigation scroll effect ─────────────────────────────── */
#main-nav.scrolled {
    border-bottom-color: rgba(201, 150, 44, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Active nav link */
.nav-link.active {
    color: #c9962c;
}

/* ── Line clamp fallback ──────────────────────────────────── */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Scrollbar styling ────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #1a335f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9962c;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ── Animate on scroll (simple intersection observer) ─────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Service overlay scrollbar ────────────────────────────── */
#service-detail-panel::-webkit-scrollbar {
    width: 4px;
}
#service-detail-panel::-webkit-scrollbar-track {
    background: transparent;
}
#service-detail-panel::-webkit-scrollbar-thumb {
    background: rgba(201, 150, 44, 0.3);
    border-radius: 2px;
}

/* ── Focus ring ───────────────────────────────────────────── */
*:focus-visible {
    outline: 2px solid rgba(201, 150, 44, 0.5);
    outline-offset: 2px;
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
    nav, footer, #service-detail-overlay {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
