:root {
    --site-bg: #f4efe7;
    --site-bg-soft: #fbf8f2;
    --site-panel: rgba(255, 255, 255, 0.84);
    --site-panel-strong: rgba(255, 255, 255, 0.96);
    --site-ink: #16363c;
    --site-muted: #587378;
    --site-border: rgba(22, 54, 60, 0.09);
    --site-accent: #0d7c86;
    --site-accent-strong: #0a636c;
    --site-accent-soft: rgba(13, 124, 134, 0.12);
    --site-gold: #d6a44a;
    --site-shadow-soft: 0 20px 60px rgba(21, 52, 57, 0.08);
    --site-shadow-strong: 0 24px 70px rgba(12, 39, 44, 0.16);
    --site-radius-lg: 1.75rem;
    --site-radius-md: 1.2rem;
    --site-radius-sm: 0.95rem;
}

html {
    scroll-behavior: smooth;
}

body.public-site {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--site-ink);
    direction: rtl;
    text-align: right;
    background:
        radial-gradient(circle at top right, rgba(13, 124, 134, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(214, 164, 74, 0.14), transparent 30%),
        linear-gradient(180deg, #f7f4ec 0%, #f1ece2 100%);
}

body.public-site::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 80%);
    pointer-events: none;
    opacity: 0.45;
    z-index: -1;
}

::selection {
    background: rgba(13, 124, 134, 0.18);
    color: var(--site-ink);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--site-accent-strong);
}

img,
video,
iframe {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.card-title,
.section-title,
.site-header-title {
    font-family: 'Marhey', 'Tajawal', sans-serif;
}

.text-muted {
    color: var(--site-muted) !important;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1240px;
    }
}

.site-header {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 320px;
    padding: 3rem 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    isolation: isolate;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(8, 22, 31, 0.9), rgba(10, 54, 66, 0.62)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.site-header::after {
    content: "";
    position: absolute;
    inset: auto 10% -120px auto;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 164, 74, 0.38), rgba(214, 164, 74, 0));
    filter: blur(12px);
}

.site-header .container {
    position: relative;
    z-index: 2;
}

.site-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(250, 247, 241, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 0.92rem;
    font-weight: 700;
}

.site-kicker::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #ffd995;
    box-shadow: 0 0 0 0.3rem rgba(255, 217, 149, 0.13);
}

.site-header-title {
    margin: 1rem 0 0.8rem;
    max-width: 15ch;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.15;
    color: #fffaf2;
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.site-header p.lead {
    max-width: 42rem;
    margin: 0;
    color: rgba(243, 248, 247, 0.86);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.95;
}

.site-header-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.site-header .btn-cta {
    min-height: 3.25rem;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--site-gold), #e3bb71);
    color: #243238;
    font-weight: 800;
    box-shadow: 0 20px 40px rgba(21, 31, 38, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.site-header .btn-cta:hover {
    color: #243238;
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(21, 31, 38, 0.28);
    filter: saturate(1.06);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 252, 247, 0.82) !important;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(22, 54, 60, 0.08);
    box-shadow: 0 10px 30px rgba(17, 42, 48, 0.06);
}

.navbar .container {
    min-height: 78px;
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

.navbar-toggler {
    border-radius: 0.9rem;
    border: 1px solid rgba(22, 54, 60, 0.1);
    padding: 0.5rem 0.75rem;
}

[dir="rtl"] .navbar-nav {
    gap: 0.15rem;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.9rem;
    padding-inline: 1rem !important;
    border-radius: 999px;
    color: var(--site-ink) !important;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--site-accent-strong) !important;
    background: rgba(13, 124, 134, 0.1);
}

.nav-link-inscription {
    gap: 0.55rem;
    background: linear-gradient(135deg, rgba(214, 164, 74, 0.16), rgba(13, 124, 134, 0.08));
    border: 1px solid rgba(214, 164, 74, 0.24);
    box-shadow: 0 10px 26px rgba(17, 42, 48, 0.08);
}

.nav-link-inscription .nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--site-accent-strong);
    font-size: 0.78rem;
    line-height: 1;
}

.nav-link-inscription .nav-pill::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #78dca0;
    box-shadow: 0 0 0 0.3rem rgba(120, 220, 160, 0.16);
}

.nav-link-inscription:hover,
.nav-link-inscription.active {
    background: linear-gradient(135deg, rgba(214, 164, 74, 0.26), rgba(13, 124, 134, 0.13));
}

.site-main {
    position: relative;
    padding: 2rem 0 3.5rem;
}

.page-intro,
.content-panel,
.card,
.detail-panel,
.contact-form-panel,
.contact-info-panel {
    position: relative;
    overflow: hidden;
    background: var(--site-panel);
    border: 1px solid var(--site-border);
    box-shadow: var(--site-shadow-soft);
    backdrop-filter: blur(12px);
}

.page-intro::before,
.content-panel::before,
.detail-panel::before {
    content: "";
    position: absolute;
    inset: auto auto -70px -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 164, 74, 0.18), rgba(214, 164, 74, 0));
    pointer-events: none;
}

.page-intro {
    margin-bottom: 1.8rem;
    padding: 1.65rem 1.7rem;
    border-radius: var(--site-radius-lg);
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--site-accent-soft);
    color: var(--site-accent-strong);
    font-size: 0.92rem;
    font-weight: 700;
}

.page-intro h2,
.page-intro h1 {
    margin: 1rem 0 0.6rem;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    color: var(--site-ink);
}

.page-lead {
    margin: 0;
    max-width: 44rem;
    color: var(--site-muted);
    font-size: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--site-panel);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-md);
    padding: 1.35rem;
    box-shadow: var(--site-shadow-soft);
}

.feature-card h3 {
    margin: 1rem 0 0.45rem;
    color: var(--site-ink);
    font-size: 1.12rem;
}

.feature-card p {
    margin: 0;
    color: var(--site-muted);
    font-size: 0.95rem;
}

.icon-badge {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(13, 124, 134, 0.14), rgba(214, 164, 74, 0.18));
    color: var(--site-accent-strong);
    font-size: 1.2rem;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.2rem;
}

.section-title {
    position: relative;
    margin: 0;
    padding-bottom: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: clamp(1.35rem, 2.2vw, 1.95rem);
    color: var(--site-ink);
}

.section-title::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 76px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--site-accent), var(--site-gold));
}

.btn {
    border-radius: 999px;
    font-weight: 700;
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--site-accent), #1397a0);
    color: #fff;
    box-shadow: 0 15px 35px rgba(13, 124, 134, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: saturate(1.05);
    box-shadow: 0 18px 40px rgba(13, 124, 134, 0.22);
}

.card {
    border-radius: var(--site-radius-md);
    color: var(--site-ink);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--site-shadow-strong);
    border-color: rgba(13, 124, 134, 0.18);
}

.card img,
.card video,
.card iframe {
    width: 100%;
    object-fit: cover;
}

.card-thumb,
.card-img-top {
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 1.35rem;
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--site-ink);
}

.card-title a {
    color: inherit;
}

.card-text {
    color: var(--site-muted);
    margin-bottom: 0;
    line-height: 1.8;
}

.card-hover {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-animate {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.card-animate.show {
    opacity: 1;
    transform: translateY(0);
}

#anonceCarousel {
    overflow: hidden;
    border-radius: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: var(--site-shadow-strong);
    background: rgba(255, 255, 255, 0.12);
}

#anonceCarousel .carousel-item img {
    min-height: 280px;
    object-fit: cover;
}

.carousel-caption {
    left: 0;
    right: 0;
    bottom: 0;
    text-align: right;
    padding: 2rem 1.75rem 1.5rem;
    background: linear-gradient(180deg, rgba(11, 26, 30, 0), rgba(11, 26, 30, 0.88));
}

.carousel-caption h5 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    padding: 1rem;
    background-size: 58% 58%;
    backdrop-filter: blur(8px);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.34);
}

.content-panel,
.detail-panel,
.contact-form-panel,
.contact-info-panel {
    border-radius: var(--site-radius-lg);
    padding: clamp(1.35rem, 2.5vw, 2rem);
}

.content-panel .card-body,
.detail-panel .card-body {
    padding: 0;
}

.detail-panel .ratio,
.detail-panel audio,
.detail-panel iframe,
.detail-panel video {
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid rgba(22, 54, 60, 0.08);
}

.detail-panel fieldset {
    margin: 0;
    padding: 1rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(22, 54, 60, 0.09);
    background: rgba(255, 255, 255, 0.55);
}

.detail-panel legend {
    width: auto;
    float: none;
    padding-inline: 0.6rem;
    margin-bottom: 0.75rem;
    color: var(--site-accent-strong);
    font-weight: 800;
    font-size: 1rem;
}

.detail-panel .btn-sm {
    padding-inline: 1rem;
}

.detail-panel audio {
    width: 100%;
}

.info-stack {
    display: grid;
    gap: 0.9rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(22, 54, 60, 0.07);
}

.info-item i {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, rgba(13, 124, 134, 0.12), rgba(214, 164, 74, 0.16));
    color: var(--site-accent-strong);
    font-size: 1.1rem;
}

.info-item strong {
    display: block;
    color: var(--site-ink);
}

.info-item span,
.info-item small {
    color: var(--site-muted);
}

.form-label {
    color: var(--site-ink);
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 3.2rem;
    border-radius: 1rem;
    border: 1px solid rgba(22, 54, 60, 0.12);
    background: rgba(255, 255, 255, 0.94);
    color: var(--site-ink);
    box-shadow: none;
}

textarea.form-control {
    min-height: 8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(13, 124, 134, 0.34);
    box-shadow: 0 0 0 0.25rem rgba(13, 124, 134, 0.12);
}

.alert {
    border-radius: 1.2rem;
    border: 1px solid rgba(22, 54, 60, 0.08);
    box-shadow: var(--site-shadow-soft);
}

.pagination {
    gap: 0.45rem;
    justify-content: center;
}

.page-item .page-link {
    min-width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px !important;
    border: 1px solid rgba(22, 54, 60, 0.1);
    color: var(--site-ink);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
}

.page-item.active .page-link {
    border-color: var(--site-accent);
    background: var(--site-accent);
    color: #fff;
}

.page-item.disabled .page-link {
    color: rgba(22, 54, 60, 0.35);
    background: rgba(255, 255, 255, 0.6);
}

.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #0f3439, #091c20) !important;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(214, 164, 74, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(13, 124, 134, 0.2), transparent 28%);
    pointer-events: none;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

.site-footer h5,
.site-footer h6 {
    color: #fff6ea;
}

.site-footer .text-muted {
    color: rgba(232, 242, 240, 0.72) !important;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.84) !important;
    transition: color 0.18s ease, transform 0.18s ease;
}

.site-footer a:hover {
    color: #fff !important;
}

@media (max-width: 991.98px) {
    .site-header {
        min-height: 280px;
        padding: 2.5rem 0;
    }

    .site-header-title {
        max-width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .site-main {
        padding-top: 1.4rem;
    }

    .site-header {
        min-height: 250px;
    }

    .navbar .container {
        min-height: 70px;
    }

    .page-intro,
    .content-panel,
    .detail-panel,
    .contact-form-panel,
    .contact-info-panel {
        border-radius: 1.35rem;
    }

    .card-thumb,
    .card-img-top {
        height: 200px;
    }

    .carousel-caption {
        padding: 1.4rem 1rem 1.1rem;
    }
}
