/*
 * Al Qasswa — shared UI layer for the public site.
 * Loaded after the page styles, so it sets one consistent look for headings, buttons,
 * form fields and page headers without rewriting each page's own CSS.
 */

:root {
    --aq-brand: #5d2e8f;          /* header / primary actions */
    --aq-brand-600: #6b4694;      /* headings, links */
    --aq-brand-50: #f6f1fb;       /* tinted backgrounds */
    --aq-gold: #d4af37;           /* accents */
    --aq-ink: #1e293b;            /* body text */
    --aq-muted: #64748b;          /* secondary text */
    --aq-line: #e9e4f0;           /* borders */
    --aq-surface: #ffffff;
    --aq-bg: #f8f7fb;
    --aq-radius: 14px;
    --aq-radius-sm: 10px;
    --aq-shadow: 0 10px 30px rgba(45, 20, 80, 0.08);
    --aq-shadow-hover: 0 16px 40px rgba(45, 20, 80, 0.14);
    --aq-heading-font: 'Montserrat-Arabic', 'Tajawal', sans-serif;
}

/* Jump links and focus land below the fixed header instead of under it */
html {
    scroll-padding-top: 96px;
}

/* Visible keyboard focus everywhere (mouse clicks are unaffected) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.85);
    outline-offset: 2px;
}

::selection {
    background: rgba(93, 46, 143, 0.18);
}

/* ---------- Section headings ---------- */

.aq-section-head {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 720px;
}

.aq-section-head h2,
.projects-section .section-heading h2,
.location-section .section-title {
    font-family: var(--aq-heading-font);
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    font-weight: 800;
    color: var(--aq-brand-600);
    letter-spacing: 0;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.aq-section-head h2::after,
.projects-section .section-heading h2::after,
.location-section .section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 56px;
    height: 4px;
    border-radius: 4px;
    background: var(--aq-gold);
    transform: translateX(-50%);
}

.projects-section .section-heading .section-subtitle {
    color: var(--aq-muted);
    font-size: 1.05rem;
    margin: 0;
}

.aq-section-head p {
    text-wrap: balance;
    color: var(--aq-muted);
    font-size: 1.05rem;
    margin: 0;
}

.aq-section-head.is-light h2 {
    color: #fff;
}

.aq-section-head.is-light p {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Page header (inner pages) ---------- */

.aq-page-header {
    background:
        radial-gradient(circle at 15% 0%, rgba(212, 175, 55, 0.12), transparent 45%),
        linear-gradient(180deg, var(--aq-brand-50), #fff);
    border-bottom: 1px solid var(--aq-line);
    padding: 44px 0 36px;
    text-align: center;
}

.aq-page-header .aq-breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--aq-muted);
}

.aq-page-header .aq-breadcrumb a {
    color: var(--aq-brand-600);
    text-decoration: none;
}

.aq-page-header .aq-breadcrumb li + li::before {
    content: '/';
    margin-inline-end: 8px;
    color: #c4b8d6;
}

.aq-page-header h1 {
    font-family: var(--aq-heading-font);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 800;
    color: var(--aq-ink);
    margin: 0 0 8px;
}

.aq-page-header p {
    text-wrap: balance;
    color: var(--aq-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
}

/* ---------- Buttons ---------- */

.aq-btn,
.btn-purple,
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--aq-brand);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.aq-btn:hover,
.btn-purple:hover,
.btn-submit:hover {
    background: var(--aq-brand-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(93, 46, 143, 0.25);
}

.aq-btn-gold {
    background: var(--aq-gold);
}

.aq-btn-gold:hover {
    background: #c39d27;
}

.aq-btn-outline {
    background: transparent;
    border-color: var(--aq-brand);
    color: var(--aq-brand);
}

.aq-btn-outline:hover {
    background: var(--aq-brand);
    color: #fff;
}

/* ---------- Form fields (public pages) ---------- */

main .form-control,
main .form-select {
    min-height: 46px;
    border-radius: var(--aq-radius-sm);
    border-color: #dcd4e7;
}

main textarea.form-control {
    min-height: 110px;
}

main .form-control:focus,
main .form-select:focus {
    border-color: var(--aq-brand-600);
    box-shadow: 0 0 0 4px rgba(107, 70, 148, 0.15);
}

main .form-label {
    font-weight: 600;
    color: var(--aq-ink);
}

main .invalid-feedback {
    font-size: 0.875rem;
}

/* ---------- Cards ---------- */

.aq-card {
    background: var(--aq-surface);
    border: 1px solid var(--aq-line);
    border-radius: var(--aq-radius);
    box-shadow: var(--aq-shadow);
}

/* ---------- Header ---------- */

/* Desktop: logo | four sections, evenly spaced | account + call to action */
@media (min-width: 992px) {
    /* Equal-width sides keep the menu centred on the page, not just between logo and buttons */
    .alqasswa-center-cell {
        flex: 0 0 auto !important;
        justify-content: center !important;
        margin: 0 24px !important;
    }

    .alqasswa-right-cell,
    .alqasswa-left-cell {
        flex: 1 1 0 !important;
        min-width: max-content;
        margin: 0 !important;
    }

    .alqasswa-center-cell .alqasswa-main-nav {
        flex: 1 1 auto;
    }

    .alqasswa-center-cell .navbar-collapse {
        justify-content: center;
    }

    .alqasswa-navbar-nav {
        justify-content: center !important;
        gap: 6px !important;
        width: auto !important;
    }

    .alqasswa-nav-item {
        position: relative;
    }

    .alqasswa-nav-link {
        position: relative;
        padding: 10px 16px !important;
        border-radius: 999px;
        font-size: 16px !important;
        transition: background 0.2s ease;
    }

    .alqasswa-nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff !important;
    }

    /* Current section: a small gold bar under the label */
    .alqasswa-nav-link.active {
        color: #fff !important;
    }

    .alqasswa-nav-link.active::before {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 2px;
        width: 22px;
        height: 3px;
        border-radius: 3px;
        background: var(--aq-gold);
        transform: translateX(-50%);
    }

    /* Dropdowns: a clean card under the section title */
    .alqasswa-nav-item.dropdown > .dropdown-menu {
        top: 100%;
        margin-top: 10px;
        min-width: 230px;
        padding: 8px;
        border: 1px solid var(--aq-line);
        border-radius: 14px;
        box-shadow: 0 18px 40px rgba(30, 10, 60, 0.18);
    }

    /* Invisible bridge so the menu stays open while the pointer moves down to it */
    .alqasswa-nav-item.dropdown > .dropdown-menu::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: -12px;
        height: 12px;
    }

    .alqasswa-nav-item.dropdown > .dropdown-menu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 15px;
        color: var(--aq-ink);
    }

    .alqasswa-nav-item.dropdown > .dropdown-menu .dropdown-item i {
        width: 18px;
        text-align: center;
        color: var(--aq-brand-600);
    }

    .alqasswa-nav-item.dropdown > .dropdown-menu .dropdown-item:hover {
        background: var(--aq-brand-50);
        color: var(--aq-brand);
    }
}

/* Account link and call to action */
.aq-nav-actions {
    align-items: center;
    gap: 10px;
}

.aq-nav-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 7px 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.aq-nav-account:hover,
.aq-nav-account.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    color: #fff;
}

.aq-nav-actions .dropdown-menu {
    padding: 8px;
    border: 1px solid var(--aq-line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(30, 10, 60, 0.18);
    text-align: right;
}

.aq-nav-actions .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--aq-ink);
}

.aq-nav-actions .dropdown-item:hover {
    background: var(--aq-brand-50);
    color: var(--aq-brand);
}

.aq-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 20px;
    border-radius: 999px;
    background: var(--aq-gold);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
}

.aq-nav-cta:hover {
    background: #c39d27;
    color: #fff;
    transform: translateY(-1px);
}

/* Small laptops: keep the four sections roomy by dropping the action icons */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .alqasswa-nav-link {
        padding: 10px 12px !important;
    }

    .aq-nav-account i,
    .aq-nav-cta i {
        display: none;
    }
}

/* Phones and tablets */
@media (max-width: 991.98px) {
    /* The full logo is very tall on phones */
    .alqasswa-navbar-brand img {
        max-height: 48px;
        width: auto;
    }

    .alqasswa-nav-link {
        padding: 12px 0 !important;
        font-size: 17px !important;
    }

    .aq-nav-actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
        padding: 16px 20px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .aq-nav-actions-mobile .aq-nav-account,
    .aq-nav-actions-mobile .aq-nav-cta {
        justify-content: center;
        width: 100%;
        min-height: 48px;
    }

    .aq-nav-actions-mobile .dropdown {
        width: 100%;
    }

    .aq-nav-actions-mobile .dropdown-menu {
        position: static !important;
        transform: none !important;
        margin-top: 6px;
        background: #fff;
    }
}

/* ---------- Floating contact button ---------- */

@media (max-width: 768px) {
    .fab-wrap {
        left: 16px !important;
        bottom: 16px !important;
    }

    .fab-main {
        width: 52px !important;
        height: 52px !important;
        font-size: 20px !important;
    }

    /* Keep the last footer lines clear of the floating button */
    footer.footer {
        padding-bottom: 72px;
    }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
