/* --- Menu widget --- */
.elementor-widget-advanced_menu .advanced-menu-wrapper {
    width: 100%;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-rtl {
    direction: rtl;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-ltr {
    direction: ltr;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .hamburger-icon {
    display: none;
    cursor: pointer;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .hamburger-icon > svg{
    fill: currentColor;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .menu-item {
    position: relative;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .menu-item a {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-rtl .desktop-menu .submenu-arrow {
    margin-right: 8px;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-ltr .desktop-menu .submenu-arrow {
    margin-left: 8px;
}

.advanced-menu-panel.elementor-widget-advanced_menu .submenu-arrow svg{
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* REFORMED: FA icon inside span with ::before unicode for reliability */
.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .submenu-arrow {
    display: inline-block !important;
    transition: transform 0.3s ease;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .submenu-arrow i {
    font-size: 0.7em;
    display: block;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .submenu-arrow i::before {
    content: "\f078";
    /* FA5 chevron-down unicode */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-style: normal;
    speak: none;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    min-width: 220px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    list-style: none;
    padding: 5px 0;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-rtl .desktop-menu .sub-menu {
    right: 0;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-ltr .desktop-menu .sub-menu {
    left: 0;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-rtl .desktop-menu .sub-menu .sub-menu {
    right: 100%;
    top: -5px;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper.direction-ltr .desktop-menu .sub-menu .sub-menu {
    left: 100%;
    top: -5px;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .menu-item:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu .sub-menu li a {
    width: 100%;
}

/* Hover Line Under Main Menu Items */
.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu>ul>.menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    transition: width 0.3s ease-out;
}

.elementor-widget-advanced_menu .advanced-menu-wrapper .desktop-menu>ul>.menu-item:hover::after {
    width: 100%;
}

/* Responsive Breakpoints */
@media (max-width: 767px) {
    .elementor-widget-advanced_menu .advanced-menu-wrapper.breakpoint-mobile .desktop-menu {
        display: none;
    }

    .elementor-widget-advanced_menu .advanced-menu-wrapper.breakpoint-mobile .hamburger-icon {
        display: block;
    }
}

@media (max-width: 1024px) {
    .elementor-widget-advanced_menu .advanced-menu-wrapper.breakpoint-tablet .desktop-menu {
        display: none;
    }

    .elementor-widget-advanced_menu .advanced-menu-wrapper.breakpoint-tablet .hamburger-icon {
        display: block;
    }
}

/* --- Global Panel, Overlay & Body Styles --- */
body.advanced-menu-open {
    overflow: hidden;
}

.advanced-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0s 0.4s;
    z-index: 9999;
}

.advanced-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s;
}

/* REFORMED: Added .elementor-widget-advanced_menu namespace to all panel selectors */
.advanced-menu-panel.elementor-widget-advanced_menu {
    position: fixed;
    top: 0;
    width: 300px;
    max-width: 90%;
    height: 100%;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

.advanced-menu-panel.elementor-widget-advanced_menu[data-direction-class="direction-rtl"] {
    right: 0;
    transform: translateX(100%);
}

.advanced-menu-panel.elementor-widget-advanced_menu[data-direction-class="direction-ltr"] {
    left: 0;
    transform: translateX(-100%);
}

.advanced-menu-panel.elementor-widget-advanced_menu.is-open {
    transform: translateX(0);
}

/* REFORMED: Ensure close icon visibility and styling */
.advanced-menu-panel.elementor-widget-advanced_menu .panel-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.advanced-menu-panel.elementor-widget-advanced_menu .close-icon {
    cursor: pointer;
    font-size: 28px;
    display: block !important;
    transition: color 0.3s ease;
}

.advanced-menu-panel.elementor-widget-advanced_menu .close-icon > svg{
    fill: currentColor;
}

.advanced-menu-panel.elementor-widget-advanced_menu .advanced-menu-panel-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-logo img {
    max-width: 150px;
    height: auto;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav{
    margin-top: 2rem;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .menu-item a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
    width: 100%;
}

/* REFORMED: FA icon inside span in panel/mobile with ::before unicode */
.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .submenu-arrow {
    display: inline-block !important;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .submenu-arrow i {
    font-size: 0.8em;
    display: block;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .submenu-arrow i::before {
    content: "\f078";
    /* FA5 chevron-down unicode */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-style: normal;
    speak: none;
}

.advanced-menu-panel.elementor-widget-advanced_menu[data-direction-class="direction-rtl"] .panel-nav .submenu-arrow {
    margin-right: 10px;
}

.advanced-menu-panel.elementor-widget-advanced_menu[data-direction-class="direction-ltr"] .panel-nav .submenu-arrow {
    margin-left: 10px;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .menu-item.open>a>.submenu-arrow {
    transform: rotate(180deg);
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: rgba(0, 0, 0, 0.05);
    width: 100%;
}

.advanced-menu-panel.elementor-widget-advanced_menu .panel-nav .sub-menu a {
    font-size: 0.9em;
    padding: 10px 0;
    display: block;
}

.advanced-menu-panel.elementor-widget-advanced_menu .contact-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
}

.advanced-menu-panel.elementor-widget-advanced_menu .contact-link .contact-icon {
    display: inline-flex;
    align-items: center;
}

.advanced-menu-panel.elementor-widget-advanced_menu .social-icons {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.advanced-menu-panel.elementor-widget-advanced_menu .social-icons a {
    text-decoration: none;
}


.advanced-menu-panel.elementor-widget-advanced_menu .social-icons>a svg {
    fill: currentColor;
}

.advanced-menu-panel.elementor-widget-advanced_menu .contact-link {
    margin-top: 2rem;
}

.advanced-menu-panel.elementor-widget-advanced_menu .contact-link>span.contact-icon svg {
    fill: currentColor;
}
/* --- archive widget --- */
.elementor-widget-custom-archives-final .widget-title {
    text-align: center;
}

/* --- CHANGE START: text-align: center removed from li --- */
.elementor-widget-custom-archives-final .custom-archives-list li {
    margin-bottom: 5px;
    list-style-type: none; /* To make it cleaner */
}
/* --- CHANGE END --- */

.elementor-widget-custom-archives-final .custom-archives-list a {
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

.elementor-widget-custom-archives-final .archive-toggle-link {
    text-align: center;
    display: block;
    margin-top: 15px;
}
/* --- custom tag widget --- */
.elementor-widget-custom-tags-widget-final .widget-title {
    text-align: center;
}

.custom-tags-widget-wrapper .custom-tags-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
    justify-content: center;
}

.custom-tags-widget-wrapper .custom-tags-list .tag-item-wrapper {
    flex: 0 0 calc(50% - 10px);
    margin: 5px;
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
    line-height: 1;
}

.custom-tags-widget-wrapper .custom-tags-list a {
    font-size: 0.9rem;
    text-decoration: none;
    padding-right: 4px; /* Space between text and count */
}

.custom-tags-widget-wrapper .custom-tags-list .tag-count {
    font-size: 0.75rem; /* Smaller font size for the count */
    opacity: 0.8;
}

.custom-tags-widget-wrapper .tags-toggle-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    cursor: pointer;
}
/* --- iv gallary widget --- */
/**
 * Custom Elementor Widget: Image & Video Gallery Styles
 *
 * @since 1.2.4
 */

/* Grid Layout */
.gallery-grid {
    display: grid;
    /* The 'gap' and 'grid-template-columns' properties are now set directly 
       from the widget controls via Elementor's 'selectors' option. */
}

/* Gallery Item Styling */
.gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item-inner {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #e9e9e9;
}

.gallery-item.gallery-item--no-cover .gallery-item-cover {
    display: none; /* Hide placeholder if there's no real cover */
}

.gallery-item-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-cover {
    transform: scale(1.05);
}

/* Play Icon for Videos */
.play-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .play-icon-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.play-icon-overlay svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Title Overlay */
.gallery-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    padding: 20px 10px 10px;
    font-size: 14px;
    text-align: right;
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* --- Lightbox Styles --- */
.custom-gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-item {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.lightbox-item.active {
    display: flex;
}

.lightbox-item img,
.lightbox-item iframe,
.lightbox-item video {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border: none;
    border-radius: 4px;
}

.lightbox-item iframe,
.lightbox-item video {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.lightbox-loader {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Lightbox Controls */
.lightbox-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.lightbox-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-control svg {
    width: 24px;
    height: 24px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close { top: 20px; right: 20px; transform: none; }

