/* Header Logo Styling */
header div#logo {
    max-width: 100px !important;
}

header div#logo img,
header .logo-main,
header .logo-mobile {
    max-width: 100px !important;
    width: auto !important;
    height: auto !important;
}

/* Menu Button Text Styling - matches language switcher button style */
#menu-btn-text {
    display: none;
    float: right;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif !important;
    margin-top: 0px;
    margin-left: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

#menu-btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

#menu-btn-text.menu-open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.rtl #menu-btn-text {
    float: left;
    margin-left: 0;
    margin-right: 20px;
}

/* Show menu button text on mobile */
@media (max-width: 1199px) {
    #menu-btn-text {
        display: block;
    }
}

/* Logo Carousel Item Styling */
.logo-carousel .item {
    text-align: center;
    width: calc(100% - 12px);
    max-width: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    padding: 12px;
    box-sizing: border-box;
}

.logo-carousel .item img {
    max-width: 160px;
    max-height: 70px;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Responsive adjustments for logo carousel items */
@media (max-width: 575px) {
    .logo-carousel .item {
        width: calc(100% - 8px);
        max-width: 120px;
        padding: 8px;
        min-height: 70px;
    }

    .logo-carousel .item img {
        max-width: 100px;
        max-height: 45px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .logo-carousel .item {
        width: calc(100% - 12px);
        max-width: 180px;
        padding: 12px;
        min-height: 80px;
    }

    .logo-carousel .item img {
        max-width: 140px;
        max-height: 60px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .logo-carousel .item {
        width: calc(100% - 14px);
        max-width: 200px;
        padding: 15px;
        min-height: 90px;
    }

    .logo-carousel .item img {
        max-width: 160px;
        max-height: 65px;
    }
}

@media (min-width: 992px) {
    .logo-carousel .item {
        width: calc(100% - 16px);
        max-width: 220px;
        padding: 15px;
        min-height: 100px;
    }

    .logo-carousel .item img {
        max-width: 180px;
        max-height: 75px;
    }
}

/* Logo Carousel Dots Styling */
.logo-carousel + .owl-dots {
    margin-top: 20px;
}

.logo-carousel .owl-dot {
    background: rgba(255, 255, 255, 0.3) !important;
    border: none;
    margin: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.logo-carousel .owl-dot.active {
    background: #ffffff !important;
    transform: scale(1.2);
}

.logo-carousel .owl-dot:hover {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* Banner Swiper Link Styling */
.swiper-slide .swiper-link {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    text-decoration: none;
    cursor: pointer;
}

/* Fix responsive banner image sizing - show full image without cropping */
/* Image ratio: 2000x1121 = 1.784:1 (height is 56.05% of width) */
#section-intro .swiper-inner {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Ensure banner section matches image aspect ratio (2000:1121) */
#section-intro {
    position: relative;
    width: 100%;
    min-height: 56.05vw !important; /* 1121/2000 * 100vw = maintains aspect ratio */
}

#section-intro .v-center {
    min-height: 56.05vw !important;
    height: 56.05vw !important;
}

#section-intro .swiper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

#section-intro .swiper-slide {
    height: 100%;
}

/* Responsive adjustments - maintain aspect ratio */
@media (max-width: 768px) {
    #section-intro {
        min-height: 56.05vw !important;
    }

    #section-intro .v-center {
        min-height: 56.05vw !important;
        height: 56.05vw !important;
    }

    #section-intro .swiper-inner {
        background-size: cover !important;
        background-position: center center !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #section-intro {
        min-height: 56.05vw !important;
    }

    #section-intro .v-center {
        min-height: 56.05vw !important;
        height: 56.05vw !important;
    }

    #section-intro .swiper-inner {
        background-size: cover !important;
        background-position: center center !important;
    }
}

@media (min-width: 1025px) {
    #section-intro {
        min-height: 56.05vw !important;
    }

    #section-intro .v-center {
        min-height: 56.05vw !important;
        height: 56.05vw !important;
    }

    #section-intro .swiper-inner {
        background-size: cover !important;
        background-position: center center !important;
    }
}


#menu-btn {
    display: none;
}

/* Fix RTL menu child items to display vertically */
[dir="rtl"] #mainmenu li li {
    float: none !important;
    display: block !important;
    width: 100% !important;
}

[dir="rtl"] #mainmenu li ul li {
    float: none !important;
    display: block !important;
    width: 100% !important;
}

/* RTL: Set text-align right for child links in navbar */
[dir="rtl"] #mainmenu .menu-item-has-children ul li a,
.rtl #mainmenu .menu-item-has-children ul li a {
    text-align: right !important;
}

/* RTL: Fix child menu icon position in mobile/responsive mode to prevent overlap */
[dir="rtl"] header.header-mobile #mainmenu > li > span,
.rtl header.header-mobile #mainmenu > li > span {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] header.header-mobile #mainmenu li > ul > li > span,
.rtl header.header-mobile #mainmenu li > ul > li > span {
    right: auto !important;
    left: 0 !important;
}

/* RTL: Add padding to menu links to prevent overlap with icon */
[dir="rtl"] header.header-mobile #mainmenu > li.menu-item-has-children > a.menu-item,
.rtl header.header-mobile #mainmenu > li.menu-item-has-children > a.menu-item {
    padding-right: 0 !important;
    padding-left: 50px !important;
}

[dir="rtl"] header.header-mobile #mainmenu li > ul > li > a.menu-item,
.rtl header.header-mobile #mainmenu li > ul > li > a.menu-item {
    padding-right: 0 !important;
    padding-left: 50px !important;
}

/* Footer sections with vertical dividers */
footer .footer-section {
    position: relative;
    padding-left: 30px;
    padding-right: 30px;
}

footer .footer-section:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
}

/* RTL: Adjust footer divider position */
[dir="rtl"] footer .footer-section:not(:last-child)::after,
.rtl footer .footer-section:not(:last-child)::after {
    right: auto;
    left: 0;
}

/* Responsive: Remove dividers on smaller screens */
@media (max-width: 991px) {
    footer .footer-section {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 30px;
    }

    footer .footer-section::after {
        display: none;
    }
}

/* Fix Telegram icon in RTL/Persian mode */
[dir="rtl"] .fa-brands.fa-telegram,
.rtl .fa-brands.fa-telegram,
[dir="rtl"] i.fa-brands.fa-telegram,
.rtl i.fa-brands.fa-telegram {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}

/* Center align footer elements in all columns for all display sizes */
footer .container .row > div {
    text-align: center !important;
}

footer .widget {
    text-align: center !important;
}

footer .widget ul {
    text-align: center !important;
    list-style-position: inside;
    padding-left: 0;
}

footer .widget ul li {
    text-align: center !important;
}

footer .widget h5 {
    text-align: center !important;
}

footer .social-icons {
    justify-content: center !important;
    display: flex !important;
}

footer p {
    text-align: center !important;
}


