:root {
    --bg: #0d1511;
    --card: #fff8eb;
    --ink: #152018;
    --muted: #8b927f;
    --primary: #d1a247;
    --primary-dark: #b78325;
    --accent: #4bd08a;
    --accent-soft: rgba(209, 162, 71, 0.16);
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 32px 110px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 82% 10%, rgba(209, 162, 71, 0.25), transparent 28rem),
        radial-gradient(circle at 12% 18%, rgba(75, 208, 138, 0.14), transparent 28rem),
        linear-gradient(145deg, #07100c 0%, var(--bg) 58%, #1b1a10 100%);
    background-size: 72px 72px, auto, auto, auto;
    color: #fff8eb;
    font-family: "Tajawal", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, transparent 0 48%, rgba(209, 162, 71, 0.08) 48% 52%, transparent 52%),
        radial-gradient(circle at center, transparent 0, rgba(0, 0, 0, 0.28) 78%);
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    z-index: 10;
    top: 12px;
    margin-top: 12px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(13, 21, 17, 0.62);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions,
.item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff8eb;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), #f0d087);
    color: #11170f;
    box-shadow: 0 14px 30px rgba(209, 162, 71, 0.22);
}

.nav-links {
    color: rgba(255, 248, 235, 0.68);
    font-weight: 700;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 9px 12px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 54px;
    align-items: center;
    padding: 72px 0 34px;
}

.hero h1,
.auth-panel h1 {
    margin: 12px 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p,
.contact-card p,
.auth-panel p,
.service-card p {
    color: rgba(255, 248, 235, 0.66);
    font-size: 1.08rem;
    line-height: 1.85;
}

.eyebrow,
.section-heading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 28px;
}

.hero-badges span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 248, 235, 0.82);
    padding: 10px 14px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.eyebrow::before,
.section-heading span::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), #f2cf7b);
    color: #121810;
    box-shadow: 0 18px 40px rgba(209, 162, 71, 0.24);
}

.btn.primary:hover {
    background: var(--primary-dark);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    color: #fff8eb;
}

.btn.full {
    width: 100%;
}

.hero-card {
    min-height: 440px;
    overflow: hidden;
    position: relative;
    transform: rotate(-2deg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 48px;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.28), transparent 12rem),
        radial-gradient(circle at 90% 80%, rgba(75, 208, 138, 0.28), transparent 14rem),
        linear-gradient(145deg, rgba(209, 162, 71, 0.96), rgba(28, 78, 49, 0.9)),
        var(--primary);
    box-shadow: var(--shadow);
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 36px;
    pointer-events: none;
}

.hero-card img {
    width: 100%;
    height: 440px;
    object-fit: cover;
}

.hero-placeholder {
    display: grid;
    height: 440px;
    place-items: center;
    padding: 34px;
    color: white;
    text-align: right;
}

.premium-visual {
    position: relative;
    align-content: center;
    gap: 16px;
}

.visual-orb {
    position: absolute;
    inset: auto auto 28px 28px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04));
    filter: blur(1px);
}

.visual-card {
    position: relative;
    width: min(360px, 100%);
    margin-right: auto;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 24px;
    background: rgba(14, 23, 18, 0.28);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(14px);
}

.visual-card.main {
    width: min(420px, 100%);
    margin: 0;
    padding: 24px;
    background: rgba(255, 248, 235, 0.2);
}

.visual-card strong,
.visual-card span {
    display: block;
}

.visual-card strong {
    margin-bottom: 4px;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1;
}

.visual-card span {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.stats,
.contact-card,
.panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    background: rgba(255, 248, 235, 0.08);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 22px;
}

.stats div {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 248, 235, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats strong,
.stats span {
    display: block;
}

.stats strong {
    margin-bottom: 6px;
    font-size: 1.18rem;
    color: #fff8eb;
}

.stats span,
.empty-state {
    color: var(--muted);
}

.section {
    padding: 72px 0 0;
}

.section.muted {
    padding-bottom: 28px;
}

.section-heading {
    width: min(720px, 100%);
    margin-bottom: 26px;
    color: #fff8eb;
}

.section-heading h2,
.contact-card h2,
.panel h1,
.panel h2 {
    margin: 8px 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.2;
}

.service-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card,
.gallery-grid figure {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 248, 235, 0.12), rgba(255, 248, 235, 0.06));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover,
.gallery-grid figure:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.service-card {
    padding: 22px;
    position: relative;
}

.service-card::after {
    content: "";
    position: absolute;
    inset: auto 22px 0 22px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.service-card img,
.gallery-grid img {
    width: 100%;
    height: 210px;
    border-radius: 22px;
    object-fit: cover;
}

.service-icon {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(209, 162, 71, 0.22), rgba(75, 208, 138, 0.14));
    color: #f2cf7b;
    font-size: 2rem;
    font-weight: 800;
}

.service-card h3 {
    margin: 22px 0 8px;
    font-size: 1.35rem;
}

.gallery-grid figure {
    margin: 0;
}

.gallery-grid figcaption {
    padding: 14px 18px 18px;
    color: rgba(255, 248, 235, 0.72);
    font-weight: 700;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 72px 0 26px;
    padding: 34px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0 36px;
    color: rgba(255, 248, 235, 0.56);
}

.flash-stack {
    position: fixed;
    z-index: 20;
    top: 18px;
    left: 18px;
    display: grid;
    gap: 8px;
}

.flash {
    border-radius: 16px;
    padding: 12px 16px;
    background: white;
    box-shadow: var(--shadow);
    font-weight: 800;
}

.flash.success {
    color: var(--primary);
}

.flash.error,
.text-danger {
    color: #b42318;
}

.auth-wrap {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.auth-panel {
    width: min(520px, 100%);
}

.panel {
    padding: 28px;
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 800;
}

.admin-layout {
    display: grid;
    gap: 24px;
    padding-bottom: 48px;
}

.form-grid,
.admin-item {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 18px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    color: var(--ink);
    font: inherit;
    padding: 13px 15px;
    outline: 0;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 111, 63, 0.12);
}

.wide {
    grid-column: 1 / -1;
}

.admin-list,
.gallery-admin {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.admin-item {
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: white;
    padding: 18px;
}

.item-preview {
    display: grid;
    width: 90px;
    height: 90px;
    place-items: center;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(217, 164, 65, 0.18);
    color: var(--primary);
    font-size: 2rem;
    font-weight: 800;
}

.item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-form {
    margin: -6px 18px 8px 0;
}

.text-danger {
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.gallery-admin {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-admin-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    padding: 12px;
}

.gallery-admin-card img {
    width: 100%;
    height: 140px;
    border-radius: 16px;
    object-fit: cover;
}

@media (max-width: 860px) {
    body {
        background-size: 48px 48px, auto, auto, auto;
    }

    .page-shell {
        width: min(100% - 24px, 520px);
    }

    .site-header,
    .contact-card {
        align-items: stretch;
        flex-direction: column;
    }

    .site-header {
        position: relative;
        top: 0;
        gap: 14px;
        margin-top: 10px;
        padding: 14px;
        border-radius: 24px;
    }

    .brand {
        justify-content: center;
        font-size: 1rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(4, max-content);
        justify-content: start;
        gap: 6px;
        overflow-x: auto;
        padding: 4px 2px 2px;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        padding: 9px 11px;
        background: rgba(255, 255, 255, 0.06);
        font-size: 0.92rem;
    }

    .hero,
    .stats,
    .service-grid,
    .gallery-grid,
    .form-grid,
    .admin-item,
    .gallery-admin {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 28px;
        padding: 34px 0 24px;
    }

    .hero h1,
    .auth-panel h1 {
        margin-bottom: 14px;
        font-size: clamp(2.25rem, 13vw, 3.65rem);
        line-height: 1.02;
        letter-spacing: -0.035em;
    }

    .hero p,
    .contact-card p,
    .auth-panel p,
    .service-card p {
        font-size: 1rem;
        line-height: 1.75;
    }

    .hero-badges {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin: 18px 0 22px;
    }

    .hero-badges span {
        display: grid;
        min-height: 42px;
        place-items: center;
        padding: 8px 6px;
        text-align: center;
        font-size: 0.84rem;
    }

    .hero-card,
    .hero-card img,
    .hero-placeholder {
        min-height: 300px;
        height: 300px;
    }

    .hero-card {
        order: -1;
        transform: none;
        border-radius: 30px;
    }

    .hero-card::before {
        inset: 12px;
        border-radius: 22px;
    }

    .hero-placeholder {
        padding: 22px;
    }

    .premium-visual {
        gap: 10px;
    }

    .visual-orb {
        width: 112px;
        height: 112px;
        inset: auto auto 20px 16px;
    }

    .visual-card,
    .visual-card.main {
        width: 100%;
        padding: 14px 16px;
        border-radius: 18px;
    }

    .visual-card strong {
        font-size: clamp(1.45rem, 8vw, 2.15rem);
    }

    .visual-card span {
        font-size: 0.92rem;
    }

    .hero-actions,
    .contact-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        min-height: 52px;
    }

    .stats {
        gap: 10px;
        padding: 12px;
        border-radius: 24px;
    }

    .stats div {
        padding: 16px;
        border-radius: 18px;
    }

    .section {
        padding-top: 48px;
    }

    .section-heading {
        margin-bottom: 18px;
    }

    .section-heading h2,
    .contact-card h2,
    .panel h1,
    .panel h2 {
        font-size: clamp(1.55rem, 8vw, 2.35rem);
    }

    .service-grid,
    .gallery-grid {
        gap: 14px;
    }

    .service-card,
    .gallery-grid figure,
    .contact-card,
    .panel {
        border-radius: 24px;
    }

    .service-card {
        padding: 18px;
    }

    .service-card:hover,
    .gallery-grid figure:hover {
        transform: none;
    }

    .service-card img,
    .gallery-grid img {
        height: 190px;
        border-radius: 18px;
    }

    .service-icon {
        width: 62px;
        height: 62px;
        border-radius: 20px;
        font-size: 1.7rem;
    }

    .contact-card {
        margin: 52px 0 18px;
        padding: 22px;
    }

    .footer {
        align-items: center;
        flex-direction: column;
        padding-bottom: 28px;
        text-align: center;
    }

    .auth-wrap {
        min-height: calc(100vh - 24px);
        padding: 18px 0;
    }

    .panel {
        padding: 20px;
    }

    .form-grid,
    .admin-item {
        gap: 12px;
    }

    .admin-layout {
        gap: 16px;
        padding-bottom: 28px;
    }

    .admin-item {
        padding: 14px;
        background: rgba(255, 248, 235, 0.08);
    }

    .item-preview {
        width: 76px;
        height: 76px;
    }

    .delete-form {
        margin: -4px 12px 6px 0;
    }

    .gallery-admin-card {
        background: rgba(255, 248, 235, 0.08);
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 18px, 420px);
    }

    .site-header {
        border-radius: 20px;
    }

    .hero {
        padding-top: 24px;
    }

    .hero h1,
    .auth-panel h1 {
        font-size: clamp(2rem, 12.5vw, 3.05rem);
    }

    .hero-badges {
        grid-template-columns: 1fr;
    }

    .hero-badges span {
        min-height: 38px;
    }

    .hero-card,
    .hero-card img,
    .hero-placeholder {
        min-height: 260px;
        height: 260px;
    }

    .visual-card:not(.main) {
        display: none;
    }

    .visual-card.main {
        min-height: 150px;
        align-content: center;
    }

    .stats strong {
        font-size: 1.06rem;
    }

    .service-card img,
    .gallery-grid img {
        height: 168px;
    }

    input,
    textarea {
        border-radius: 15px;
        padding: 12px 13px;
    }

    .flash-stack {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    }
}
