/**
 * Shahrdari Sabz - Joomla Template Styles
 * قالب شهرداری سبز برای جوملا 4/5
 */

/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --green-primary: #4CAF50;
    --green-dark: #388E3C;
    --green-darker: #2E7D32;
    --blue-primary: #1976D2;
    --blue-dark: #0D47A1;
    --blue-light: #2196F3;
    --red-primary: #D32F2F;
    --red-dark: #B71C1C;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --border-color: #ddd;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #e8e8e8;
    color: var(--text-dark);
    line-height: 1.8;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}
h1,h2,h3,h4,h5,h6{
   font-weight: 700!important;
}
h1{
   font-size:24px!important;
}
h2{
   font-size:20px!important;
}
h3{
   font-size:18px!important;
}
h4{
   font-size:16px!important;
}
h5{
   font-size:14px!important;
}
h6{
   font-size:12px!important;
}
ul {
    list-style: none;
}
html body p{
   padding:0;
   margin:0;
   font-size:13px;
}
html body img{
   padding:0;
   margin:0;
   max-width:100%;
   height:auto;
}
/* ========================================
   Header Section
======================================== */
.gov-header {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 50%, var(--green-darker) 100%);
    position: relative;
    overflow: hidden;
    max-height: 150px;
}
.gov-header *{
   padding:0px;
   margin: 0px;
   max-height:150px;
}
.header-top {
    display: flex;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
}
.header-top > div{
   width:33%;
}
.header-left {
    padding: 0px;
    text-align: right;
}

.cityscape-placeholder {
    width: 100%;
    max-width: 350px;
    height: 160px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.15) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    border-radius: 10px 10px 0 0;
}

.cityscape-silhouette {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100%;
    padding-bottom: 10px;
}

.building {
    background: rgba(255,255,255,0.25);
    border-radius: 2px 2px 0 0;
    transition: var(--transition);
}

.building:hover {
    background: rgba(255,255,255,0.4);
}

.header-center {
    padding: 0px;
    text-align: center;
}

.logo-container {
    position: relative;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, var(--red-primary) 0%, var(--red-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    border: 5px solid var(--white);
    transition: var(--transition);
}

.logo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.logo-inner {
    text-align: center;
    color: var(--white);
}

.logo-text {
    font-size: 26px;
    font-weight: bold;
    line-height: 1.4;
}

.logo-subtitle {
    font-size: 13px;
    margin-top: 5px;
    opacity: 0.9;
}

.header-right {
    text-align: left;
}

.portrait-placeholder {
    width: 105px;
    height: 145px;
    background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 4px solid var(--white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.portrait-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.portrait-placeholder i {
    font-size: 45px;
    margin-bottom: 8px;
    color: #999;
}

.portrait-placeholder span {
    font-size: 11px;
    font-weight: 500;
}

/* ========================================
   Navigation Menu
======================================== */
.main-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Menu module output in main nav */
.nav-menu .mod-menu,
.nav-menu ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-menu .mod-menu li,
.nav-menu ul li {
    display: flex;
}

.nav-menu .nav-item {
    position: relative;
}

.nav-menu .nav-item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 22px;
    color: var(--blue-primary);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    border-left: 1px solid #f0f0f0;
    position: relative;
}

.nav-menu .nav-link i {
    font-size: 16px;
}

.nav-menu .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--blue-primary);
    transition: var(--transition);
}

.nav-menu .nav-link:hover {
    color: var(--blue-dark);
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

.nav-menu .nav-link:hover::after {
    width: 100%;
}

.nav-menu .nav-link.active {
    background: linear-gradient(180deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    color: var(--white);
}

.nav-menu .nav-link.active::after {
    background: var(--white);
    width: 100%;
}

/* Search Box */
.mod-finder__search {
    display: flex;
    align-items: center;
    padding:0;
}

.mod-finder__search {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 30px;
    border: 2px solid #e0e0e0;
    overflow: hidden;
    transition: var(--transition);
}

.mod-finder__search:focus-within {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.mod-finder label{
    display:none;
}
.js-finder-search-query {
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 14px;
    width: 220px;
    direction: rtl;
    font-family: inherit;
    outline: none;
}

.js-finder-search-query::placeholder {
    color: #999;
}

.mod-finder__search button {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
    color: var(--white);
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mod-finder__search button:hover {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--blue-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   Main Content Layout
======================================== */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   Sidebar Styles
======================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.moduletable {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.moduletable:hover {
    box-shadow: var(--shadow-hover);
}
.moduletable ul,.moduletable div{
   padding:10px;
}
.moduletable h3 {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
    color: var(--white);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 15px;
    position: relative;
}

.moduletable h3::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--red-primary);
}

.moduletable h3 i {
    font-size: 18px;
}

.sidebar-content {
    padding: 10px 0;
}

.moduletable ul > li {
    border-bottom: 1px solid #f5f5f5;
}

.moduletable ul > li:last-child {
    border-bottom: none;
}

.moduletable ul > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--text-dark);
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.moduletable ul > li > a::before {
    content: '●';
    color: var(--red-primary);
    font-size: 10px;
    transition: var(--transition);
}

.moduletable ul > li > a:hover {
    background: #f8f9fa;
    color: var(--blue-primary);
    padding-right: 25px;
}

.moduletable ul > li > a:hover::before {
    color: var(--blue-primary);
}

.moduletable ul > li > a i {
    font-size: 16px;
}

/* Team Photo */
.team-photo {
    width: calc(100% - 20px);
    height: 140px;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
    margin: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
    transition: var(--transition);
}

.team-photo:hover {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.team-photo i {
    font-size: 40px;
    margin-bottom: 8px;
}

/* Statistics Block */
.stats-content {
    padding: 18px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-label {
    color: var(--text-light);
    font-size: 13px;
}

.stats-value {
    font-weight: bold;
    color: var(--blue-primary);
    font-size: 15px;
}

/* ========================================
   Center Content
======================================== */
.center-content {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Component wrapper */
.component-wrapper {
    padding: 20px;
}

/* Main News Image */
.news-main-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    position: relative;
    overflow: hidden;
}

.news-main-image i {
    font-size: 70px;
    margin-bottom: 10px;
}

.news-main-image span {
    font-size: 16px;
}

/* Profile Block */
.profile-block {
    text-align: center;
    padding: 25px 20px;
}

.profile-image {
    width: 160px;
    height: 190px;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
    border-radius: 10px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.profile-image i {
    font-size: 60px;
    color: #999;
    z-index: 1;
}

.profile-image::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35px;
    background: linear-gradient(180deg, #2397D3 0%, #2397D3 33%, #1B5E20 33%, #1B5E20 66%, var(--white) 66%, var(--white) 100%);
}

.profile-name {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.profile-title {
    font-size: 13px;
    color: var(--text-light);
}

/* Contact Block */
.contact-content {
    padding: 18px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Social Media */
.social-content {
    padding: 18px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
}

.social-link.twitter { background: #1DA1F2; }
.social-link.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link.whatsapp { background: #25D366; }
.social-link.telegram { background: #0088cc; }

/* ========================================
   Footer
======================================== */
.gov-footer {
    background: linear-gradient(135deg, var(--blue-dark), #1565C0);
    color: var(--white);
    padding: 40px 20px 25px;
    margin-top: 20px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-logo {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--red-primary), var(--red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.footer-logo-text {
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    line-height: 1.4;
}

.footer-contact {
    text-align: center;
    font-size: 14px;
    line-height: 2;
}

.footer-contact i {
    margin-left: 8px;
}

.footer-copyright {
    text-align: center;
    font-size: 13px;
    opacity: 0.85;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    width: 100%;
    max-width: 600px;
}

.footer-copyright small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.7;
}

/* ========================================
   Mobile Navigation
======================================== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-title {
    font-size: 18px;
    font-weight: bold;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav-menu {
    padding: 10px 0;
}

/* Menu module output in mobile nav */
.mobile-nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu ul li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--text-dark);
    font-size: 15px;
    transition: var(--transition);
}

.mobile-nav-menu ul li a:hover {
    background: #f5f5f5;
    color: var(--blue-primary);
}

.mobile-nav-menu ul li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--text-dark);
    font-size: 15px;
    transition: var(--transition);
}

.mobile-nav-menu ul li a:hover {
    background: #f5f5f5;
    color: var(--blue-primary);
}

.mobile-nav-menu ul li a i {
    font-size: 18px;
    color: var(--blue-primary);
}

.mobile-search {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-search .search-box {
    width: 100%;
}

.mobile-search .search-input {
    width: 100%;
}

/* ========================================
   Joomla Module Overrides
======================================== */
.sidebar .moduletable {
    margin-bottom: 0;
}

.sidebar .module-title {
    display: none;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 250px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .moduletable {
        flex: 1 1 280px;
        min-width: 280px;
    }

    .center-content {
        order: -1;
    }

    .header-top {
    }

    .logo-container {
        width: 140px;
        height: 140px;
    }

    .logo-text {
        font-size: 22px;
    }

    .portrait-placeholder {
        width: 90px;
        height: 125px;
    }

    .nav-menu .nav-link {
        padding: 15px 18px;
        font-size: 14px;
    }

    .search-input {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .header-left,
    .header-right {
        display: none;
    }

    .header-top > div.header-center {
        padding: 0;
        width:100%;
        text-align: center;
        padding:15px;
    }
   .header-top > div.header-center img{
      max-height:100px;
   }
    .logo-container {
        width: 130px;
        height: 130px;
    }

    .logo-text {
        font-size: 20px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .search-container {
        display: none;
    }


    .main-content {
        padding: 15px;
        gap: 15px;
    }

    .sidebar {
        flex-direction: column;
    }

    .moduletable {
        min-width: 100%;
    }

    .gov-footer {
        padding: 30px 15px 20px;
    }

    .footer-logo {
        width: 80px;
        height: 80px;
    }

    .footer-logo-text {
        font-size: 14px;
    }
    html body .news-item{
      display:block;
    }
    html body .news-item .news-thumb{
      max-width:100%;
      min-width:100%;
    }
}

@media (max-width: 480px) {
    .logo-container {
        width: 110px;
        height: 110px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-subtitle {
        font-size: 11px;
    }

    .profile-image {
        width: 130px;
        height: 160px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ========================================
   Utility Classes
======================================== */
.text-center { text-align: center; }
.text-red { color: var(--red-primary); }
.text-blue { color: var(--blue-primary); }
.text-green { color: var(--green-primary); }
.mt-2 { margin-top: 10px; }
.mb-2 { margin-bottom: 10px; }
.p-3 { padding: 15px; }
.news-item{
   display:flex;
}
.news-item .news-thumb{
   min-width:100px;
   margin-left: 10px;
   max-width: 250px;
   overflow: hidden;
}
.news-item .news-thumb img{
   width: 100%;
   height:auto;
   border-radius: 10px;
}
.news-date{
   font-size: 12px;
   color:#999;
}
.news-title{
   font-weight:700;
   font-size:16px;
}
.news-excerpt{
   font-size:13px;
   color:#333333;
}