* {
    box-sizing: border-box;
}

:root {
    --primary: #0F766E;
    --primary-dark: #0A5954;
    --accent: #C89B3C;
    --bg: #F4F8F7;
    --surface: #ffffff;
    --text: #1f2d2a;
    --muted: #687874;
    --border: #dfe8e5;
    --danger: #b63c3c;
    --shadow: 0 12px 30px rgba(16, 57, 47, 0.09);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.9;
}

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

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 13px;
}

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

.site-header {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 var(--border);
}

.brand-row {
    min-height: 98px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
}

.brand img {
    width: 72px;
    height: 72px;
    padding: 6px;
    object-fit: contain;
    border-radius: 16px;
    background: var(--primary);
    border: 2px solid rgba(200, 155, 60, 0.72);
    box-shadow: 0 5px 16px rgba(15, 118, 110, 0.18);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--primary);
    font-size: 20px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: var(--primary);
}

.menu-button {
    display: none;
    border: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 22px;
    cursor: pointer;
}

.hero {
    min-height: 560px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(4, 40, 32, 0.92), rgba(15, 118, 110, 0.72)),
        url('../images/ravar-municipality-final.jpg') center/cover no-repeat;
    color: #fff;
}

.hero-content {
    padding-block: 80px;
    max-width: 760px;
    margin-left: auto;
}

.hero-badge {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.1);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.35;
}

.hero p {
    color: rgba(255,255,255,.88);
    font-size: 17px;
    max-width: 650px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

.button-light {
    background: #fff;
    color: var(--primary-dark);
}

.button-outline {
    border-color: rgba(255,255,255,.55);
    background: transparent;
}

.section {
    padding: 72px 0;
}

.section-muted {
    background: #eaf1ef;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-title h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 28px;
}

.section-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.card h3 {
    margin-top: 0;
    color: var(--primary-dark);
}

.service-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #e1f0eb;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 16px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
}

.progress {
    background: #e4ece9;
    border-radius: 999px;
    overflow: hidden;
    height: 10px;
    margin: 12px 0 8px;
}

.progress > span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
}

.status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    background: #e1f0eb;
    color: var(--primary-dark);
}

.quick-stat {
    text-align: center;
}

.quick-stat strong {
    display: block;
    color: var(--primary);
    font-size: 34px;
}

.page-hero {
    padding: 62px 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.page-hero h1 {
    margin: 0 0 8px;
}

.content-wrap {
    padding: 54px 0;
}

.list {
    display: grid;
    gap: 16px;
}

.list-item {
    background: #fff;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field-full {
    grid-column: 1 / -1;
}

label {
    font-weight: bold;
    font-size: 14px;
}

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

textarea {
    min-height: 150px;
    resize: vertical;
}

.notice {
    padding: 14px 16px;
    border-radius: 10px;
    background: #e5f2ee;
    border: 1px solid #c7e2da;
    color: var(--primary-dark);
    margin-bottom: 18px;
}

.site-footer {
    background: #073F3B;
    color: #dfece8;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-grid h3 {
    color: #fff;
}

.footer-grid a {
    display: block;
    margin-bottom: 8px;
}

.copyright {
    margin-top: 36px;
    padding: 18px;
    text-align: center;
    background: rgba(0,0,0,.16);
    font-size: 13px;
}

@media (max-width: 900px) {
    .grid-4,
    .grid-3,
    .grid-2,
    .footer-grid,
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .menu-button {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 124px;
        right: 16px;
        left: 16px;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 10px;
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }
}

@media (max-width: 620px) {
    .topbar-inner {
        justify-content: center;
        text-align: center;
    }

.topbar-inner > span:first-child {
    display: none;
}

.topbar-inner a span[dir="ltr"] {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

    .brand-row {
        min-height: 84px;
    }

    .brand img {
        width: 58px;
        height: 58px;
        padding: 5px;
        border-radius: 13px;
    }

    .brand strong {
        font-size: 17px;
    }

    .main-nav {
        top: 114px;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .footer-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 510px;
    }

    .hero-content {
        text-align: center;
        padding-block: 62px;
    }

    .hero-actions,
    .section-title {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 54px 0;
    }
}

/* تکمیل رابط نسخه اول */
.skip-link {
    position: fixed;
    right: 16px;
    top: -80px;
    z-index: 9999;
    padding: 10px 16px;
    border-radius: 8px;
    color: #fff;
    background: var(--primary-dark);
}

.skip-link:focus { top: 16px; }

.main-nav { flex-wrap: wrap; justify-content: flex-end; }

.card-link { display: block; height: 100%; }
.card-link:hover h3 { color: var(--primary); }

.news-thumb,
.project-image,
.item-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 16px;
    background: #e5efec;
}

.placeholder-media {
    height: 190px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 14px;
    color: var(--primary-dark);
    background: linear-gradient(135deg, #d9ebe5, #f0f7f5);
    font-weight: 800;
}

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

.text-link { color: var(--primary); font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 24px;
    align-items: start;
}

.detail-body { white-space: pre-line; overflow-wrap: anywhere; }
.detail-sidebar { position: sticky; top: 150px; }
.detail-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-row strong { display: block; color: var(--primary-dark); }

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 11px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #dff1eb;
    font-size: 13px;
    font-weight: 700;
}

.badge-gold { color: #6d4b00; background: #fff1bd; }
.badge-blue { color: #174d83; background: #ddebfa; }

.empty-state {
    padding: 42px 24px;
    border: 1px dashed #b8cbc5;
    border-radius: 16px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-dark);
    font-size: 20px;
}

.filters-card { margin-bottom: 24px; }
.filters-row {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(170px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.content-list { display: grid; gap: 18px; }
.content-list .list-item { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.quick-access-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; }
.quick-access { text-align: center; min-height: 145px; display: grid; place-content: center; gap: 7px; }
.quick-access strong { color: var(--primary-dark); }
.quick-access span { color: var(--muted); font-size: 13px; }

.alert-box {
    padding: 18px;
    border-radius: 12px;
    color: #6c4b00;
    background: #fff8df;
    border: 1px solid #ecd897;
}

.file-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 15px;
    border-radius: 9px;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
}

.footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.footer-admin-link { opacity: .75; font-size: 13px; }

.pagination-note { color: var(--muted); font-size: 13px; }

@media (max-width: 1050px) {
    .quick-access-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .detail-layout { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
    .filters-row { grid-template-columns: 1fr; }
    .content-list .list-item { grid-template-columns: 1fr; }
    .quick-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .quick-access-grid,
    .kpi-grid { grid-template-columns: 1fr; }
}


/* هویت بصری و اطلاعات نهایی شهرداری راور */
.topbar a {
    color: #fff;
    text-decoration: none;
}

.topbar a:hover {
    text-decoration: underline;
}

.hero {
    background-position: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    max-width: 760px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.intro-layout,
.mayor-layout,
.about-feature,
.council-feature,
.mayor-profile-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
    align-items: center;
}

.intro-layout h2,
.mayor-layout h2 {
    margin: 0 0 15px;
    color: var(--primary-dark);
    font-size: clamp(27px, 4vw, 40px);
    line-height: 1.55;
}

.intro-image,
.about-feature > img,
.council-feature > img {
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow);
    object-fit: cover;
}

.intro-image {
    aspect-ratio: 16 / 9;
}

.about-feature > img {
    min-height: 430px;
}

.council-feature > img {
    aspect-ratio: 16 / 7;
}

.mayor-highlight {
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 15%, rgba(200,155,60,.18), transparent 30%),
        #fff;
}

.mayor-layout {
    grid-template-columns: minmax(270px, .8fr) minmax(0, 1.2fr);
}

.mayor-image {
    width: min(460px, 100%);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.button-soft {
    color: var(--primary);
    background: #E4F2F0;
    border-color: #CDE4E1;
}

.button-gold {
    color: #302000;
    background: var(--accent);
}

.button-gold:hover {
    background: #B78A2D;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.member-card {
    min-height: 145px;
    display: grid;
    place-content: center;
    gap: 10px;
    text-align: center;
}

.member-card span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-inline: auto;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
}

.member-card strong {
    color: var(--primary-dark);
}

.contact-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-top: 30px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--border);
}

.contact-strip > div {
    display: grid;
    gap: 5px;
    padding: 20px;
    background: #fff;
}

.contact-strip strong {
    color: var(--primary);
}

.contact-strip a {
    color: var(--primary-dark);
}

.contact-card {
    min-height: 210px;
}

.contact-card > a,
.contact-card > span {
    display: block;
    margin-top: 7px;
}

.contact-lower {
    margin-top: 24px;
    align-items: stretch;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.map-card {
    min-height: 470px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.map-card iframe {
    width: 100%;
    height: 100%;
    min-height: 470px;
    border: 0;
}

.mayor-profile-section {
    padding: 50px 0 0;
}

.mayor-profile-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.mayor-profile-card img {
    width: min(350px, 100%);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
}

.mayor-profile-card h2 {
    margin: 0 0 12px;
    color: var(--primary-dark);
    font-size: 32px;
}

.quote {
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.footer-contact {
    opacity: .9;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.footer-social a {
    min-width: 64px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    text-align: center;
}

hr {
    height: 1px;
    margin: 24px 0;
    border: 0;
    background: var(--border);
}

@media (max-width: 1000px) {
    .members-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .intro-layout,
    .mayor-layout,
    .about-feature,
    .council-feature,
    .mayor-profile-card {
        grid-template-columns: 1fr;
    }

    .mayor-image,
    .mayor-profile-card img {
        margin-inline: auto;
    }

    .contact-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .members-grid {
        grid-template-columns: 1fr;
    }

    .map-card,
    .map-card iframe {
        min-height: 360px;
    }
}

/* پالت رسمی شهرداری راور — سبز یشمی و طلایی کویری */
.site-header {
    border-bottom: 3px solid var(--accent);
}

.topbar {
    background: var(--primary);
}

.main-nav a.active,
.main-nav a:hover {
    background: var(--primary);
    box-shadow: inset 0 -3px 0 var(--accent);
}

.button {
    background: var(--primary);
    box-shadow: inset 0 -3px 0 rgba(200, 155, 60, 0.85);
}

.button:hover {
    background: var(--primary-dark);
}

.button-light {
    color: var(--primary-dark);
    background: #fff;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.page-hero,
.hero {
    border-bottom: 5px solid var(--accent);
}

.section-title h2::after,
.page-hero h1::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin-top: 10px;
    border-radius: 999px;
    background: var(--accent);
}

.page-hero h1::after {
    background: #C89B3C;
}

.card:hover {
    border-color: rgba(200, 155, 60, 0.55);
}

.service-icon,
.badge,
.status {
    border: 1px solid rgba(200, 155, 60, 0.30);
}

.progress > span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.site-footer {
    border-top: 5px solid var(--accent);
    background: var(--primary-dark);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 118, 110, 0.20);
    border-color: var(--primary);
}


/* خوانایی دکمه‌های روشن مانند اطلاعات تماس */
.button.button-soft {
    color: var(--primary-dark) !important;
    background: #E4F2F0 !important;
    border-color: #C9E1DD !important;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.button.button-soft:hover,
.button.button-soft:focus-visible {
    color: #ffffff !important;
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* نمایش پایدار تصویر ساختمان شهرداری */
.intro-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}


/* تنظیم نهایی و قطعی تصویر معرفی شهرداری */
.municipality-intro .intro-image {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    max-height: none;
    border-radius: 22px;
}
