* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #1261a0;
    --dark-color: #0d3b66;
    --text-color: #172033;
    --muted-color: #667085;
    --background-color: #f4f7fb;
    --white-color: #ffffff;
}

body {
    min-height: 100vh;
    color: var(--text-color);
    background: var(--background-color);
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    line-height: 1.8;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    background: var(--white-color);
    border-bottom: 1px solid #e5eaf2;
}

.navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-menu a {
    color: #344054;
    text-decoration: none;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.hero {
    padding: clamp(70px, 10vw, 130px) 0;
    text-align: center;
    background: linear-gradient(135deg, #eaf5ff, #ffffff);
}

.hero h1 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.4;
}

.hero p {
    max-width: 650px;
    margin: 0 auto 30px;
    color: #536174;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.button {
    display: inline-block;
    padding: 12px 28px;
    color: var(--white-color);
    background: var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s ease;
}

.button:hover {
    background: #0d4778;
    transform: translateY(-2px);
}

.services {
    padding: 64px 0;
}

.services h2 {
    margin-bottom: 30px;
    color: var(--dark-color);
    font-size: 2rem;
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    padding: 28px 22px;
    text-align: center;
    background: var(--white-color);
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(24, 55, 90, 0.06);
}

.service-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.7;
}

.service-card p {
    color: var(--muted-color);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 auto;
    color: #ffffff;
    background: linear-gradient(135deg, #0b5ed7, #07459f);
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(11, 94, 215, 0.22);
}

.site-footer {
    padding: 24px 0;
    color: var(--muted-color);
    background: var(--white-color);
    border-top: 1px solid #e5eaf2;
    text-align: center;
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 300px;
        border-radius: 18px;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 1.35rem;
    }

    .nav-menu {
        gap: 9px;
        font-size: 0.8rem;
    }

    .hero {
        padding: 60px 0;
    }

    .button {
        width: 100%;
    }
}:root {
    --primary: #0b5ed7;
    --dark: #092b4c;
    --text: #263648;
    --muted: #667085;
    --light: #f5f9ff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    background: #ffffff;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    line-height: 1.9;
}

.navbar {
    background: rgba(9, 43, 76, 0.97);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    font-weight: 800;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-right: 0.5rem;
}

.nav-link:hover {
    color: #8ec5ff !important;
}

.hero-section {
    min-height: 720px;
    display: flex;
    align-items: center;
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #eef7ff 0%, #ffffff 65%);
}

.hero-section h1 {
    color: var(--dark);
    line-height: 1.55;
    font-size: clamp(1.7rem, 2.8vw, 3rem);
    max-width: 560px;
    word-spacing: 0.04em;
}

.hero-section h2.badge {
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 0.35rem 0.7rem;
    display: inline-block;
    white-space: normal;
    max-width: fit-content;
    width: auto;
    border-radius: 0.5rem;
}

.hero-section .lead {
    color: var(--muted);
}

.hero-section .col-lg-6 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-image {
    display: block;
    width: 100%;
    height: 430px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(9, 43, 76, 0.18);
}

.contact-buttons {
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-direction: column;
}

.contact-social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.contact-logo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(9, 43, 76, 0.08);
}

.contact-logo-button-phone {
    width: 90px;
    height: 90px;
}

.contact-logo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(9, 43, 76, 0.14);
}

.contact-logo-button img {
    display: block;
    width: 82%;
    height: 82%;
    object-fit: contain;
    background: transparent;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto;
}

.section-heading h2,
.contact-box h2 {
    margin: 10px 0;
    color: var(--dark);
    font-weight: 800;
}

.section-heading p {
    color: var(--muted);
}

.section-label {
    color: var(--primary);
    font-weight: 700;
}

.service-card {
    padding: 30px 24px;
    background: #ffffff;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(9, 43, 76, 0.06);
    transition: 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(9, 43, 76, 0.12);
}

.service-card h3 {
    margin: 16px 0 10px;
    color: var(--dark);
    font-size: 1.25rem;
}

.service-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 auto;
    color: #ffffff;
    background: linear-gradient(135deg, #0b5ed7, #07459f);
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(11, 94, 215, 0.22);
}

.service-details-section {
    background-color: #f3f8fb;
    background-image:
        linear-gradient(rgba(18, 78, 99, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 78, 99, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #f7fbfd 0%, #eef7f5 52%, #f8fbff 100%);
    background-size: 42px 42px, 42px 42px, 100% 100%;
}

.service-details-list {
    display: grid;
    gap: 76px;
}

.service-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(36px, 5vw, 64px);
}

.service-detail-row:nth-child(odd) {
    margin-right: clamp(0px, 5vw, 72px);
}

.service-detail-row:nth-child(even) {
    margin-left: clamp(0px, 5vw, 72px);
}

.service-detail-row:nth-child(even) .service-detail-media {
    order: 2;
}

.service-detail-row:nth-child(even) .service-detail-content {
    order: 1;
}

.service-detail-media {
    width: min(380px, 100%);
    aspect-ratio: 1 / 1;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-inline: auto;
}

.service-detail-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-detail-content {
    padding: 40px clamp(12px, 2vw, 24px);
    max-width: none;
}

.service-detail-number {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.service-detail-content h3 {
    margin: 10px 0 14px;
    color: #123b56;
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1.65;
    white-space: normal;
    overflow-wrap: anywhere;
}

.service-detail-content p {
    margin: 0;
    color: #536777;
    font-size: 1.1rem;
    line-height: 2.2;
    overflow-wrap: anywhere;
}

.material-about {
    position: relative;
    padding: 110px 0 90px;
    background:
        radial-gradient(circle at top right, rgba(18, 97, 160, 0.12), transparent 28%),
        linear-gradient(135deg, #f6fafe 0%, #edf6ff 42%, #ffffff 100%);
    overflow: hidden;
}

.material-about::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(18, 97, 160, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 97, 160, 0.04) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
}

.material-about__wrap {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(32px, 5vw, 68px);
    align-items: center;
}

.material-about__media {
    display: flex;
    justify-content: center;
}

.portrait-card {
    position: relative;
    width: min(100%, 500px);
    padding: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(18, 97, 160, 0.08);
    border-radius: 32px;
    box-shadow: 0 24px 60px rgba(15, 57, 96, 0.14);
    backdrop-filter: blur(6px);
    animation: floatCard 6s ease-in-out infinite;
}

.portrait-card__badge {
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(11, 94, 215, 0.12);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(11, 94, 215, 0.12);
}

.portrait-card img {
    display: block;
    width: 100%;
    height: 620px;
    object-fit: cover;
    border-radius: 24px;
    background: #dfeefc;
}

.portrait-card__caption {
    padding: 16px 12px 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.material-about__content {
    display: flex;
    flex-direction: column;
    text-align: right;
    direction: rtl;
}

.material-about__eyebrow {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 18px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(11, 94, 215, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.material-about__title {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: clamp(1.8rem, 2.8vw, 2.7rem);
    line-height: 1.3;
    font-weight: 800;
    white-space: normal;
    display: block;
    max-width: 100%;
}

.material-about__title span {
    color: var(--primary);
}

@media (max-width: 767px) {
    .material-about__title {
        font-size: clamp(2rem, 7vw, 2.7rem);
        line-height: 1.3;
    }
}

.material-about__lead,
.material-about__text {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 2.1;
}

.material-about__lead {
    margin-bottom: 18px;
    color: #46576c;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 110px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(18, 97, 160, 0.08);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 57, 96, 0.06);
}

.feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(11, 94, 215, 0.12), rgba(18, 97, 160, 0.18));
    color: var(--primary);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.feature-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-card__body small {
    color: var(--muted);
    font-weight: 600;
}

.feature-card__body strong {
    color: var(--dark);
    font-size: 0.95rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
    padding: 20px 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(18, 97, 160, 0.08);
    border-radius: 22px;
    box-shadow: 0 12px 26px rgba(15, 57, 96, 0.06);
}

.stat-box strong {
    color: var(--primary);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 900;
    line-height: 1.3;
}

.stat-box span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.8;
}

.projects-section {
    background: var(--light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 991px) {
    .material-about__wrap {
        grid-template-columns: 1fr;
    }

    .material-about__content {
        text-align: right;
    }

    .material-about__eyebrow {
        align-self: flex-start;
    }
}

@media (max-width: 767px) {
    .material-about {
        padding-top: 90px;
    }

    .portrait-card img {
        height: 420px;
    }

    .feature-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        text-align: right;
    }
}

.project-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(31, 55, 86, 0.08);
}

.project-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: var(--image-fit, cover);
    object-position: var(--image-position, center);
    background: #dce8f5;
}

.project-image-frame {
    display: block;
    aspect-ratio: var(--image-ratio, 4 / 3);
    overflow: hidden;
    background: #dce8f5;
}

.project-content h3 a {
    color: inherit;
    text-decoration: none;
}

.project-content h3 a:hover { color: var(--primary); }

.project-detail-page { padding: 140px 0 70px; background: var(--light); }
.project-detail { max-width: 1160px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--primary); text-decoration: none; }
.project-detail { display: grid; direction: ltr; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-rows: auto auto; gap: 28px 56px; align-items: center; }
.project-detail > .back-link { grid-column: 1 / -1; grid-row: 1; justify-self: start; direction: rtl; }
.project-detail-media { grid-column: 1; grid-row: 2; width: 100%; height: min(52vw, 500px); max-height: 500px; aspect-ratio: 4 / 3; overflow: hidden; margin: 0; background: #e8f0f8; border: 1px solid #dce7f2; border-radius: 18px; box-shadow: 0 18px 40px rgba(31, 55, 86, 0.10); }
.project-detail-media img { width: 100%; height: 100%; object-fit: var(--image-fit, contain); object-position: var(--image-position, center); }
.project-detail-content { grid-column: 2; grid-row: 2; min-width: 0; direction: rtl; }
.project-detail-header { direction: rtl; padding: 0 0 18px; text-align: right; }
.project-detail-header h1 { max-width: 780px; margin: 12px 0; color: var(--dark); }
.project-detail-header p { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.project-detail-copy { max-width: 780px; padding: 22px 0 0; color: var(--muted); direction: rtl; font-size: 1.05rem; line-height: 2.2; text-align: right; white-space: pre-line; border-top: 1px solid #dce7f2; }
.project-video-link { display: flex; align-items: center; gap: 13px; margin-top: 24px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, var(--primary), #0a7bd7); border-radius: 12px; box-shadow: 0 10px 22px rgba(11, 94, 215, 0.18); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.project-video-link:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(11, 94, 215, 0.24); }
.project-video-link > .bi-play-circle-fill { font-size: 1.8rem; }
.project-video-link > .bi-box-arrow-up-left { margin-right: auto; font-size: 1rem; }
.project-video-link span { display: flex; flex-direction: column; gap: 2px; }
.project-video-link small { color: rgba(255, 255, 255, .82); font-size: .78rem; }

.project-content {
    padding: 20px 22px 24px;
}

.project-content h3 {
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 1.15rem;
}

.project-content p {
    margin-bottom: 0;
    color: var(--muted);
}

.empty-projects {
    padding: 60px 20px;
    color: var(--muted);
    background: #ffffff;
    border-radius: 18px;
}

.contact-box {
    padding: 55px 25px;
    color: var(--muted);
    background: linear-gradient(135deg, #eef7ff, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 24px;
}

.contact-box p {
    max-width: 650px;
    margin: auto;
}

.footer {
    padding: 28px 0;
    color: #d9e8f7;
    background: var(--dark);
}

.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #1c7fe8);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    box-shadow: 0 14px 28px rgba(14, 91, 175, 0.28);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #0f5fcb, #0b4fa1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 130px 0 60px;
        text-align: center;
    }

    .hero-section .row {
        align-items: center;
    }

    .hero-section h1 {
        font-size: clamp(1.2rem, 5.6vw, 1.9rem) !important;
        line-height: 1.6;
        max-width: 100%;
        margin-inline: auto;
        word-spacing: 0.02em;
    }

    .hero-section h2.badge {
        font-size: 0.75rem;
    }

    .hero-section .btn {
        width: 100%;
    }

    .hero-image {
        max-height: 330px;
    }

    .project-image {
        height: 240px;
    }

    .service-detail-row,
    .service-detail-row:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-left: 0;
        margin-right: 0;
    }

    .service-detail-row:nth-child(even) .service-detail-media,
    .service-detail-row:nth-child(even) .service-detail-content {
        order: initial;
    }

    .service-detail-media {
        width: min(380px, 100%);
        height: auto;
        min-height: 0;
        aspect-ratio: 1 / 1;
        margin-inline: auto;
    }

    .service-detail-content {
        max-width: none;
        padding: 28px 20px 34px;
    }

    .service-detail-content h3 {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
        line-height: 1.5;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: center;
    }

    .service-detail-content p {
        font-size: clamp(0.95rem, 3.8vw, 1.05rem);
        line-height: 1.9;
    }

    .contact-box {
        padding: 40px 18px;
    }

    .contact-box .btn {
        width: 100%;
    }
}

.portfolio-page {
    padding-top: 76px;
}

.portfolio-hero {
    padding: 86px 0 60px;
    background: linear-gradient(135deg, #eaf4ff 0%, #ffffff 72%);
}

.portfolio-hero h1 {
    max-width: 760px;
    margin: 10px 0 14px;
    color: var(--dark);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.45;
}

.portfolio-hero p {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.1rem;
}

.portfolio-toolbar,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.portfolio-toolbar h2,
.admin-header h1 {
    margin: 8px 0 0;
    color: var(--dark);
    font-weight: 800;
}

.sort-links {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.sort-links a {
    padding: 7px 12px;
    color: var(--primary);
    border: 1px solid #cbdced;
    border-radius: 8px;
    text-decoration: none;
}

.sort-links a.active,
.sort-links a:hover {
    color: #fff;
    background: var(--primary);
}

.admin-page {
    min-height: calc(100vh - 160px);
    padding: 140px 16px 70px;
    background: linear-gradient(135deg, #eff6fc, #ffffff 65%);
}

.admin-shell {
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: clamp(24px, 5vw, 48px);
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(20, 56, 92, 0.1);
}

.admin-login-shell,
.admin-form-shell {
    max-width: 680px;
}

.admin-muted,
.admin-table small {
    color: var(--muted);
}

.admin-actions,
.row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-button,
.admin-quiet-button,
.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.admin-quiet-button {
    color: var(--dark);
    background: #fff;
    border-color: #cad8e6;
}

.admin-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label,
.admin-form > label {
    color: var(--dark);
    font-weight: 700;
}

.form-field small {
    color: var(--muted);
    font-weight: 400;
}

.form-field input,
.form-field textarea,
.admin-form input[type="password"] {
    width: 100%;
    padding: 11px 13px;
    color: var(--text);
    background: #fbfdff;
    border: 1px solid #cbd9e7;
    border-radius: 8px;
    font: inherit;
}

.form-field textarea {
    resize: vertical;
}

.admin-alert {
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 8px;
}

.admin-alert.danger { color: #842029; background: #f8d7da; }
.admin-alert.success { color: #0f5132; background: #d1e7dd; }

.admin-table-wrap { overflow-x: auto; margin-top: 28px; }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.admin-table th,
.admin-table td { padding: 13px 10px; border-bottom: 1px solid #e7eef5; text-align: right; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 0.85rem; }
.admin-table td strong,
.admin-table td small { display: block; }
.admin-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 0.78rem; }
.status.published { color: #0f5132; background: #d1e7dd; }
.status.draft { color: #664d03; background: #fff3cd; }
.icon-action { width: 38px; min-height: 38px; padding: 0; }
.icon-action.danger { color: #b02a37; background: #fff; border-color: #f0b8be; }
.row-actions form { margin: 0; }
.admin-empty { padding: 36px !important; color: var(--muted); text-align: center !important; }
.editor-preview { width: 180px; height: 120px; object-fit: cover; border-radius: 8px; }
.publish-toggle { display: flex; align-items: center; gap: 8px; }
.editor-section { margin-top: 26px; padding: 16px 18px; background: #eef6ff; border-right: 4px solid var(--primary); }
.editor-section h2 { margin: 0 0 5px; color: var(--dark); font-size: 1.1rem; }
.editor-section p { margin: 0; color: var(--muted); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field small { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; }

@media (max-width: 700px) {
    .portfolio-toolbar,
    .admin-header { align-items: flex-start; flex-direction: column; }
    .sort-links { flex-wrap: wrap; }
    .admin-actions { width: 100%; justify-content: space-between; }
    .form-grid { grid-template-columns: 1fr; }
    .project-detail-page { padding: 110px 0 48px; }
    .project-detail { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
    .project-detail-media {
        order: 1;
        height: auto;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 14px;
    }

    .project-detail-media img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .project-image-frame {
        aspect-ratio: auto;
    }

    .project-image {
        height: auto;
        min-height: 0;
        object-fit: contain;
    }

    .project-detail-content { order: 2; }
    .project-detail-header h1 { font-size: 1.55rem; line-height: 1.55; }
    .project-detail-header p { font-size: .98rem; }
    .project-detail-copy { padding-top: 18px; font-size: .98rem; line-height: 2.05; }
}

.site-navigation {
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    right: 0;
    color: #f5fbff;
    background: rgba(13, 55, 88, 0.88);
    border-bottom: 1px solid rgba(151, 211, 220, 0.18);
    box-shadow: 0 8px 28px rgba(7, 35, 55, 0.08);
    backdrop-filter: blur(16px);
    transition: background .25s ease, box-shadow .25s ease;
}

.site-navigation.is-scrolled {
    background: rgba(8, 39, 65, 0.98);
    box-shadow: 0 8px 30px rgba(7, 35, 55, 0.2);
}

.site-navigation__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 28px;
}

.site-navigation__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: #fff;
    text-decoration: none;
}

.site-navigation__brand:hover { color: #b8eee9; }
.site-navigation__brand > span:last-child { display: grid; gap: 0; line-height: 1.25; }
.site-navigation__brand strong { font-size: 1rem; font-weight: 800; }
.site-navigation__brand small { color: #a9cbd2; font-size: .64rem; }
.site-navigation__mark { display: grid; place-items: center; width: 40px; height: 40px; color: #113b55; background: #8ee8dc; border-radius: 11px; font-size: 1.25rem; }
.site-navigation__menu { display: flex; align-items: center; gap: 20px; margin-right: auto; }
.site-navigation__links { display: flex; align-items: center; gap: 4px; }
.site-navigation__links a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 11px; color: #d9e9ee; border-radius: 7px; font-size: .78rem; text-decoration: none; transition: color .2s ease, background .2s ease; }
.site-navigation__links a:hover,.site-navigation__links a.active { color: #fff; background: rgba(142, 232, 220, .13); }
.site-navigation__links a.active::after { position: absolute; right: 11px; bottom: 4px; left: 11px; height: 2px; background: #8ee8dc; border-radius: 2px; content: ""; }
.site-navigation__links i { color: #8ee8dc; font-size: .82rem; }
.site-navigation__links b { padding: 2px 5px; color: #153c4f; background: #ffbd75; border-radius: 4px; font-size: .55rem; font-weight: 800; }
.site-navigation__toggle { display: none; width: 44px; height: 42px; padding: 9px; background: transparent; border: 1px solid rgba(255,255,255,.34); border-radius: 8px; }
.site-navigation__toggle span { display: block; width: 23px; height: 2px; margin: 4px auto; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.site-navigation.is-open .site-navigation__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-navigation.is-open .site-navigation__toggle span:nth-child(2) { opacity: 0; }
.site-navigation.is-open .site-navigation__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.site-navigation__backdrop { display: none; }

@media (max-width: 1050px) {
    .site-navigation__inner { min-height: 70px; }
    .site-navigation__toggle { display: block; }
    .site-navigation__menu { position: fixed; z-index: 2; top: 70px; right: 14px; left: 14px; display: block; max-height: calc(100vh - 86px); padding: 15px; overflow-y: auto; visibility: hidden; background: #0d3758; border: 1px solid rgba(142,232,220,.2); border-radius: 12px; box-shadow: 0 18px 45px rgba(4, 25, 42, .3); opacity: 0; transform: translateY(-10px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
    .site-navigation__menu.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
    .site-navigation__links { display: grid; gap: 4px; }
    .site-navigation__links a { justify-content: flex-start; width: 100%; padding: 12px 13px; font-size: .86rem; }
    .site-navigation__links a.active::after { right: auto; bottom: 9px; left: 13px; width: 4px; height: 24px; }
    .site-navigation__backdrop { position: fixed; z-index: 1; inset: 70px 0 0; display: block; background: rgba(3, 20, 34, .38); opacity: 1; }
}

@media (max-width: 400px) {
    .site-navigation__brand strong { font-size: .9rem; }
    .site-navigation__brand small { font-size: .58rem; }
    .site-navigation__mark { width: 36px; height: 36px; }
}