/* Global layout and home styles extracted from layout.blade.php */
html,
body {
    overflow-x: hidden;
}
/* Sticky footer: body as 3-row grid (header, main, footer) */
body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh; /* fallback */
}

/* Prefer dynamic viewport units when supported */
@supports (min-height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}

:root {
    /* Map accent to brand for components that use generic accent */
    --accent: var(--brand-primary);
    --accent-ink: var(--brand-primary-ink);
    /* Transition durations for consistency */
    --transition-fast: 200ms;
    --transition-base: 300ms;
}

[x-cloak] {
    display: none !important;
}

/* ========================================
   ACCESSIBILITY & MOTION PREFERENCES
   ======================================== */

/* Respect user motion preferences - disable/slow animations for motion-sensitive users */
@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;
    }

    /* Disable AOS animations */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Focus indicators for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove outline for mouse users but keep for keyboard */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth transitions for interactive elements */
a,
button,
.btn,
.card,
.worker-card,
.nav-link {
    transition: all var(--transition-base) ease;
}

/* ========================================
   ENHANCED HOVER & INTERACTIVE STATES
   ======================================== */

/* Card hover effects */
.card:hover,
.worker-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.15);
}

/* Button hover consistency */
.btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.25);
}

.btn:not(:disabled):active {
    transform: translateY(0);
}

/* Link hover effects */
a:not(.btn):hover {
    text-decoration: underline;
    color: var(--brand-primary-hover);
}

/* Navigation link enhancements */
.nav-link:hover,
.primary-nav a:hover {
    color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), 0.08);
    border-radius: var(--radius-sm);
}

/* ========================================
   RTL ICON MIRRORING
   ======================================== */

/* Mirror directional icons for RTL */
[dir="rtl"] .bx-chevron-right,
[dir="rtl"] .bx-chevron-left,
[dir="rtl"] .bx-arrow-back,
[dir="rtl"] .bx-arrow-forward,
[dir="rtl"] .bx-right-arrow-alt,
[dir="rtl"] .bx-left-arrow-alt {
    transform: scaleX(-1);
}

/* Keep symmetrical icons unchanged */
[dir="rtl"] .bx-heart,
[dir="rtl"] .bx-search,
[dir="rtl"] .bx-user,
[dir="rtl"] .bx-menu,
[dir="rtl"] .bx-bookmark,
[dir="rtl"] .bx-star {
    transform: none;
}

/* ========================================
   FORM VALIDATION FEEDBACK
   ======================================== */

/* Valid input feedback */
.form-control:valid:not(:placeholder-shown) {
    border-color: #16a34a;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2316a34a' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1rem;
    padding-left: 2.5rem;
}

[dir="rtl"] .form-control:valid:not(:placeholder-shown) {
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    padding-left: 0.75rem;
}

/* Invalid input feedback */
.form-control:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc2626'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc2626' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1rem;
    padding-left: 2.5rem;
}

[dir="rtl"] .form-control:invalid:not(:placeholder-shown) {
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    padding-left: 0.75rem;
}

/* Required field indicator */
.form-label .text-danger {
    color: #dc2626;
    margin-inline-start: 0.25rem;
}

/* Help text styling */
.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: #64748b;
}

/* ========================================
   LOADING INDICATORS
   ======================================== */

/* Spinner animation - slowed down for accessibility */
@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    animation: spinner-border 1.2s linear infinite;
}

/* Respect reduced motion - show static indicator instead */
@media (prefers-reduced-motion: reduce) {
    .spinner-border {
        animation: none;
        border-top-color: transparent;
        border-right-color: transparent;
        border-bottom-color: currentColor;
        border-left-color: currentColor;
    }
}

/* Footer */
footer {
    background: radial-gradient(
            1000px 500px at 20% 0%,
            rgba(var(--brand-primary-rgb), 0.06),
            transparent 60%
        ),
        #0b1220;
    color: #e2e8f0;
    padding: 40px 0 56px; /* more bottom padding */
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

footer h5,
footer h6 {
    color: #fff;
}

footer a {
    color: #cbd5e1;
}
footer a:hover {
    color: var(--brand-primary);
}

.footer-social .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    place-items: center;
    color: #e2e8f0;
    transition: 0.2s ease;
}
.footer-social .icon-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
.footer-social .icon-btn i {
    font-size: 18px;
}
.footer-social a[aria-label="Facebook"] {
    background: rgba(24, 119, 242, 0.12);
    color: #e2e8f0;
}
.footer-social a[aria-label="X"] {
    background: rgba(29, 161, 242, 0.12);
}
.footer-social a[aria-label="Instagram"] {
    background: rgba(225, 48, 108, 0.12);
}
.footer-social a[aria-label="LinkedIn"] {
    background: rgba(10, 102, 194, 0.12);
}
.footer-social a[aria-label="YouTube"] {
    background: rgba(255, 0, 0, 0.12);
}
.footer-social a[aria-label="WhatsApp"] {
    background: rgba(37, 211, 102, 0.12);
}
.footer-social a[aria-label="Telegram"] {
    background: rgba(0, 136, 204, 0.12);
}

/* Decorative underline/dots under small headings */
.title-decor {
    position: relative;
    display: inline-block;
    padding-bottom: 0.4rem;
}
.title-decor::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        rgba(var(--brand-primary-rgb), 0.25),
        rgba(148, 163, 184, 0.15)
    );
}

/* Fixed header */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    padding: 14px 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    backdrop-filter: saturate(180%) blur(10px);
}
.navbar .inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.navbar .right-wrap {
    order: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.navbar .primary-nav {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Default to hidden; shown only on xl+ via media query to avoid mid-width overlap */
    display: none;
    align-items: center;
}
.navbar .left-wrap {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
/* Navbar links (desktop) */
.navbar .primary-nav a {
    color: var(--brand-ink);
    font-weight: 700;
    padding: 8px 6px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.navbar .primary-nav a:hover {
    color: var(--brand-primary);
    border-bottom-color: rgba(var(--brand-primary-rgb), 0.4);
}
.navbar .primary-nav a.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}
.navbar .primary-nav a:focus-visible {
    outline: none;
    border-bottom-color: var(--brand-primary);
}
/* Show centered primary nav on xl and above only */
@media (min-width: 1200px) {
    .navbar .primary-nav {
        display: flex;
    }
}

main {
    padding-top: var(--header-h, 72px);
}

/* Hero */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-h, 72px));
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    /* Enhanced overlay for better contrast - WCAG AA compliance */
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.7),
        rgba(15, 23, 42, 0.55)
    );
    z-index: 1;
}
.hero .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(1.05) contrast(1.05);
    z-index: 0;
}
.hero .hero-bg-next {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(1.05) contrast(1.05);
    opacity: 0;
    transition: opacity 0.6s ease;
    /* keep behind gradient overlay (::after has z-index:1) and content (z-index:2) */
    z-index: 0;
}
.hero .hero-bg-next.show {
    opacity: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}
.hero .display-5,
.hero h1 {
    color: #fff;
    text-shadow: 0 2px 10px rgba(2, 8, 23, 0.35);
}
.hero .lead {
    color: #f1f5f9;
    text-shadow: 0 1px 8px rgba(2, 8, 23, 0.3);
}

/* Filter card + Select2 */
.filter-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(2, 8, 23, 0.12);
}
.filter-card .form-control,
.filter-card .form-select,
.filter-card .select2-container .select2-selection {
    height: 48px;
    border-radius: 8px;
    border-color: var(--brand-border);
    background: #fff;
    box-shadow: none;
}
.filter-card .form-label {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}
.filter-card .form-control::placeholder,
.filter-card .select2-selection__placeholder {
    color: #94a3b8;
}
.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.15rem rgba(var(--brand-primary-rgb), 0.15);
}

/* Fieldset styling for grouped form fields */
.age-range-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.age-range-fieldset legend {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding: 0;
}

.filter-field {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
}

/* Responsive improvements for filter card on mobile */
@media (max-width: 767.98px) {
    .filter-card {
        padding: 1rem !important;
    }

    .filter-card .row {
        gap: 0.75rem !important;
    }

    /* Stack filters vertically on mobile */
    .filter-card .col-6,
    .filter-card .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Full width button on mobile */
    .filter-card button[type="submit"] {
        width: 100%;
    }
}

.select2-container--default .select2-selection--single {
    border: 1px solid var(--brand-border);
    height: 48px;
    border-radius: 8px;
    background: #fff;
}
.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    line-height: 46px;
    padding-inline: 12px;
}
.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 46px;
    right: 8px;
    left: auto;
}
[dir="rtl"]
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    right: auto;
    left: 8px;
}
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.15rem rgba(var(--brand-primary-rgb), 0.18);
}
.select2-dropdown {
    border-color: var(--brand-border) !important;
    border-radius: 8px !important;
    overflow: hidden;
}
.select2-container--default
    .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(var(--brand-primary-rgb), 0.12);
    color: var(--brand-ink);
}
.select2-search--dropdown .select2-search__field {
    border-color: var(--brand-border) !important;
    border-radius: 6px !important;
}

/* Worker card */
.worker-card {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md, 10px);
    /* allow avatar to protrude outside the card */
    overflow: visible;
    position: relative;
    background: #fff;
    transition: 0.24s ease;
    box-shadow: 0 4px 12px rgba(2, 8, 23, 0.06);
    /* responsive avatar size */
    --avatar-size: clamp(88px, 22vw, 120px);
    /* small local offset; main separation handled by grid row-gap */
    margin-top: 10px;
}
.worker-card::before {
    /* mask piece to hide the card's top border under the avatar
       so the avatar reads like a continuation of the card */
    content: "";
    position: absolute;
    top: calc(var(--avatar-size) * -0.5 - 1px);
    right: 12px;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    background: #fff; /* same as card background */
    pointer-events: none;
    z-index: 1; /* below avatar, above card border */
}
.worker-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 8, 23, 0.08);
}
.worker-card > a {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.worker-figure {
    position: absolute;
    top: calc(var(--avatar-size) * -0.5); /* half outside */
    right: 12px; /* stick to top-right */
    width: var(--avatar-size);
    height: var(--avatar-size);
    background: #f8fafc;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    /* border is drawn by ::after for top half only */
}
.worker-figure::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--brand-border);
    /* show only the top half of the circular border */
    clip-path: inset(0 0 50% 0);
    pointer-events: none;
}
.worker-figure img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
}
.worker-overlay {
    display: none; /* not needed for circular avatar */
}
.fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(2, 8, 23, 0.08);
    display: grid;
    place-items: center;
    color: #0f172a;
}
[dir="rtl"] .fav-btn {
    right: auto;
    left: 12px;
}
.fav-btn:hover {
    background: #fff;
}
.worker-body {
    padding: 12px 12px 14px;
    /* provide space for the protruding avatar */
    padding-top: calc(var(--avatar-size) / 2 + 16px);
    /* no need for extra right padding; keep default */
    padding-right: 12px;
}
.worker-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    min-height: 20px;
}
.worker-meta {
    font-size: 12px;
    color: #475569;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.worker-meta i {
    color: #94a3b8;
    font-size: 16px;
}
.tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    overflow: hidden;
    max-width: 100%;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(var(--brand-primary-rgb), 0.08);
    color: var(--accent-ink);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.25);
}
.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--brand-primary-rgb), 0.15) inset;
}
.card-actions {
    display: flex;
    justify-content: space-evenly;
    gap: 8px;
    margin-top: 10px;
}

/* Icon button (header menu) */
.btn-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    line-height: 1;
    border-radius: 10px;
    border: 1px solid var(--brand-border);
    background: #fff;
    color: var(--brand-ink);
    display: inline-grid;
    place-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.btn-icon i {
    font-size: 22px;
    line-height: 1;
    display: block;
    pointer-events: none;
}
.btn-icon:hover {
    filter: brightness(0.98);
}

/* Buttons */
.btn-primary-soft {
    color: #fff;
    background: var(--accent, var(--brand-primary, #10b981));
    border: 1px solid var(--accent, var(--brand-primary, #10b981));
}
.btn-primary-soft:hover {
    filter: brightness(0.95);
}
.btn-outline-muted {
    color: #0f172a;
    background: transparent;
    border: 1px solid #e2e8f0;
}
.btn-outline-muted:hover {
    background: #f8fafc;
}

/* fixed heights for alignment */
.worker-card .tags {
    min-height: 30px;
}
.worker-card .card-actions {
    min-height: 40px;
}

/* Offcanvas (mobile sidebar) */
.offcanvas {
    width: 300px;
    max-width: 90vw;
}
.offcanvas-header {
    border-bottom: 1px solid var(--brand-border);
}
.offcanvas-body nav a {
    padding: 0.75rem 0;
    font-weight: 600;
    color: var(--brand-ink);
}
.offcanvas-body nav a {
    display: inline-block;
    border-bottom: 2px solid transparent;
}
.offcanvas-body nav a:hover {
    color: var(--brand-primary);
    border-bottom-color: rgba(var(--brand-primary-rgb), 0.4);
}
.offcanvas-body nav a.active {
    color: var(--brand-primary);
    font-weight: 800;
    border-bottom-color: var(--brand-primary);
}
.offcanvas .btn-close {
    filter: grayscale(1);
    opacity: 0.6;
}

/* Company sections */
.feature-card {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    background: rgba(var(--brand-primary-rgb), 0.1);
    color: var(--brand-primary);
    font-weight: 800;
}
.service-card {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fff, #f8fafc);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.service-badge {
    display: inline-block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--brand-primary-ink);
    background: rgba(var(--brand-primary-rgb), 0.12);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.3);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}
/* Section spacing improvements */
section {
    padding: 3rem 0;
}

section.py-5 {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    section {
        padding: 4rem 0;
    }

    section.py-5 {
        padding: 5rem 0;
    }
}

.section-accent {
    background: linear-gradient(
        180deg,
        rgba(var(--brand-primary-rgb), 0.08),
        rgba(2, 8, 23, 0.02)
    );
}
.stat-number {
    font-weight: 900;
    font-size: 1.6rem;
}
.stat-label {
    opacity: 0.9;
}
/* Simple stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.partner-tile {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    background: #fff;
    height: 64px;
    display: grid;
    place-items: center;
    color: var(--brand-muted);
}
.section-cta {
    background: linear-gradient(
        180deg,
        rgba(var(--brand-primary-rgb), 0.06),
        #fff
    );
}
.cta-box {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    box-shadow: var(--shadow-md);
}
@media (max-width: 575.98px) {
    .cta-box {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Workers grid row spacing so protruding avatars don't collide between rows */
.worker-grid {
    /* ensure consistent avatar size variable here for calculations */
    --avatar-size: clamp(88px, 22vw, 120px);
    /* add top margin so first-row avatars don't touch the section above */
    margin-top: calc(var(--avatar-size) * 0.5 + 16px);
    /* increase vertical gutter */
    row-gap: calc(var(--avatar-size) * 0.6 + 24px) !important;
}

/* Responsive map wrapper keeps iframe full height */
.map-wrapper {
    min-height: 320px;
}
@media (min-width: 768px) {
    .map-wrapper {
        min-height: 380px;
    }
}

/* Map overlay */
.map-overlay {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 20px rgba(2, 8, 23, 0.12);
    z-index: 3;
}

/* Pagination (Laravel Bootstrap) */
.pagination {
    /* Bootstrap uses flex; add spacing and consistent size */
    display: flex;
    gap: 8px;
    --pg-size: 40px;
}
.pagination .page-link {
    min-width: var(--pg-size);
    min-height: var(--pg-size);
    display: grid;
    place-items: center;
    padding: 0 12px;
    font-weight: 700;
    color: var(--brand-ink);
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: 0.15s ease;
}
.pagination .page-link:hover {
    color: var(--brand-primary);
    border-color: rgba(var(--brand-primary-rgb), 0.6);
}
.pagination .page-link:focus {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.15rem rgba(var(--brand-primary-rgb), 0.2);
}
.pagination .page-item.active .page-link {
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 6px 18px rgba(var(--brand-primary-rgb), 0.22);
}
.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
    border-color: var(--brand-border);
    opacity: 0.7;
}
/* Keep ends rounded but equal to others (no Bootstrap pill ends) */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: var(--radius-md);
}
@media (min-width: 768px) {
    .pagination {
        --pg-size: 44px;
    }
}

/* Recruitment stepper */
.stepper {
    --dot: 16px;
    --gap: 10px;
    --track: 2px;
    display: flex;
    gap: var(--gap);
}
.stepper--sm {
    --dot: 18px;
    --track: 2px;
}
.stepper--lg {
    --dot: 28px;
    --track: 3px;
}
.stepper--horizontal {
    align-items: stretch;
    gap: 0; /* remove inter-item gap only for horizontal layout */
}
.stepper--vertical {
    flex-direction: column;
}
.stepper__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stepper--horizontal .stepper__item {
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.stepper__dot {
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    border: 2px solid var(--brand-border);
    background: #fff;
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--brand-muted);
}
.stepper__dot::after {
    content: attr(data-step);
    font-size: 0.8rem;
    line-height: 1;
}
.stepper__item.is-complete .stepper__dot {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.2);
    color: #fff;
}
.stepper__item.is-complete .stepper__dot::after {
    content: "\2713";
    color: #fff;
    font-size: 0.9rem;
}
.stepper__item.is-current .stepper__dot {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.18);
}
.stepper__label {
    font-size: 12px;
    color: var(--brand-ink);
}
.stepper--horizontal .stepper__label {
    margin-top: 8px;
    max-width: 140px;
    line-height: 1.25;
    word-break: keep-all;
}
.stepper--horizontal .stepper__item::before,
.stepper--horizontal .stepper__item::after {
    content: "";
    position: absolute;
    top: calc(var(--dot) / 2 - var(--track) / 2);
    height: var(--track);
    background: var(--brand-border);
    z-index: 0;
}
.stepper--horizontal .stepper__item::before {
    inset-inline-end: calc(50% + var(--dot) / 2);
    inset-inline-start: 0;
}

.stepper--horizontal .stepper__item::after {
    inset-inline-end: 0;
    inset-inline-start: calc(50% + var(--dot) / 2);
}
.stepper--horizontal .stepper__item:first-child::before {
    display: none;
}
.stepper--horizontal .stepper__item:last-child::after {
    display: none;
}

.stepper--horizontal .stepper__item.is-complete::before,
.stepper--horizontal .stepper__item.is-complete::after,
.stepper--horizontal .stepper__item.is-current::before {
    background: rgba(var(--brand-primary-rgb), 0.5);
}

.stepper--vertical .stepper__item {
    align-items: flex-start;
    padding-bottom: 8px;
}
.stepper--vertical .stepper__item::after {
    content: "";
    position: absolute;
    inset-inline-start: calc(var(--dot) / 2 - var(--track) / 2);
    top: var(--dot);
    bottom: -12px; /* small extend */
    width: var(--track);
    background: var(--brand-border);
}
.stepper--vertical .stepper__item:last-child::after {
    display: none;
}
.stepper--vertical .stepper__item.is-complete::after,
.stepper--vertical .stepper__item.is-current::after {
    background: rgba(var(--brand-primary-rgb), 0.5);
}

/* AOS: respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Text shadow for better readability on images */
.text-shadow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.text-shadow-strong {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Overlay utilities for better contrast */
.overlay-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.overlay-gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.7)
    );
    z-index: 1;
}

/* Screen reader only text */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
