/* Add Font Definitions */
/* @font-face {
    font-family: 'FontHeadline'; 
    src: url('../fonts/BYekanPlus.woff2') format('woff2'), 
         url('../fonts/BYekanPlus.woff') format('woff');   
    font-weight: bold;
    font-style: normal;
    font-display: swap;
} */
/* Removed FontHeadline definition */

@font-face {
    font-family: 'FontBody';
    /* Custom name for body font */
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'),
        /* Adjust filename if needed */
        url('../fonts/Vazirmatn-Regular.woff') format('woff');
    /* Adjust filename if needed */
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    /* Improve loading performance */
}

/* Global Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Apply Fonts */
body {
    /* font-family: 'Tahoma', sans-serif; */
    /* Original font */
    font-family: 'FontBody', Tahoma, sans-serif;
    /* Apply Vazirmatn */
    direction: rtl;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
    /* Light gray background */
    background-image: url('../images/brushed-alum.png');
    /* بک‌گراند پترن برای تم‌های روشن و سبز */
    background-repeat: repeat;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    position: relative;
    /* Required for the z-index of the pseudo-element */
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    /* As requested */
    background-image: url('../images/bg.jpg');
    background-size: cover;
    /* Cover the 100% width and 500px height */
    background-position: center center;
    /* Center the background image */
    background-repeat: no-repeat;
    z-index: -1;
    /* Place it behind the actual content */
    opacity: 0.75;
    /* Optional: Adjust opacity if the background is too strong */
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    /* For Safari/Chrome compatibility */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 90%;
    /* Responsive width */
    /* overflow: hidden; */
    /* Optional: Adding this to the main container too */
}

/* Reduced heading sizes globally */
h1,
h2,
h3,
h4,
h5,
h6 {
    /* font-family: 'FontHeadline', 'FontBody', Tahoma, sans-serif; */
    /* Original */
    font-family: inherit;
    /* Inherit FontBody from body */
    color: #1a5276;
    /* A shade of blue */
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    /* Better readability for headings */
}

h1 {
    font-size: 1.9em;
    /* Reduced from default */
}

h2 {
    font-size: 1.7em;
    /* Reduced from default */
}

h3 {
    font-size: 1.4em;
    /* Specified explicitly */
}

h4 {
    font-size: 1.2em;
    /* Specified explicitly */
}

h5 {
    font-size: 1.1em;
    /* Specified explicitly */
}

h6 {
    font-size: 1em;
    /* Specified explicitly */
}

a {
    color: #4a7cad;
    /* Link color */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    /* Darker link color on hover */
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Images in content sections */
section img,
main img,
.container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Image alignment classes for content editor */
section img[style*="float: left"],
main img[style*="float: left"],
.container img[style*="float: left"] {
    float: left;
    margin: 10px 20px 10px 0;
    max-width: 50%;
}

section img[style*="float: right"],
main img[style*="float: right"],
.container img[style*="float: right"] {
    float: right;
    margin: 10px 0 10px 20px;
    max-width: 50%;
}

section img[style*="text-align: center"],
main img[style*="text-align: center"],
.container img[style*="text-align: center"] {
    display: block;
    margin: 15px auto;
}

/* Responsive images */
@media (max-width: 768px) {

    section img[style*="float: left"],
    section img[style*="float: right"],
    main img[style*="float: left"],
    main img[style*="float: right"],
    .container img[style*="float: left"],
    .container img[style*="float: right"] {
        float: none;
        max-width: 100%;
        margin: 15px auto;
        display: block;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #4a7cad;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

/* Main Content Area */
main {
    padding: 30px 0;
    overflow: hidden;
    /* Added overflow hidden to main content area */
}

section {
    background: #fff url('../images/rocky-wall.png') repeat;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* News Ticker Styles */
.news-ticker-container {
    /* Match .container styles for consistent width and centering */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    /* padding-left: 15px; */
    /* Resetting horizontal padding, vertical padding adjusted below */
    /* padding-right: 15px; */
    /* Resetting horizontal padding, vertical padding adjusted below */
    box-sizing: border-box;

    /* Make it look like a <section> */
    background: #fff;
    /* From section */
    /* padding: 25px; */
    /* Replaced with specific top/bottom and potentially inner padding for wrap */
    padding-top: 25px;
    /* Consistent with section vertical padding */
    padding-bottom: 25px;
    /* Consistent with section vertical padding */
    margin-top: 25px;
    /* Consistent top margin */
    margin-bottom: 25px;
    /* From section */
    border-radius: 8px;
    /* From section */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* From section */

    overflow: hidden;
    /* Keep this for inner ticker functionality */
}

/* .news-ticker-title {
    float: right; 
    margin-left: 10px; 
    font-weight: bold;
    color: #333;
    padding: 5px 10px;
    background-color: #e0e0e0;
    border-radius: 3px;
} */
/* Removed */

.news-ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    /* Add horizontal padding here to align text with main content, if news-ticker-container has no horizontal padding */
    /* padding-left: 15px; */
    /* Example: Match .container's padding */
    /* padding-right: 15px; */
    /* Example: Match .container's padding */
    /* box-sizing: border-box; */
    /* If adding padding to wrap */
}

/* html[dir="ltr"] .news-ticker-title {
    float: left;
    margin-left: 0;
    margin-right: 10px;
} */
/* Removed */

html[dir="ltr"] .news-ticker-wrap {
    /* No specific LTR margin adjustments needed now title is gone and wrap is 100% */
}

.news-ticker {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-block;
    /* Allows transform to work correctly */
    /* Animation will be controlled by JS transform */
}

.news-ticker li {
    display: inline-block;
    /* Lay out items in a single line */
    padding: 5px 15px;
    margin-right: 10px;
    /* Space between news items */
    white-space: nowrap;
    /* Prevent text wrapping within a single item */
}

.news-ticker li a {
    text-decoration: none;
    color: #337ab7;
}

.news-ticker li a:hover {
    color: #23527c;
    text-decoration: underline;
}



/* body.theme-dark .news-ticker-title {
    color: #e0e0e0; 
    background-color: #4a4e54; 
} */
/* Removed */





/* Quick Links Section */
.quick-links .links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Spacing between links */
}

.quick-link-item {
    background-color: #e9f5ff;
    border: 1px solid #bde0fe;
    padding: 10px 15px;
    border-radius: 5px;
    color: #0a58ca;
    text-align: center;
    flex-grow: 1;
    /* Allow items to grow */
    transition: all 0.3s ease;
}

.quick-link-item:hover {
    background-color: #cfe9ff;
    border-color: #a3d5fe;
    color: #074085;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Responsive Design Adjustments */
@media (max-width: 992px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.6em;
    }

    h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    h1 {
        font-size: 1.6em;
        /* Smaller for mobile */
        margin-bottom: 0.8rem;
    }

    h2 {
        font-size: 1.4em;
        /* Smaller for mobile */
        margin-bottom: 0.8rem;
    }

    h3 {
        font-size: 1.2em;
    }

    h4 {
        font-size: 1.1em;
    }

    h5,
    h6 {
        font-size: 1em;
    }

    .quick-links .links-container {
        flex-direction: column;
    }

    .quick-link-item {
        width: 100%;
        /* Full width on small screens */
        box-sizing: border-box;
        /* Include padding in width */
    }

    /* Adjustments for header/footer responsiveness already handled in their respective files */

    .news-ticker li {
        padding: 0 15px;
        /* Less padding on smaller screens */
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.4em;
        /* Even smaller for very small devices */
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1.15em;
    }

    h4,
    h5,
    h6 {
        font-size: 1em;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    section {
        padding: 15px;
    }
}

/* Swiper Slideshow Styles */
/* Green Theme Glassmorphism Slideshow */
.slideshow-container.theme-green-slideshow {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom: 10px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(180%) !important;
    margin-top: 10px;
    margin-bottom: 25px !important;
    border-radius: 16px !important;
    padding: 17px !important;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.slideshow-container.theme-green-slideshow .swiper-container {
    border-radius: 8px;
    overflow: hidden;
    margin: 0 !important;
}

.slideshow-container.theme-green-slideshow .main-slideshow {
    margin: 0 !important;
}

.slideshow-container.theme-green-slideshow .swiper-slide {
    position: relative;
}

.slideshow-container.theme-green-slideshow .swiper-slide img {
    border-radius: 0 !important;
    display: block;
    margin: 0;
}

.slide-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
    padding: 30px 20px 15px;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swiper-slide:hover .slide-title-overlay {
    opacity: 1;
}

.swiper-container.main-slideshow {
    width: 100%;
    height: 480px;
    /* Increased for more significant visibility as requested */
    /* border: 2px solid #eee; */
    /* Moved border here - REMOVING border to rely on container */
    border-radius: 0;
    /* Apply border-radius to match the container's rounding - SETTING TO 0 */
    overflow: hidden;
    /* Add overflow hidden directly to the swiper container */
    box-sizing: border-box;
    /* Explicit box-sizing */
    background: transparent;
    /* کاملاً شفاف */
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: transparent;
    /* کاملاً شفاف */
    overflow: hidden;
    /* Keep this */
    /* Center slide content vertically */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    /* Explicit box-sizing */
    border-radius: 0;
    /* Removed border-radius from the slide itself */
}

.swiper-slide img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    /* Changed from contain to cover for better fill with border-radius */
    box-sizing: border-box;
    /* Explicit box-sizing */
    border-radius: 0;
    /* Removed border-radius from images */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Added subtle shadow to images */
    transition: all 0.3s ease;
    /* Added smooth transition for hover effects */
}

/* Hover effect for default theme images */
.swiper-slide img:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    /* Enhanced shadow on hover */
    transform: scale(1.02);
    /* Subtle zoom effect on hover */
}

/* Custom Navigation Arrows */
/* Removed .swiper-button-prev, .swiper-button-next styles as they are no longer used */

/* Swiper Pagination Styles */
.swiper-container .swiper-pagination {
    position: absolute;
    bottom: 10px;
    /* Adjust as needed */
    left: 0;
    width: 100%;
    text-align: center;
}

.swiper-pagination-bullet {
    width: 12px;
    /* Slightly larger bullets */
    height: 12px;
    /* Slightly larger bullets */
    background-color: #ccc;
    opacity: 0.8;
    /* Slightly transparent default bullets */
    border-radius: 50%;
    display: inline-block;
    margin: 0 6px;
    /* Increased spacing */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.swiper-pagination-bullet:hover {
    opacity: 1;
    transform: scale(1.1);
}

.swiper-pagination-bullet-active {
    background-color: #4a7cad;
    transform: scale(1.25);
    /* Emphasize active bullet more */
    opacity: 1;
}

/* Dark Theme Adjustments for Swiper Pagination */
.theme-dark .swiper-pagination-bullet {
    background-color: #555;
    /* Dark theme default bullet color - adjusted */
    opacity: 0.7;
}

.theme-dark .swiper-pagination-bullet:hover {
    opacity: 1;
}

.theme-dark .swiper-pagination-bullet-active {
    background-color: #90caf9;
    opacity: 1;
}

/* Dark Theme for Slides */
.theme-dark .slideshow-container {
    background-color: rgba(40, 40, 40, 0.4);
    /* پس‌زمینه نیمه‌شفاف برای تم تاریک */
    background-image: none !important;
    /* هیچ تصویر پس‌زمینه‌ای استفاده نشود */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 6px solid rgba(255, 255, 255, 0.2);
    /* بوردر سفید و نیمه‌شفاف - پایین ضخیم‌تر */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
    /* سایه سفید و مات */
}

.theme-dark .swiper-container.main-slideshow {
    background: transparent;
    /* پس‌زمینه شفاف مثل تم روشن */
}

.theme-dark .swiper-slide {
    background: transparent;
    /* پس‌زمینه شفاف مثل تم روشن */
}

.theme-dark .swiper-slide img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* سایه مشابه تم روشن */
    transition: all 0.3s ease;
    /* ترنزیشن مشابه تم روشن */
}

.theme-dark .swiper-slide img:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    /* سایه هاور مشابه تم روشن */
    transform: scale(1.02);
    /* زوم مشابه تم روشن */
}

.theme-dark .swiper-pagination-bullet {
    background-color: #ccc;
    /* رنگ مشابه تم روشن */
    opacity: 0.8;
}

.theme-dark .swiper-pagination-bullet:hover {
    opacity: 1;
    transform: scale(1.1);
}

.theme-dark .swiper-pagination-bullet-active {
    background-color: #4a7cad;
    /* رنگ مشابه تم روشن */
    transform: scale(1.25);
    opacity: 1;
}

/* === LTR Specific Styles === */
html[dir="ltr"] body {
    /* Most base styles should work, specific adjustments below */
    direction: ltr;
    text-align: left;
}

/* Header LTR */
html[dir="ltr"] .logo img {
    margin-left: 0;
    margin-right: 15px;
}

html[dir="ltr"] .dropdown-menu {
    right: auto;
    left: 0;
}

html[dir="ltr"] .language-switcher {
    margin-right: 0;
    /* Reset RTL margin */
    margin-left: auto;
    /* Push to the right in LTR */
    padding-left: 0;
    padding-right: 15px;
    border-left: none;
    border-right: 1px solid #ccc;
}

/* Footer LTR */
html[dir="ltr"] .footer-section.links ul li a:hover {
    padding-right: 0;
    padding-left: 5px;
}

html[dir="ltr"] .footer-section.contact-info i {
    margin-left: 0;
    margin-right: 8px;
}

/* Responsive LTR */
@media (max-width: 768px) {
    html[dir="ltr"] .language-switcher {
        margin-left: 0;
        /* Reset margin-left: auto */
        margin-right: 0;
        border-right: none;
        border-top: 1px solid #eee;
        /* Keep top border */
    }

    /* Add other LTR responsive adjustments if needed */
}

/* Add other LTR adjustments as needed */

/* Ensure buttons and inputs also use the body font if desired */
button,
input,
textarea,
select {
    font-family: inherit;
    /* Inherit from body */
}

/* === Dark Theme Styles === */
html body.theme-dark {
    /* Increased specificity */
    background-color: #1f1f1f !important;
    /* Added !important for testing */
    background-image: url('../images/asfalt-light.png') !important;
    background-repeat: repeat;
    background-attachment: fixed;
    color: #e0e0e0;
    /* Lighter base text */
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark h5,
.theme-dark h6 {
    color: #ffffff;
    /* White headings */
}

.theme-dark a {
    color: #90caf9;
    /* Lighter blue for links */
}

.theme-dark a:hover {
    color: #bbdefb;
}

/* Header Dark */
.theme-dark header {
    background-color: rgba(44, 44, 44, var(--header-bg-opacity, 0.7));
    /* Darker header/footer background with variable transparency */
    padding: 30px 0;
    /* Reduced from 35px to 30px */
    border-bottom: 1px solid #4a4a4a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    margin-bottom: 50px;
    /* Added for 50px space below header */
}

.theme-dark .logo a,
.theme-dark .logo h1 {
    color: #ffffff;
}

.theme-dark nav ul.nav-links a {
    color: #d0d0d0;
    /* Slightly brighter nav links */
}

.theme-dark nav ul.nav-links a:hover,
.theme-dark nav ul.nav-links a.active {
    color: #ffffff;
}

.theme-dark nav ul.nav-links a::after {
    background: #ffffff;
}

.theme-dark .menu-toggle {
    color: #ffffff;
}

/* Dropdown Dark */
.theme-dark .dropdown-menu {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.theme-dark .dropdown-menu li a {
    color: #e0e0e0;
    /* Lighter default color */
}

.theme-dark .dropdown-menu li a::before {
    color: #a8d8ff;
    /* Lighter blue for arrow */
}

.theme-dark .dropdown-menu li a:hover {
    background-color: #3a4c5d;
    color: #ffffff;
    /* Pure white on hover */
}

.theme-dark .dropdown-menu li a:hover::before {
    color: #ffffff;
    /* Pure white arrow on hover */
}

.theme-dark .dropdown-menu li a.active {
    background-color: #3a4c5d;
    color: #ffffff;
    /* Pure white for active state */
}

.theme-dark .dropdown-menu li a.active::before {
    color: #ffffff;
    /* Pure white arrow for active state */
}

.theme-dark .language-dropdown>a .arrow,
.theme-dark .theme-dropdown>a .arrow {
    color: #d0d0d0;
    /* Match nav link color */
}

.theme-dark .language-dropdown>a:hover .arrow,
.theme-dark .theme-dropdown>a:hover .arrow {
    color: #ffffff;
}

/* Language/Theme Separator Dark (Desktop) */
.theme-dark .language-dropdown {
    border-left-color: #5a5a5a;
}

html[dir="ltr"].theme-dark .language-dropdown {
    border-right-color: #5a5a5a;
    border-left: none;
}

.theme-dark .theme-dropdown {
    border-left-color: #5a5a5a;
}

html[dir="ltr"].theme-dark .theme-dropdown {
    border-right-color: #5a5a5a;
    border-left: none;
}


/* Sections Dark */
.theme-dark main {
    background-color: transparent;
    /* Ensure main area doesn't override body */
}

.theme-dark section {
    background: #2c2c2c url('../images/rocky-wall.png') repeat !important;
    /* Dark theme section with new background */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45) !important;
    /* سایه تیره با شفافیت بیشتر برای تم تاریک */
    border: 1px solid #4a4a4a !important;
}

.theme-dark section h2 {
    border-bottom-color: #4a4a4a;
}

/* Buttons Dark */
.theme-dark .btn {
    background-color: #90caf9;
    color: #1f1f1f;
    /* Dark text on light blue button */
    font-weight: bold;
}

.theme-dark .btn:hover {
    background-color: #bbdefb;
    color: #111111;
}

/* Forms Dark */
.theme-dark .contact-form label {
    color: #d0d0d0;
}

.theme-dark .contact-form input[type="text"],
.theme-dark .contact-form input[type="email"],
.theme-dark .contact-form textarea {
    background-color: #3e3e3e;
    border-color: #5a5a5a;
    color: #e0e0e0;
}

.theme-dark .contact-form input::placeholder,
.theme-dark .contact-form textarea::placeholder {
    color: #999;
}

/* News Ticker Dark */
.theme-dark .news-ticker-wrap {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
}

.theme-dark .news-ticker li a {
    color: #e0e0e0;
}

.theme-dark .news-ticker li a:hover {
    color: #ffffff;
}

/* Quick Links Dark */
.theme-dark .quick-link-item {
    background-color: #3a4c5d;
    border-color: #607d8b;
    color: #d5e5f0;
}

.theme-dark .quick-link-item:hover {
    background-color: #4a6278;
    border-color: #7899af;
    color: #ffffff;
}

/* Footer Dark */
.theme-dark footer {
    background: #2c2c2c;
    color: #b0b0b0;
}

.theme-dark .footer-section h2 {
    color: #ffffff;
    border-bottom-color: #4a4a4a;
}

.theme-dark .footer-section.links ul li a {
    color: #b0b0b0;
}

.theme-dark .footer-section.links ul li a:hover {
    color: #ffffff;
}

.theme-dark .footer-section.contact-info a {
    color: #b0b0b0;
}

.theme-dark .footer-section.contact-info a:hover {
    color: #ffffff;
}

.theme-dark .footer-section.contact-info i {
    color: #90caf9;
    /* Match link color */
}

.theme-dark .footer-bottom {
    background: #1f1f1f;
    border-top-color: #4a4a4a;
}

/* Swiper Dark */
/* Replaced by new styles above */
.theme-dark .swiper-container.main-slideshow {
    border-color: #4a4a4a;
    border-radius: 0;
    /* Ensure dark theme also has no radius here if that's the goal */
}

.theme-dark .swiper-slide {
    background: #333;
    /* Slightly darker slide background */
}

.theme-dark .swiper-button-prev,
.theme-dark .swiper-button-next {
    color: #e0e0e0;
    /* Light arrows */
    opacity: 0.6;
    /* Default visibility */
}

.theme-dark .slideshow-container:hover .swiper-button-prev,
.theme-dark .slideshow-container:hover .swiper-button-next {
    opacity: 0.9;
}

.theme-dark .swiper-button-prev:hover,
.theme-dark .swiper-button-next:hover {
    color: #ffffff;
    opacity: 1;
}

/* Auth Page Dark */
.theme-dark .login-container {
    background-color: #2c2c2c;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.theme-dark .login-container h1 {
    color: #ffffff;
}

.theme-dark .login-container label {
    color: #d0d0d0;
}

.theme-dark .login-container input[type="password"] {
    background-color: #3e3e3e;
    border-color: #5a5a5a;
    color: #e0e0e0;
}

.theme-dark .login-container button {
    background-color: #90caf9;
    color: #1f1f1f;
    font-weight: bold;
}

.theme-dark .login-container button:hover {
    background-color: #bbdefb;
    color: #111111;
}

.theme-dark .error {
    color: #f48fb1;
}

/* Lighter pink/red */


/* --- Responsive Dark --- */
@media (max-width: 768px) {

    /* Adjust mobile menu background/links */
    .theme-dark nav ul.nav-links {
        background-color: #2c2c2c;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    }

    /* Mobile dropdown items */
    .theme-dark .dropdown-menu li a {
        background-color: #3e3e3e;
        border-top-color: #5a5a5a;
        color: #e0e0e0;
    }

    .theme-dark .dropdown-menu li a:hover {
        background-color: #4f4f4f;
    }

    .theme-dark .dropdown-menu li a.active {
        background-color: #5a5a5a;
    }

    /* Mobile language/theme main links */
    .theme-dark .language-dropdown>a,
    .theme-dark .theme-dropdown>a {
        border-top-color: #4a4a4a;
        color: #d0d0d0;
    }

    /* Mobile language/theme sub-items */
    html body.theme-dark .language-menu li a,
    html body.theme-dark .theme-menu li a {
        background-color: #484848;
        border-color: #606060;
        color: #e0e0e0;
        /* Ensure base color is set */
    }

    /* Increased specificity for mobile hover text color */
    html body.theme-dark .language-menu li a:hover,
    html body.theme-dark .theme-menu li a:hover {
        background-color: #585858;
        color: #1f1f1f !important;
        /* ADDED !important for testing mobile hover */
    }

    html body.theme-dark .language-menu li a.active,
    html body.theme-dark .theme-menu li a.active {
        background-color: #656565;
    }

}

/* === Swiper Slideshow LTR Adjustments === */
html[dir="ltr"] .main-slideshow .swiper-button-next {
    right: auto;
    left: 10px;
}

html[dir="ltr"] .main-slideshow .swiper-button-prev {
    left: auto;
    right: 10px;
    /* Adjust if it was left previously */
}

/* === News Article Page Styles === */
.news-article-page {
    padding-top: 20px;
    padding-bottom: 20px;
}

.news-item-full {
    background-color: var(--background-color-card, #fff);
    /* Use theme variable */
    padding: 20px;
    border: 1px solid var(--border-color-card, #ddd);
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    /* سایه بزرگ‌تر و تیره‌تر */
}

.news-item-header h1 {
    font-size: 2em;
    /* Larger for article title */
    color: var(--text-color-headings, #333);
    margin-top: 0;
    margin-bottom: 10px;
}

.news-meta {
    font-size: 0.9em;
    color: var(--text-color-muted, #777);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color-soft, #eee);
    padding-bottom: 10px;
}

.news-item-image-container {
    margin-bottom: 20px;
    text-align: center;
    /* Center the image */
}

.news-item-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-color-soft, #eee);
}

.news-item-content {
    line-height: 1.8;
    color: var(--text-color-default, #555);
    font-size: 1.1em;
}

.news-item-content p {
    margin-bottom: 1em;
}

.back-to-news-link {
    margin-top: 20px;
    text-align: center;
}

.back-to-news-link a {
    text-decoration: none;
    color: #337ab7;
    padding: 8px 15px;
    border: 1px solid #337ab7;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.back-to-news-link a:hover {
    background-color: #337ab7;
    color: #fff;
}

/* Dark Theme Adjustments for News Article Page */
.theme-dark .news-item-full {
    background-color: var(--background-color-card-dark, #2c2c2c);
    /* Darker card */
    border-color: var(--border-color-card-dark, #444);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    /* سایه تیره با شفافیت بیشتر برای تم تاریک */
}

.theme-dark .news-item-header h1 {
    color: var(--text-color-headings-dark, #eee);
}

.theme-dark .news-meta {
    color: var(--text-color-muted-dark, #aaa);
    border-bottom-color: var(--border-color-soft-dark, #444);
}

.theme-dark .news-item-image {
    border-color: var(--border-color-soft-dark, #444);
}

.theme-dark .news-item-content {
    color: var(--text-color-default-dark, #ccc);
}

.theme-dark .back-to-news-link a {
    color: var(--link-color-dark, #5bc0de);
    border-color: var(--link-color-dark, #5bc0de);
}

.theme-dark .back-to-news-link a:hover {
    background-color: var(--link-color-dark, #5bc0de);
    color: var(--background-color-dark, #1e1e1e);
    /* Or a very light color for contrast */
}

/* Existing responsive styles */
@media (max-width: 768px) {
    /* ... existing responsive styles ... */
}

/* Top News Preview Bar */
.top-news-preview-bar {
    background-color: var(--secondary-background-color, #e9ecef);
    padding: 8px 0;
    font-size: 0.85em;
    border-bottom: 1px solid var(--border-color-soft, #dee2e6);
    color: var(--text-color-secondary, #495057);
}

.top-news-preview-bar .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.top-news-preview-title {
    font-weight: bold;
    margin-left: 10px;
    /* در فارسی margin-right */
    white-space: nowrap;
}

.top-news-preview-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 10px;
    /* در فارسی margin: 0 10px 0 0; */
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
}

.top-news-preview-list li {
    margin-left: 15px;
    /* در فارسی margin-right */
    white-space: nowrap;
}

.top-news-preview-list li:first-child {
    margin-left: 0;
    /* در فارسی margin-right: 0; */
}


.top-news-preview-list a {
    text-decoration: none;
    color: var(--link-color, #007bff);
}

.top-news-preview-list a:hover {
    text-decoration: underline;
    color: var(--link-hover-color, #0056b3);
}

.top-news-archive-link {
    margin-left: auto;
    /* در فارسی margin-right: auto; margin-left: 15px; */
    font-weight: 500;
    white-space: nowrap;
    color: var(--link-color, #007bff);
    text-decoration: none;
}

.top-news-archive-link:hover {
    text-decoration: underline;
}

/* RTL adjustments for .top-news-preview-bar */
html[dir="rtl"] .top-news-preview-title {
    margin-left: 0;
    margin-right: 10px;
}

html[dir="rtl"] .top-news-preview-list {
    margin: 0 10px 0 0;
}

html[dir="rtl"] .top-news-preview-list li {
    margin-left: 0;
    margin-right: 15px;
}

html[dir="rtl"] .top-news-preview-list li:first-child {
    margin-right: 0;
}

html[dir="rtl"] .top-news-archive-link {
    margin-left: 15px;
    margin-right: auto;
}


/* Dark Theme Adjustments for Top News Preview */
.theme-dark .top-news-preview-bar {
    background-color: var(--secondary-background-color-dark, #3a3f44);
    border-bottom-color: var(--border-color-soft-dark, #4f5459);
    color: var(--text-color-secondary-dark, #adb5bd);
}

.theme-dark .top-news-preview-list a {
    color: var(--link-color-dark, #80bfff);
}

.theme-dark .top-news-preview-list a:hover {
    color: var(--link-hover-color-dark, #a8d8ff);
}

.theme-dark .top-news-archive-link {
    color: var(--link-color-dark, #80bfff);
}

/* === Modern Header Styles === */
.main-header {
    background-color: rgba(255, 255, 255, 0.65);
    /* More transparent as requested */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Scrolled state */
.main-header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.85);
    /* Slightly less transparent when scrolled */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles */
.logo a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img.header-logo-img {
    height: 55px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.logo:hover img.header-logo-img {
    transform: scale(1.1) rotate(5deg);
}

.logo h1 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 800;
    /* Green gradient to match the theme */
    background: linear-gradient(45deg, #1b5e20, #2e7d32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

/* Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
}

nav ul.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 5px;
}

nav ul.nav-links>li {
    position: relative;
}

nav ul.nav-links>li>a {
    text-decoration: none;
    color: #1b5e20;
    /* Dark Green for better visibility and theme match */
    font-weight: 700;
    /* Bolder for better visibility */
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1em;
    /* Slightly larger */
}

/* Search Icon Styles */
.search-nav-item {
    position: relative;
    margin-right: 5px;
}

.search-nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background: rgba(44, 95, 45, 0.15) !important;
    color: #2c5f2d !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(44, 95, 45, 0.1);
    padding: 0 !important;
    border: 2px solid rgba(44, 95, 45, 0.3);
}

.search-nav-link:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(44, 95, 45, 0.25);
    background: rgba(44, 95, 45, 0.25) !important;
    border-color: rgba(44, 95, 45, 0.5);
}

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

nav ul.nav-links>li>a:hover,
nav ul.nav-links>li>a.active {
    color: #2e7d32;
    /* Lighter green on hover */
    background-color: rgba(46, 125, 50, 0.1);
    /* Green tint background */
}

/* Remove old underline effect */
nav ul.nav-links a::after {
    display: none;
}

/* Icons in Nav */
.arrow-icon {
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.dropdown:hover .arrow-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu Modernization */
.dropdown-menu {
    display: block;
    /* Always block but hidden by opacity/visibility for animation */
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 120%;
    /* Start slightly lower */
    right: 0;
    /* RTL default */
    background-color: #fff;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 10px;
    margin: 0;
    list-style: none;
    z-index: 1001;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    top: 100%;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.dropdown-menu li a:hover {
    background-color: #f0f7ff;
    color: #0056b3;
    transform: translateX(-5px);
    /* Move left for RTL */
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #333;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Hamburger Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}



/* Responsive Header */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    nav ul.nav-links {
        position: fixed;
        top: 0;
        left: 0;
        /* Full width */
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }



    nav ul.nav-links.active {
        transform: translateY(0);
    }

    nav ul.nav-links>li>a {
        font-size: 1.2em;
        padding: 15px 30px;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        display: none;
        /* Hidden by default */
        text-align: center;
        padding: 0;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .dropdown-menu li a:hover {
        transform: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LTR Adjustments */
html[dir="ltr"] .dropdown-menu {
    right: auto;
    left: 0;
}

html[dir="ltr"] .dropdown-menu li a:hover {
    transform: translateX(5px);
    /* Move right for LTR */
}

/* === LTR Specific Styles === */
/* ... other LTR styles ... */

html[dir="ltr"] .dropdown-menu {
    right: auto;
    left: 0;
}

/* Remove previous language switcher LTR styles */
/*
html[dir="ltr"] .language-switcher { ... }
*/

/* LTR Dropdowns */
html[dir="ltr"] .language-dropdown>a .arrow,
html[dir="ltr"] .theme-dropdown>a .arrow {
    /* Apply to both */
    margin-right: 0;
    margin-left: 5px;
    /* Space after arrow in LTR */
}

/* Remove text-align for LTR dropdown links to inherit center alignment */
/*
html[dir="ltr"] .language-menu a,
html[dir="ltr"] .theme-menu a {
    text-align: left;
}
*/

/* Responsive LTR */
@media (max-width: 768px) {

    html[dir="ltr"] .language-dropdown>a,
    html[dir="ltr"] .theme-dropdown>a {
        /* Apply to both */
        /* Text align center is fine */
    }

    html[dir="ltr"] .language-menu li a,
    html[dir="ltr"] .theme-menu li a {
        /* Apply to both */
        padding-left: 15px;
        /* Adjust padding for LTR */
        padding-right: 15px;
        /* Use symmetrical padding */
        /* padding-right: 30px; */
        /* REMOVED LTR specific padding */
        text-align: center;
        /* Ensure center alignment for LTR mobile */
    }

    /* Remove previous LTR lang switcher mobile */
    /* html[dir="ltr"] .language-switcher { ... } */
}

/* Add other LTR adjustments as needed */

/* News Slider Styles */
/*
<div class="news-slider-container <?php echo (isset($current_theme) && $current_theme === 'dark') ? 'dark-mode' : ''; ?>">
    <div class="news-slides-wrapper"> <?php // Wrapper for potential scrolling ?>
        <ul class="news-slides">
            <?php
            global $conn; 
            $news_conn_slider = null; // Initialize

            if (isset($conn) && $conn) {
                $news_conn_slider = $conn;
            } else {
                if (file_exists(__DIR__ . '/../config/db.php')) {
                     include_once __DIR__ . '/../config/db.php';
                     $news_conn_slider_temp = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
                     if (!$news_conn_slider_temp->connect_error) {
                        $news_conn_slider_temp->set_charset("utf8mb4");
                        $news_conn_slider = $news_conn_slider_temp;
                     } else {
                        // echo "<!-- DB Connection Error for Slider: " . $news_conn_slider_temp->connect_error . " -->";
                     }
                } else {
                    // echo "<!-- db.php not found for slider -->";
                }
            }

            if ($news_conn_slider) {
                $current_lang_slider = isset($_SESSION['lang']) ? $_SESSION['lang'] : 'fa'; // Default to Persian if not set

                // Determine title and content fields based on language
                $title_field_slider = 'title_' . $current_lang_slider;
                $content_field_slider = 'content_' . $current_lang_slider; // Not used in slider currently, but good for consistency
                
                // Fallback fields
                $fallback_title_field_slider = 'title_fa'; // Default fallback to Persian
                // $fallback_content_field_slider = 'content_fa';

                // Query to fetch news, prioritizing current language title, then fallback
                // Also ensuring there's an image for the slider item
                $sql_news_slider = sprintf(
                    "SELECT id, 
                            COALESCE(NULLIF(TRIM(%s), ''), NULLIF(TRIM(%s), '')) as news_title,
                            image_url, 
                            created_at 
                     FROM news 
                     WHERE is_active = 1 AND image_url IS NOT NULL AND TRIM(image_url) <> ''
                     ORDER BY created_at DESC 
                     LIMIT 5",
                    $news_conn_slider->real_escape_string($title_field_slider),
                    $news_conn_slider->real_escape_string($fallback_title_field_slider)
                );

                $result_news_slider = $news_conn_slider->query($sql_news_slider);

                if ($result_news_slider && $result_news_slider->num_rows > 0) {
                    while ($item_slider = $result_news_slider->fetch_assoc()) {
                        if (!empty(trim($item_slider['news_title']))) { // Ensure title is not empty
                            echo "<li class='news-slide'>";
                            echo "  <a href="news_article.php?id=" . htmlspecialchars($item_slider['id']) . "&lang=" . $current_lang_slider . "">";
                            if (!empty($item_slider['image_url'])) {
                                echo "  <img src='" . htmlspecialchars(trim($item_slider['image_url'])) . "' alt='" . htmlspecialchars(trim($item_slider['news_title'])) . "' class='news-slide-image'>";
                            }
                            echo "  <span class='news-slide-title'>" . htmlspecialchars(trim($item_slider['news_title'])) . "</span>";
                            echo "  </a>";
                            echo "</li>";
                        }
                    }
                } else {
                    // echo "<li class='news-slide-empty'>" . ($lang_general['no_news_available'] ?? 'No current news available.') . "</li>";
                }
                // Close connection if it was opened specifically for the slider
                if (isset($news_conn_slider_temp) && $news_conn_slider_temp instanceof mysqli) {
                    $news_conn_slider_temp->close();
                }
            } else {
                // echo "<li class='news-slide-empty'>" . ($lang_general['news_ticker_db_error'] ?? 'Could not load news.') . "</li>";
            }
            ?>
        </ul>
    </div>
</div>
*/

/* === NEW MODERN FOOTER STYLES === */
/* === CLASSIC FOOTER STYLES === */
#new-modern-footer {
    position: relative;
background: #247d29;
background: linear-gradient(171deg, rgba(36, 125, 41, 1) 1%, rgba(46, 99, 82, 0.93) 15%, rgba(20, 99, 20, 1) 91%);
    /* Further reduced gradient intensity for light theme */
    color: #e0e0e0;
    padding: 40px 0 0;
    margin-top: 80px;
    font-size: 0.9em;
    line-height: 1.6;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    left: 0;
    right: 0;
    mask-image: linear-gradient(to bottom, transparent, black 50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 1%);
}

/* Add a decorative gradient line at the top */
#new-modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #b08d57, transparent);
    opacity: 0.1;
}

#new-modern-footer .footer-main-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 30px 0;
    position: relative;
    z-index: 2;
    width: 100%;
    /* اضافه کردن عرض 100% */
    max-width: 1200px;
    /* حداکثر عرض برای محتوا */
    margin: 0 auto;
    /* وسط چین کردن محتوا */
}

#new-modern-footer .footer-bottom-bar {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85em;
    color: #a0a0a0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
    width: 100%;
    /* اضافه کردن عرض 100% */
}

#new-modern-footer .footer-bottom-bar .container {
    width: 100%;
    /* اضافه کردن عرض 100% */
    max-width: 1200px;
    /* حداکثر عرض برای محتوا */
    margin: 0 auto;
    /* وسط چین کردن محتوا */
    padding: 0 15px;
    /* فاصله از کناره‌ها */
}

#new-modern-footer .footer-column {
    flex: 1;
    min-width: 230px;
    margin: 15px;
    /* Margin around columns */
    padding: 0 20px;
    /* Horizontal padding within columns */
}

/* Special styling for the first column (e.g., logo and about) */
#new-modern-footer .about-column {
    min-width: 280px;
    /* Give more space for logo/description */
}

#new-modern-footer .footer-logo-img {
    max-width: 130px;
    margin-bottom: 20px;
    opacity: 0.9;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

#new-modern-footer .about-column p {
    color: #c0c0c0;
    /* Slightly muted text */
    margin-bottom: 20px;
    font-size: 0.95em;
}

#new-modern-footer h4 {
    color: #ffffff;
    /* White for emphasis */
    font-size: 1.25em;
    /* Classic heading size */
    margin-bottom: 25px;
    font-weight: 500;
    /* Not too bold */
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(176, 141, 87, 0.4);
    /* Subtle gold underline */
    position: relative;
}

#new-modern-footer h4::after {
    /* Small decorative element */
    content: '';
    position: absolute;
    bottom: -2px;
    /* Just below the border */
    left: 0;
    width: 25px;
    height: 3px;
    background-color: #b08d57;
    /* Solid gold accent */
}

#new-modern-footer .links-column ul {
    list-style: none;
    padding: 0;
}

#new-modern-footer .links-column ul li {
    margin-bottom: 12px;
}

#new-modern-footer .links-column ul li a {
    color: #d0d0d0;
    text-decoration: none;
    transition: color 0.3s ease, padding-right 0.3s ease;
    /* For RTL */
    position: relative;
}

html[dir="ltr"] #new-modern-footer .links-column ul li a {
    transition: color 0.3s ease, padding-left 0.3s ease;
    /* For LTR */
}

#new-modern-footer .links-column ul li a::before {
    content: '›';
    /* Classic chevron bullet */
    margin-left: 8px;
    /* RTL */
    color: #b08d57;
    font-weight: bold;
    transition: color 0.3s ease;
    opacity: 0.7;
}

html[dir="ltr"] #new-modern-footer .links-column ul li a::before {
    margin-left: 0;
    margin-right: 8px;
    /* LTR */
}

#new-modern-footer .links-column ul li a:hover {
    color: #ffffff;
    padding-right: 5px;
    /* RTL: slight move */
}

html[dir="ltr"] #new-modern-footer .links-column ul li a:hover {
    padding-left: 5px;
    /* LTR: slight move */
    padding-right: 0;
}

#new-modern-footer .links-column ul li a:hover::before {
    color: #ffffff;
    opacity: 1;
}


#new-modern-footer .contact-column address p {
    color: #d0d0d0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-size: 0.95em;
}

#new-modern-footer .contact-column address p i {
    color: #b08d57;
    margin-left: 12px;
    /* RTL */
    width: 20px;
    text-align: center;
    font-size: 1.1em;
    opacity: 0.8;
}

html[dir="ltr"] #new-modern-footer .contact-column address p i {
    margin-left: 0;
    margin-right: 12px;
    /* LTR */
}

#new-modern-footer .contact-column address p a {
    color: #d0d0d0;
    text-decoration: none;
}

#new-modern-footer .contact-column address p a:hover {
    color: #ffffff;
    text-decoration: underline;
}

#new-modern-footer .footer-social-icons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#new-modern-footer .footer-social-icons a {
    color: #ffffff;
    font-size: 1.2em;
    /* padding: 10px 14px; removed to fix border-box issue */
    padding: 0;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

#new-modern-footer .footer-social-icons a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

#new-modern-footer .footer-social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* Brand-specific colors in normal state */
#new-modern-footer .footer-social-icons a[title="Facebook"] {
    background: rgba(24, 119, 242, 0.2);
    border-color: rgba(24, 119, 242, 0.4);
}

#new-modern-footer .footer-social-icons a[title="Facebook"]:hover {
    background: rgba(24, 119, 242, 0.35);
    border-color: #1877f2;
}

#new-modern-footer .footer-social-icons a[title="X (Twitter)"] {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

#new-modern-footer .footer-social-icons a[title="X (Twitter)"]:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

#new-modern-footer .footer-social-icons a[title="Instagram"] {
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.2), rgba(188, 24, 136, 0.2));
    border-color: rgba(230, 104, 60, 0.4);
}

#new-modern-footer .footer-social-icons a[title="Instagram"]:hover {
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.4), rgba(188, 24, 136, 0.4));
    border-color: #e6683c;
}

#new-modern-footer .footer-social-icons a[title="LinkedIn"] {
    background: rgba(0, 119, 181, 0.2);
    border-color: rgba(0, 119, 181, 0.4);
}

#new-modern-footer .footer-social-icons a[title="LinkedIn"]:hover {
    background: rgba(0, 119, 181, 0.35);
    border-color: #0077b5;
}

#new-modern-footer .footer-social-icons a[title="Telegram"] {
    background: rgba(0, 136, 204, 0.2);
    border-color: rgba(0, 136, 204, 0.4);
}

#new-modern-footer .footer-social-icons a[title="Telegram"]:hover {
    background: rgba(0, 136, 204, 0.35);
    border-color: #0088cc;
}

#new-modern-footer .footer-social-icons a[title="WhatsApp"] {
    background: rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.4);
}

#new-modern-footer .footer-social-icons a[title="WhatsApp"]:hover {
    background: rgba(37, 211, 102, 0.35);
    border-color: #25d366;
}

#new-modern-footer .footer-social-icons a[title="YouTube"] {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
}

#new-modern-footer .footer-social-icons a[title="YouTube"]:hover {
    background: rgba(255, 0, 0, 0.35);
    border-color: #ff0000;
}

#new-modern-footer .footer-social-icons a[title="Aparat"] {
    background: rgba(255, 87, 34, 0.2);
    border-color: rgba(255, 87, 34, 0.4);
}

#new-modern-footer .footer-social-icons a[title="Aparat"]:hover {
    background: rgba(255, 87, 34, 0.35);
    border-color: #ff5722;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    #new-modern-footer .footer-column {
        min-width: calc(50% - 30px);
        /* Two columns */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    #new-modern-footer {
        padding-top: 30px;
        margin-top: 60px;
    }

    #new-modern-footer .footer-main-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #new-modern-footer .footer-column {
        min-width: 100%;
        max-width: 400px;
        margin: 15px 0;
        /* Vertical margin only */
        padding: 0 15px;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
        /* Separator for mobile */
        padding-bottom: 20px;
    }

    #new-modern-footer .footer-column:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    #new-modern-footer h4 {
        text-align: center;
    }

    #new-modern-footer h4::after {
        left: 50%;
        transform: translateX(-50%);
        /* Center the decorative element */
    }

    #new-modern-footer .links-column ul li a::before {
        /* Optionally hide or adjust for centered text */
    }

    #new-modern-footer .contact-column address p {
        justify-content: center;
        /* Center contact items */
    }

    #new-modern-footer .footer-social-icons {
        text-align: center;
        /* Center social icons */
        margin-top: 25px;
    }
}

/* --- Theme Adaptations --- */

/* Dark Theme (current base is already dark, make subtle adjustments if needed) */
.theme-dark #new-modern-footer {
    background: linear-gradient(to bottom, #212529, #1e2226);
    /* Reduced gradient intensity for dark theme */
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
}

.theme-dark #new-modern-footer::before {
    background: linear-gradient(to right, transparent, #c0a070, transparent);
    /* Darker gold for dark theme */
    opacity: 0.5;
}

/* Green Theme */
.theme-green #new-modern-footer {
    background: linear-gradient(to bottom, #2a402e, #2a3d2e);
    /* Further reduced gradient intensity for green theme */
    color: #e5f0e8;
}

.theme-green #new-modern-footer::before {
    background: linear-gradient(to right, transparent, #8fbc8f, transparent);
    /* Soft green accent */
    opacity: 0.7;
}

/* Social Media Icons Styles */
.footer-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Logo Animation Styles */
.footer-logo-img {
    transition: transform 0.3s ease;
    transform-origin: center;
}

.footer-logo-img:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Social Media Icons */
.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 2px;
}

.footer-social-icons a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    font-size: 1.1em;
}

.footer-social-icons a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 0;
}

.footer-social-icons a:hover:before {
    transform: scale(1);
}

.footer-social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Individual social media icon colors */
.footer-social-icons a[title="Facebook"] {
    background: #1877f2;
}

.footer-social-icons a[title="Twitter"] {
    background: #1da1f2;
}

.footer-social-icons a[title="Instagram"] {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.footer-social-icons a[title="LinkedIn"] {
    background: #0077b5;
}

.footer-social-icons a[title="Telegram"] {
    background: #0088cc;
}

.footer-social-icons a[title="WhatsApp"] {
    background: #25d366;
}

.footer-social-icons a[title="YouTube"] {
    background: #ff0000;
}

/* Dark theme adjustments */
.theme-dark .footer-social-icons a {
    background: rgba(255, 255, 255, 0.15);
}

.theme-dark .footer-social-icons a:before {
    background: rgba(255, 255, 255, 0.2);
}

/* Individual social media icon colors for dark theme */
.theme-dark .footer-social-icons a[title="Facebook"] {
    background: #1877f2;
}

.theme-dark .footer-social-icons a[title="Twitter"] {
    background: #1da1f2;
}

.theme-dark .footer-social-icons a[title="Instagram"] {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.theme-dark .footer-social-icons a[title="LinkedIn"] {
    background: #0077b5;
}

.theme-dark .footer-social-icons a[title="Telegram"] {
    background: #0088cc;
}

.theme-dark .footer-social-icons a[title="WhatsApp"] {
    background: #25d366;
}

.theme-dark .footer-social-icons a[title="YouTube"] {
    background: #ff0000;
}

/* Green theme adjustments */
.theme-green .footer-social-icons a {
    background: rgba(46, 125, 50, 0.85);
}

.theme-green .footer-social-icons a:before {
    background: rgba(27, 94, 32, 0.2);
}

/* Individual social media icon colors for green theme */
.theme-green .footer-social-icons a[title="Facebook"],
.theme-green .footer-social-icons a[title="Twitter"],
.theme-green .footer-social-icons a[title="Instagram"],
.theme-green .footer-social-icons a[title="LinkedIn"],
.theme-green .footer-social-icons a[title="Telegram"],
.theme-green .footer-social-icons a[title="WhatsApp"],
.theme-green .footer-social-icons a[title="YouTube"] {
    background: rgba(27, 94, 32, 0.9);
}

/* Aparat social icon styles - Standardized */
.social-icon-aparat {
    /* Removed specific styles to match other icons, relies on main footer-social-icons a rule */
}

.social-icon-aparat:hover {
    background: #0088b9 !important;
    transform: translateY(-3px);
}

.aparat-icon {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
}

/* Quill Editor Alignment Classes */
.ql-align-left {
    text-align: left !important;
}

.ql-align-center {
    text-align: center !important;
}

.ql-align-right {
    text-align: right !important;
}

.ql-align-justify {
    text-align: justify !important;
}

/* RTL adjustments for alignment classes if needed */

/* =================================================================
   Gallery Swiper Styles (for News & Projects)
   Moved from inline CSS in PHP files for better maintainability
   ================================================================= */

.news-gallery-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.news-gallery-section h3 {
    margin-bottom: 20px;
    color: #333;
    border-right: 4px solid #4CAF50;
    padding-right: 10px;
}

.news-gallery-slider {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.news-gallery-slider .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-gallery-slider .swiper-slide img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.news-gallery-slider .swiper-button-next,
.news-gallery-slider .swiper-button-prev {
    color: #4CAF50;
    background: rgba(255, 255, 255, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-gallery-slider .swiper-button-next:after,
.news-gallery-slider .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.news-gallery-slider .swiper-pagination-bullet-active {
    background: #4CAF50;
}

/* Dynamic Projects Heading */
.dynamic-projects-heading {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Styles for Homepage News/Projects Sections */

/* News Preview Section */
.news-preview-container {
    margin-bottom: 40px;
}

.news-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.news-preview-more {
    text-align: center;
    margin-top: 30px;
}

/* Projects Preview Section */
.projects-preview-container {
    margin-bottom: 40px;
}

.projects-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.projects-preview-more {
    text-align: center;
    margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 992px) {

    .news-preview-grid,
    .projects-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {

    .news-preview-grid,
    .projects-preview-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =================================================================
   CONTACT PAGE STYLES
   ================================================================= */
/* Styles for Contact Page */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 40px auto;
    max-width: 1000px;
    width: 90%;
}

/* --- Contact Info Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    width: 100%;
}

.info-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.2);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.info-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.icon-wrapper i {
    font-size: 1.8em;
    color: #0284c7;
    transition: color 0.3s ease;
}

.info-card:hover .icon-wrapper i {
    color: #fff;
}

.info-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #334155;
    font-weight: 700;
}

.info-card p {
    margin: 0;
    color: #64748b;
    font-size: 1.05em;
    line-height: 1.6;
}

.info-card a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.info-card a:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* Full-width Address Card - Same width as form */
.info-card-wide {
    width: 100%;
    padding: 40px;
}

/* --- Map Section --- */
.contact-map {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 5px solid #fff;
}

.contact-map iframe {
    width: 100%;
    height: 350px;
    border: 0;
    display: block;
}

/* --- Form Section --- */
.contact-form-section {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* Decorative top bar */
.contact-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #3498db, #8e44ad);
}

.contact-form-section h2 {
    margin-bottom: 30px;
    color: #1e293b;
    font-size: 1.8em;
    text-align: center;
    font-weight: 800;
}

.contact-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #64748b;
    line-height: 1.8;
}

/* Form Elements */
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 25px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1em;
    background-color: #f8fafc;
    color: #334155;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #3498db;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

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

.contact-form button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.contact-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

/* CAPTCHA Styles */
.captcha-group {
    background: #f0f9ff;
    padding: 25px;
    border-radius: 12px;
    border: 2px dashed #bae6fd;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.captcha-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #0369a1;
    font-weight: 600;
}

.captcha-question {
    font-size: 1.4em;
    font-weight: 800;
    color: #e11d48;
    background: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    letter-spacing: 2px;
}

.captcha-input {
    width: 140px !important;
    text-align: center;
    font-size: 1.4em !important;
    letter-spacing: 3px;
    margin: 0 auto !important;
    font-weight: 700;
}

/* Status Messages */
.status-message {
    padding: 18px;
    margin-bottom: 25px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

.status-message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Dark Theme Adjustments */
body.theme-dark .status-message {
    background: #1e293b;
    border-color: #334155;
}



/* =================================================================
   NEWS PAGE STYLES
   ================================================================= */
/* Modern Professional News Card Styles with White Frame */

.news-page {
    padding: 40px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    color: var(--primary-color, #2c3e50);
    position: relative;
}

.page-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    margin: 20px auto 0;
    border-radius: 2px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Modern News Card with Elegant White Frame */
.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    border: 4px solid #fff;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(52, 152, 219, 0.12),
        inset 0 0 0 1px rgba(52, 152, 219, 0.15);
}

.news-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Image Section with Overlay */
.news-image {
    height: 240px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

/* Hover Title Bar */
.hover-title-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-weight: 600;
    font-size: 0.95em;
}

.news-card:hover .hover-title-bar {
    transform: translateY(0);
}

/* Content Area */
.news-details {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.news-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    line-height: 1.4;
    font-weight: 700;
}

.news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    background: linear-gradient(to right, #3498db 0%, #3498db 100%);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease, color 0.3s ease;
}

.news-title a:hover {
    color: #3498db;
    background-size: 100% 2px;
}

.news-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: auto;
    padding-bottom: 20px;
    font-size: 0.95em;
}

/* Footer with Clean Separation */
.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    margin-top: 15px;
}

.news-date-bottom {
    color: #888;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-date-bottom::before {
    content: '📅';
    font-size: 1.1em;
}

.news-read-more {
    margin: 0;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff !important;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875em;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.read-more-link:hover {
    background: linear-gradient(135deg, #2980b9, #1f639a);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.read-more-link::after {
    content: '←';
    transition: transform 0.3s ease;
}

html[dir="ltr"] .read-more-link::after {
    content: '→';
}

.read-more-link:hover::after {
    transform: translateX(-3px);
}

html[dir="ltr"] .read-more-link:hover::after {
    transform: translateX(3px);
}

.no-news-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
    font-size: 1.1em;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.pagination .active span {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.pagination .disabled span {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ===== News Article Page Styles ===== */

.news-article-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.news-item-full {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    padding: 40px;
    border: 4px solid #fff;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.news-item-header h1 {
    font-size: 2.2em;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.3;
    font-weight: 700;
}

.news-item-image-container {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-item-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.news-item-content {
    font-size: 1.1em;
    line-height: 1.9;
    color: #333;
    margin: 30px 0;
}

.news-item-content p {
    margin-bottom: 20px;
}

.news-item-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-item-content h2,
.news-item-content h3 {
    margin: 30px 0 15px 0;
    color: #2c3e50;
}

.news-item-content ul,
.news-item-content ol {
    margin: 15px 0;
    padding-right: 25px;
}

.news-item-content li {
    margin-bottom: 10px;
}

.news-item-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.news-date-info {
    color: #777;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-date-info::before {
    content: '📅';
    font-size: 1.2em;
}

/* Gallery Section */
.news-gallery-section {
    margin-top: 40px;
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
}

.news-gallery-section h3 {
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #2c3e50;
    border-right: 4px solid #3498db;
    padding-right: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-title {
        font-size: 1.8em;
    }

    .news-image {
        height: 200px;
    }

    .news-title {
        font-size: 1.2em;
    }

    .news-article-page {
        padding: 0 15px;
    }

    .news-item-full {
        padding: 25px 20px;
    }

    .news-item-header h1 {
        font-size: 1.8em;
    }

    .news-item-content {
        font-size: 1em;
    }
}






/* =================================================================
   PROJECTS PAGE STYLES
   ================================================================= */
/* Modern Professional Projects Card Styles with White Frame */

.static-projects-section {
    margin-bottom: 40px;
}

/* Grid Layouts */
.projects-grid,
.projects-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Modern Project Card with Elegant White Frame */
.project-card,
.project-entry {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 4px solid #fff;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.project-card:hover,
.project-entry:hover {
    transform: translateY(-10px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(142, 68, 173, 0.12),
        inset 0 0 0 1px rgba(142, 68, 173, 0.15);
}

.project-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Image Section */
.project-image,
.project-entry-image-container {
    height: 240px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-image img,
.project-entry-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card:hover .project-image img,
.project-entry:hover .project-entry-image-container img {
    transform: scale(1.08);
}

/* Hover Title Bar */
.hover-title-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-weight: 600;
    font-size: 0.95em;
}

.project-card:hover .hover-title-bar,
.project-entry:hover .hover-title-bar {
    transform: translateY(0);
}

/* Content Area */
.project-content,
.project-details,
.project-entry-text-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.project-content h3,
.project-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    line-height: 1.4;
    font-weight: 700;
    color: #2c3e50;
}

.project-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    background: linear-gradient(to right, #8e44ad 0%, #8e44ad 100%);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease, color 0.3s ease;
}

.project-title a:hover {
    color: #8e44ad;
    background-size: 100% 2px;
}

.project-content p,
.project-excerpt,
.project-description-snippet,
.project-description-frame {
    color: #555;
    line-height: 1.7;
    margin-bottom: auto;
    padding-bottom: 20px;
    font-size: 0.95em;
}

/* Footer */
.project-footer,
.project-entry-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    margin-top: 15px;
}

.update-date,
.news-date-bottom {
    color: #888;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.update-date::before {
    content: '📅';
    font-size: 1.1em;
}

.project-preview-link,
.news-read-more {
    margin: 0;
}

.btn-view-details,
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    color: #fff !important;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875em;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.btn-view-details:hover,
.read-more-link:hover {
    background: linear-gradient(135deg, #6c3483, #512e5f);
    box-shadow: 0 6px 16px rgba(142, 68, 173, 0.4);
    transform: translateY(-2px);
}

.btn-view-details::after {
    content: '←';
    transition: transform 0.3s ease;
}

html[dir="ltr"] .btn-view-details::after {
    content: '→';
}

.btn-view-details:hover::after {
    transform: translateX(-3px);
}

html[dir="ltr"] .btn-view-details:hover::after {
    transform: translateX(3px);
}

.no-projects,
.no-projects-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
    font-size: 1.1em;
    grid-column: 1 / -1;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    color: #fff;
    border-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.3);
}

.pagination .active span {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    color: #fff;
    border-color: #8e44ad;
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.3);
}

.pagination .disabled span {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Dark Theme */
body.theme-dark .project-card {
    background: #2d2d2d;
    border-color: #3a3a3a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body.theme-dark .project-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(142, 68, 173, 0.2),
        inset 0 0 0 1px rgba(142, 68, 173, 0.2);
}

body.theme-dark .project-image {
    background: #2d2d2d;
}

body.theme-dark .project-title a {
    color: #e0e0e0;
}

body.theme-dark .project-excerpt {
    color: #e0e0e0;
}

body.theme-dark .project-read-more a {
    color: #ba68c8;
}

body.theme-dark .project-location,
body.theme-dark .project-year {
    color: #b0b0b0;
}

body.theme-dark .project-footer {
    border-top-color: #3a3a3a;
}

body.theme-dark .project-date-bottom {
    color: #888;
}



/* Green Theme */
.theme-green .btn-view-details {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.theme-green .btn-view-details:hover {
    background: linear-gradient(135deg, #1b5e20, #145214);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.theme-green .pagination a:hover,
.theme-green .pagination .active span {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    border-color: #2e7d32;
}

/* ===== NEW Project Details Page Styles (Single Column) ===== */

.project-full-container {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eaeaea;
}

/* Hero Section */
.project-hero-section {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    overflow: hidden;
    background: #f0f0f0;
}

.project-hero-image-wrapper {
    width: 100%;
    height: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-hero-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.8s ease;
}

.project-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    pointer-events: none;
}

/* Header & Meta */
.project-header-section {
    padding: 40px 40px 20px;
    text-align: center;
    position: relative;
    background: #fff;
    margin-top: -30px;
    /* Slight overlap */
    border-radius: 20px 20px 0 0;
    z-index: 10;
}

.project-main-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 30px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.project-main-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #8e44ad, #9b59b6);
    margin: 15px auto 0;
    border-radius: 2px;
}

.project-meta-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-width: 200px;
}

.meta-icon {
    font-size: 1.8em;
    background: #f0e6f5;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.meta-content {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.meta-content strong {
    font-size: 0.85em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-content span {
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
}

/* Content Body */
.project-content-body {
    padding: 20px 50px 50px;
    font-size: 1.15em;
    line-height: 2;
    color: #444;
}

.project-description-text {
    text-align: justify;
}

/* Gallery Section */
.project-gallery-section {
    padding: 50px 0;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.gallery-title {
    text-align: center;
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
}

.project-gallery-slider {
    width: 100%;
    padding-bottom: 50px;
    overflow: hidden;
    /* Ensure images stay within the slider container */
    position: relative;
}

.project-gallery-slider .swiper-slide {
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    opacity: 0.8;
    transform: scale(0.9);
}

.project-gallery-slider .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(142, 68, 173, 0.2);
}

.project-gallery-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swiper-pagination-bullet-active {
    background: #8e44ad !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: #8e44ad !important;
    background: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 22px;
    font-weight: bold;
}

/* Footer Actions */
.project-footer-actions {
    padding: 40px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

.back-to-projects-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: #fff;
    color: #555;
    border: 2px solid #eee;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-projects-btn:hover {
    background: #8e44ad;
    color: #fff;
    border-color: #8e44ad;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.2);
}

.project-not-found-container {
    text-align: center;
    padding: 100px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Dark Theme Support */


/* Green Theme Support */


/* Responsive */
@media (max-width: 992px) {

    .projects-grid,
    .projects-list-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .projects-grid,
    .projects-list-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-image,
    .project-entry-image-container {
        height: 200px;
    }

    .project-title,
    .project-content h3 {
        font-size: 1.2em;
    }

    .project-full-container {
        margin: 20px auto;
        border-radius: 12px;
    }

    .project-hero-section {
        height: 300px;
    }

    .project-header-section {
        padding: 30px 20px;
        margin-top: -20px;
    }

    .project-main-title {
        font-size: 1.8em;
    }

    .project-meta-grid {
        flex-direction: column;
        gap: 15px;
    }

    .meta-item {
        width: 100%;
        min-width: auto;
    }

    .project-content-body {
        padding: 20px 20px 40px;
        font-size: 1em;
    }

    .project-gallery-slider .swiper-slide {
        height: 300px;
    }
}

/* Fix footer icon spacing in LTR */
html[dir='ltr'] .footer-column.contact-column i {
    margin-left: 0;
    margin-right: 10px;
}

/* Ensure RTL has correct spacing */
html[dir='rtl'] .footer-column.contact-column i {
    margin-left: 10px;
    margin-right: 0;
}

/* Fix social icons spacing */
html[dir='ltr'] .footer-social-icons a {
    margin-right: 10px;
    margin-left: 0;
}

html[dir='ltr'] .footer-social-icons a:last-child {
    margin-right: 0;
}

@media (max-width: 768px) {

    /* Fix for Mobile Dropdowns */
    .dropdown-menu.submenu-active {
        display: block !important;
        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100%;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.05);
        margin-top: 0;
        padding: 10px;
    }

    /* Ensure dropdown links are visible */
    .dropdown-menu.submenu-active li {
        display: block;
    }

    /* Style active language/theme dropdowns specifically if needed */
    .language-menu.submenu-active,
    .theme-menu.submenu-active {
        display: block !important;
    }
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

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

/* Staggered animation for grid items (optional enhancement) */
.reveal.active .news-card,
.reveal.active .project-card {
    animation: revealItems 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealItems {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Main Page Title Enhancements --- */
.main-page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 20px;
    letter-spacing: -0.5px;
}

.main-page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, #4a7cad, #6366f1);
    border-radius: 10px;
}

html[dir="rtl"] .main-page-title::after {
    left: auto;
    right: 0;
}



@media (max-width: 768px) {
    .main-page-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    .main-page-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    html[dir="rtl"] .main-page-title::after {
        right: 50%;
        transform: translateX(50%);
    }
}