:root {
    --color-primary: #FF5959;
    --color-secondary: #37393D;
    --color-gray: #D3D3D3;
    --text-lg: 2.75rem; /* 44px */
    --text-md: 2.625rem; /* 42px */
    --text-sm: 2rem;     /* 32px */
    --text-xs: 1.5rem;   /* 24px */
}

/* RTL Direction Styles */
:dir(rtl) {
    direction: rtl;
    text-align: right;
}

:dir(rtl) p,
:dir(rtl) span,
:dir(rtl) button,
:dir(rtl) a {
    text-align: right !important;
}

:dir(rtl) a,
:dir(rtl) button {
    float: right;
}

:dir(rtl) .float-start {
    float: right !important;
}
:dir(rtl) .float-end {
    float: left !important;
}

:dir(rtl) .me-3 {
    margin-inline-start: 1rem !important;
    margin-inline-end: 0 !important;
}
:dir(rtl) .ms-3 {
    margin-inline-end: 1rem !important;
    margin-inline-start: 0 !important;
}

/* Base Styles */
body {
    overflow-x: hidden;
    font-family: 'Raleway', sans-serif;
}

body:not(.home) header {
    position: relative;
    z-index: 1030;

}

#main-header {
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
    position: fixed; /* Ensure the header is always fixed at the top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* Adjust this based on your layout */
    transform: translateY(0); /* Initial position */
}

#main-header.hidden {
    transform: translateY(-100%); /* Hide the header by moving it above the viewport */
}

.text-danger {
    color: var(--color-primary);
}
.text-dark {
    color: var(--color-secondary) !important;
}

section {
    padding: 50px 0;
    text-align: left;
}

h2 {
    font-size: var(--text-md) !important;
    text-transform: capitalize;
}

p, h5 {
    font-size: var(--text-sm) !important;
}

.bordered-container,
.form-section :is(input, textarea) {
    border: 2px solid var(--color-gray);
    transition: border 0.3s ease;
}

.bordered-container:hover {
    border-image: linear-gradient(90deg, var(--color-secondary) 10%, var(--color-primary) 50%) 1;
}

.form-section :is(input, textarea):is(:focus, :active) {
    border-image: linear-gradient(90deg, var(--color-secondary) 10%, var(--color-primary) 50%) 2;
    box-shadow: unset;
}

.button {
    padding: 10px 100px !important;
    border-radius: 0 !important;
}

.button span {
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: 0.5s;
}
.button span:after {
    content: '\00bb';
    position: absolute;
    opacity: 0;
    top: 0;
    right: -20px;
    transition: 0.5s;
}
.button:hover span {
    padding-right: 20px;
}
.button:hover span:after {
    opacity: 1;
    right: 0;
}

.btn-gradient {
    background: linear-gradient(90deg, var(--color-secondary) 10%, var(--color-primary) 50%);
}
.btn-black {
    background-color: var(--color-secondary) !important;
}
.btn:focus {
    outline: 2px solid var(--color-primary);
}

.banner-section {
    padding-bottom: 50px;
    height: 100vh;
    overflow: hidden;
    padding: 0 0 50px 0;
}
.banner-section .description {
    font-size: var(--text-lg);
}

/* Services */
.services-section h2,
.services-section p,
.services-section a {
    color: var(--color-secondary);
    text-decoration: none;
}
.services-section .service-box {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-box-wrapper {
    text-align: center;
}
.service-box-wrapper img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}
.service-box:hover h5 {
    color: var(--color-primary) !important;
}

/* Products */
/* RTL Enhancements */
[dir="rtl"] .product-list li::after {
    left: auto;
    right: 0;
    background: linear-gradient(to left, var(--color-primary), var(--color-secondary));
}

[dir="rtl"] .product-list li a {
    text-align: right;
    padding-right: 0;
    padding-left: 10px;
}

[dir="rtl"] .scrollable-product-list {
    padding-left: 5px;
    padding-right: 0;
}

[dir="rtl"] .products-section .card:hover {
    border-left: none;
    border-right: none;
    border-top: 2px solid;
    border-bottom: 2px solid;
    border-image-source: linear-gradient(to left, var(--color-secondary), var(--color-primary));
    border-image-slice: 1;
}

[dir="rtl"] .arrow-link {
    text-align: left;
}

[dir="rtl"] .product-description,
[dir="rtl"] .product-name {
    text-align: right;
    font-family: 'Cairo', sans-serif; /* Great for Arabic */
}

.product-wrapper {
    padding: 40px;
}
.product-card {
    padding: 50px;
    gap: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.product-name {
    font-weight: bold;
    color: #333;
    transition: color 0.2s ease;
}
.product-name:hover {
    color: #007bff;
}
.product-description {
    font-size: 0.875rem;
    color: #6c757d;
}
.products-section .product-wrapper h2,
.products-section .product-wrapper p {
    color: var(--color-secondary);
}
.products-section .product-wrapper:hover h2,
.products-section .product-wrapper:hover p {
    color: var(--color-primary);
}
.products-section .card:hover {
    border-left: 2px solid;
    border-right: 2px solid;
    border-image-source: linear-gradient(to bottom, var(--color-secondary), var(--color-primary));
    border-image-slice: 1;
}
.products-section .card:hover h4 {
    color: var(--color-primary);
}
.products-section .card:hover .arrow-link {
    display: inline-block;
    visibility: visible;
    margin-top: 8px;
    text-align: right;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-decoration: none;
}
.product-list {
    list-style: none;
    padding: 0;
}
.product-list li {
    position: relative;
    padding-bottom: 35px;
}
.product-list li::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
}
.product-list li a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: var(--text-xs);
}
.product-list li a.active {
    color: var(--color-primary);
}

.scrollable-product-list {
    max-height: 250px;
    max-width: 70%;
    overflow-y: auto;
    padding-right: 5px;
}
.scrollable-product-list::-webkit-scrollbar {
    width: 6px;
}
.scrollable-product-list::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--color-secondary), var(--color-primary));
    border-radius: 4px;
}

@media (max-width: 768px) {
    .scrollable-product-list {
        max-height: none;
        max-width: 100%;
        overflow-y: visible;
        padding: 0;
    }

    .product-card {
        padding: 20px;
        gap: 20px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-description {
        font-size: 0.8rem;
    }
}



/* Image and Gallery */
.image-container img,
.gallery-thumb {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.image-container img {
    height: 300px;
}
.gallery-thumb {
    height: 250px;
}
.image-container:hover,
.gallery-thumb:hover,
.square-img:hover {
    transform: scale(1.05);
}
.square-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.square-img:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* About & Team */
.about-section .aboutUs img {
    width: auto;
    object-fit: cover;
    aspect-ratio: 5/5;
}
.team-members .card {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}
.team-members img {
    width: auto;
    height: 310px;
    object-fit: cover;
}

/* Footer */
footer .logo {
    border-left: 2px solid;
    border-right: 2px solid;
    border-image-source: linear-gradient(to bottom, var(--color-secondary), var(--color-primary));
    border-image-slice: 1;
}
footer ol {
    list-style-type: disc;
}

/* Form */
.form-section :is(input, textarea, .btn-black) {
    width: 60%;
}

/* Settings Icon */
.settings i {
    font-size: 60px;
}

/* Burger Menu */
#burgerMenu {
    width: 250px;
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1050;
}

/* Responsive Styles */
@media (max-width: 767px) {
    #main-header {
        padding: 10px 15px;
    }
    .px-5 {
        padding-inline: 15px !important;
    }
    #main-header img {
        width: 120px;
        height: 25px;
    }
    #burgerBtn svg {
        width: 36px;
        height: 36px;
    }
    #burgerMenu {
        width: 75%;
        padding: 20px;
        padding-top: 20px;
    }
    #burgerMenu nav,
    #burgerMenu .nav-link {
        font-size: 1.25rem;
        padding: 12px 15px;
    }
    section {
        padding: 30px 15px;
    }
    h2 {
        font-size: 1.5rem !important;
    }
    h4 {
        font-size: 1.1rem;
    }
    p, h5 {
        font-size: 1rem !important;
    }
    .form-section :is(input, textarea, .btn-black) {
        width: 100%;
    }
    .services-section .service-box {
        height: 150px;
    }
    .gallery-thumb {
        height: 200px;
    }
    .square-img {
        height: 150px;
    }
    .about-section .aboutUs {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .about-section .aboutUs .col-md-8,
    .about-section .aboutUs .col-md-4 {
        width: 100%;
        margin-bottom: 20px;
    }
    .about-section .aboutUs img {
        width: 80%;
        margin: 0 auto;
    }
    .team-members .card img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 991px) {
    .products-section .product-card {
        padding: 30px;
    }
    .btn-sm {
        font-size: 1.1rem;
    }
    .form-section :is(input, textarea, .btn-black) {
        width: 80%;
    }
    h2 {
        font-size: 1.75rem;
    }
    h4 {
        font-size: 1.2rem;
    }
    p {
        font-size: 1.1rem;
    }
    .about-section .aboutUs .col-md-8 {
        padding-right: 15px;
    }
    .about-section .aboutUs .col-md-4 {
        padding-left: 15px;
    }
}

@media (min-width: 992px) {
    .square-img {
        height: 200px;
    }
}

/* Swiper Adjustments (if used) */
@media (max-width: 767px) {
    .swiper.main-slider {
        height: 300px;
    }
    .swiper.thumb-slider {
        justify-content: center;
        margin-top: 15px;
    }
    .swiper.thumb-slider .swiper-slide {
        width: 50px;
        height: 100px;
    }
}
@media (max-width: 991px) {
    .swiper.thumb-slider .swiper-slide {
        width: 60px;
        height: 120px;
    }
    .swiper.main-slider {
        height: 400px;
    }
}
