/* Custom CSS for Axis Theme */

/* Font Faces */
@font-face {
    font-family: 'Yekan';
    src: url('../fonts/yekan.woff2') format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Yekan Bold';
    src: url('../fonts/yekan.woff2') format("woff2");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Lubalin Graph ECG';
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('https://www.axis.com/themes/custom/axiscom/build/assets/fonts/open-sans/opensans-light-webfont.woff2') format("woff2");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('https://www.axis.com/themes/custom/axiscom/build/assets/fonts/open-sans/opensans-regular-webfont.woff2') format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('https://www.axis.com/themes/custom/axiscom/build/assets/fonts/open-sans/opensans-semibold-webfont.woff2') format("woff2");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('https://www.axis.com/themes/custom/axiscom/build/assets/fonts/open-sans/opensans-bold-webfont.woff2') format("woff2");
    font-weight: 700;
    font-style: normal;
}

/* RTL Text Alignment */
body {
    text-align: right;
    font-family: 'Yekan', 'Tahoma', 'Arial', sans-serif;
}

/* RTL for all text elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, li, ul, ol {
    text-align: right;
}

/* RTL for navigation */
nav, nav ul, nav li {
    text-align: right;
}

/* RTL for mega menu */
.mega-menu-main, .mega-menu-sidebar {
    text-align: right;
}

/* RTL for footer */
footer, footer nav, footer ul, footer li {
    text-align: right;
}

/* RTL for cards and content sections */
.card, .content-section, .news-card {
    text-align: right;
}

/* Override any left-aligned text */
.text-left {
    text-align: right !important;
}

/* Ensure proper RTL for flex items */
.flex {
    text-align: right;
}

/* Force RTL alignment for all elements */
* {
    text-align: right !important;
}

/* Universal RTL override */
html[dir="rtl"] * {
    text-align: right !important;
}

/* Override any inline styles */
[style*="text-align"] {
    text-align: right !important;
}

/* Specific overrides for common classes */
.text-left, .text-start {
    text-align: right !important;
}

/* Override all text alignment classes */
[class*="text-start"], [class*="text-left"] {
    text-align: right !important;
}

/* RTL for navigation items */
.mega-menu-item, .mega-menu-content, .mega-menu-sidebar {
    text-align: right !important;
}

/* RTL for footer items */
footer li, footer a, footer span {
    text-align: right !important;
}

/* RTL for all text content */
h1, h2, h3, h4, h5, h6, p, span, div, a, li, ul, ol, button {
    text-align: right !important;
}

/* Force RTL for all elements with any text alignment */
[class*="text-"] {
    text-align: right !important;
}

/* Specific RTL overrides for common patterns */
.text-center {
    text-align: right !important;
}

/* RTL for all content sections */
section, article, aside, main, header, footer {
    text-align: right !important;
}

/* RTL for all navigation elements */
nav, nav *, .navigation, .navigation * {
    text-align: right !important;
}

/* RTL for all menu elements */
.menu, .menu *, .dropdown, .dropdown * {
    text-align: right !important;
}

/* Mega Menu Styles */
.mega-menu-content {
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

.mega-menu-content.hidden {
    opacity: 0;
}

.mega-menu-link {
    transition: all 0.2s ease-in-out;
}

.mega-menu-item-sidebar.active::after {
    content: "";
    background-color: white;
    z-index: 1;
    visibility: visible;
    pointer-events: none;
    width: 2rem;
    height: 2rem;
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: none;
}

.mega-menu-item-sidebar {
    position: relative;
}

.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.4s ease-in-out;
}

.animated-underline.active::after {
    width: 100%;
}

/* Mega menu two-column layout */
.mega-menu-inner {
    display: flex;
    min-height: 500px;
    align-items: stretch;
    width: 100%;
}

.mega-menu-sidebar {
    background-color: #f7f3f1 !important;
}

.mega-menu-main {
    background-color: #ffffff !important;
}

/* Debug styles to ensure visibility */
.mega-menu-dropdown {
    background-color: transparent !important;
}

.mega-menu-sidebar {
    background-color: #f7f3f1 !important;
    min-height: 500px !important;
    position: relative;
}

.mega-menu-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50vw;
    width: 50vw;
    height: 100%;
    background-color: #f7f3f1;
    z-index: -1;
}

.mega-menu-main {
    background-color: #ffffff !important;
    min-height: 500px !important;
    position: relative;
}

.mega-menu-main::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50vw;
    width: 50vw;
    height: 100%;
    background-color: #ffffff;
    z-index: -1;
}

/* WordPress specific styles */
.wp-block-group {
    text-align: right !important;
}

.wp-block-columns {
    text-align: right !important;
}

.wp-block-column {
    text-align: right !important;
}

/* Elementor compatibility */
.elementor-widget {
    text-align: right !important;
}

.elementor-element {
    text-align: right !important;
}

/* WooCommerce RTL support */
.woocommerce {
    text-align: right !important;
}

.woocommerce .product {
    text-align: right !important;
}

.woocommerce .cart {
    text-align: right !important;
}

.woocommerce .checkout {
    text-align: right !important;
}