﻿:root {
    --bg: #f6f6f2;
    --surface: #ffffff;
    --surface-soft: #fbfbf8;
    --text: #1f231f;
    --muted: #687066;
    --line: #dde2d8;
    --brand: #4d8b31;
    --brand-dark: #3e7028;
    --danger: #b63a2f;
    --shadow: 0 18px 34px rgba(31, 35, 31, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans Arabic", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

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

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 76px;
}

.brand {
    margin: 0;
    font-size: 1.25rem;
    font-family: "Noto Kufi Arabic", sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

.menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.menu a:hover {
    color: var(--brand-dark);
    border-color: var(--brand);
}

.menu form {
    margin: 0;
}

.menu-logout {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    cursor: pointer;
    font-family: inherit;
}

.menu-logout:hover {
    color: var(--brand-dark);
    border-bottom-color: var(--brand);
}

.hero,
.section {
    padding: 58px 0;
}

.section-white {
    background: var(--surface);
}

.hero-full {
    background: #121512;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-slider-full {
    min-height: clamp(400px, 64vh, 680px);
}

.slides {
    position: relative;
    min-height: inherit;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-bg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: clamp(400px, 64vh, 680px);
    object-fit: cover;
    object-position: center center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    z-index: 2;
    color: #fff;
    background: transparent;
}

.hero-overlay .container {
    width: min(1440px, 99%);
    margin: 0 auto;
    padding: 0 0 clamp(34px, 7vh, 56px);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.hero-panel {
    width: min(560px, 100%);
    margin-left: auto;
    padding: 24px 26px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(17, 21, 17, 0.74), rgba(17, 21, 17, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
    text-align: right;
}

.hero-overlay h2,
.hero h2 {
    margin: 0 0 12px;
    max-width: 11ch;
    font-size: clamp(1.55rem, 3vw, 2.8rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
    text-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.hero-overlay p,
.hero p {
    max-width: 620px;
    margin: 0;
    font-size: clamp(1rem, 1.2vw, 1.12rem);
}

.hero-overlay p {
    color: rgba(245, 248, 243, 0.92);
    font-weight: 600;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.fallback-slide {
    background: linear-gradient(135deg, #1f231f, #3e7028);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-fallback-text {
    text-align: center;
    color: #fff;
    padding: 24px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    transition: background 0.2s ease, transform 0.2s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.34);
    transform: translateY(-50%) scale(1.04);
}

.slider-btn.prev {
    right: 24px;
}

.slider-btn.next {
    left: 24px;
}

.slider-dots {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 22px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.slider-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.slider-dots button.active {
    background: #fff;
    transform: scale(1.18);
}

h3 {
    margin: 0 0 18px;
    font-family: "Noto Kufi Arabic", sans-serif;
    font-size: clamp(1.25rem, 2vw, 2rem);
    line-height: 1.2;
}

p {
    color: var(--muted);
}

.grid,
.video-grid,
.services-grid,
.showcase-grid,
.slider-manager-grid {
    display: grid;
    gap: 18px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-bottom: 16px;
}

.section-head p {
    margin: 0;
}

.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    min-width: 260px;
    height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font: inherit;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.filter-chip.active,
.filter-chip:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.grid,
.video-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

#gallery .card img {
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal;
    transform: none !important;
}

.services-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.showcase-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.slider-manager-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card,
.video-card,
.service-card,
.slider-manage-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px rgba(31, 35, 31, 0.14);
}

.card img,
.video-card video,
.slider-manage-card img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #000;
}

.card figcaption,
.video-card h4,
.video-card p,
.service-card,
.slider-manage-body {
    padding: 14px 16px;
}

.card-body {
    padding: 14px 16px;
}

.card strong,
.video-card h4,
.service-card h3,
.slider-manage-body strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
}

.service-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.service-card p,
.slider-manage-body p {
    margin: 0;
}

.flash {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #b8d7aa;
    background: #f3faef;
    color: #2f6222;
}

.flash p {
    margin: 4px 0;
    color: inherit;
}

.flash-error {
    border-color: #e3b1ad;
    background: #fff3f2;
    color: #8a241d;
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.table {
    width: 100%;
    overflow: hidden;
    border-collapse: collapse;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

.table th {
    background: #f7f8f4;
}

.form-wrap {
    max-width: 760px;
}

.form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.form h3 {
    margin-bottom: 14px;
}

.form label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 700;
}

.form input,
.form textarea,
.form select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cfd5ca;
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.form textarea {
    resize: vertical;
    min-height: 110px;
}

.hint {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.9rem;
}

.preview-box {
    margin-top: 12px;
}

.preview-box img,
.preview-box video {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.checkline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.checkline input[type="checkbox"] {
    width: auto;
}

.btn,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn:hover,
.btn-secondary:hover,
.btn-danger:hover {
    transform: translateY(-1px);
}

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

.btn:hover {
    background: var(--brand-dark);
}

.btn-secondary {
    background: #eef4ea;
    color: var(--brand-dark);
}

.btn-danger {
    background: #fff1ef;
    color: var(--danger);
}

.footer {
    border-top: 1px solid var(--line);
    background: #fff;
    margin-top: 34px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    padding: 28px 0;
}

.footer p {
    margin: 0;
}

.pager {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
    background: #fff;
    font-weight: 700;
}

.pager-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pager-current {
    font-weight: 700;
    color: var(--muted);
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.detail-nav {
    display: flex;
    gap: 10px;
}

.detail-back {
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 700;
}

.detail-title {
    margin: 10px 0 8px;
    font-family: "Noto Kufi Arabic", sans-serif;
    font-size: clamp(1.4rem, 2.8vw, 2.4rem);
}

.detail-meta {
    margin: 0;
    font-weight: 700;
    color: var(--brand-dark);
}

.detail-description {
    max-width: 760px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 18px;
    align-items: start;
}

.detail-media {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.detail-image,
.detail-video {
    display: block;
    width: 100%;
    max-height: 680px;
    object-fit: contain;
    background: #0f1210;
}

.lightbox-trigger {
    padding: 0;
    margin: 0;
    border: 0;
    width: 100%;
    background: none;
    cursor: zoom-in;
}

.detail-side {
    display: grid;
    gap: 14px;
}

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

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(8, 10, 8, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 24px;
}

.lightbox[hidden] {
    display: none !important;
}

.lightbox img {
    max-width: min(1200px, 92vw);
    max-height: 82vh;
    border-radius: 12px;
    object-fit: contain;
}

.lightbox p {
    color: #f1f4f0;
    margin: 0;
    font-weight: 700;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    left: 18px;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 860px) {
    .topbar-inner,
    .admin-head,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu {
        justify-content: flex-start;
    }

    .slider-btn.prev {
        right: 12px;
    }

    .slider-btn.next {
        left: 12px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .hero-overlay .container {
        padding-bottom: 74px;
    }

    .hero-overlay p {
        max-width: 100%;
    }

    .hero-overlay h2 {
        max-width: 100%;
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }

    .hero-panel {
        width: 100%;
        margin-left: 0;
        padding: 20px 18px;
        border-radius: 18px;
    }

    .hero-slider-full,
    .slide-bg {
        min-height: clamp(360px, 56vh, 520px);
    }

    .hero-actions,
    .actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        width: 100%;
    }

    .search-form input[type="text"] {
        min-width: 100%;
    }

    .card img,
    .video-card video,
    .slider-manage-card img {
        height: 220px;
    }
}



