:root {
    --primary-color: 30 115 184;
    --secondary-color: #000000;
    --background-color: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-blue: #1E73B8;
    --section-bg: #F8F9FA;
    --faq-expanded-bg: #2C2C2C;
    --faq-text: #FFFFFF;
    --text-gray: #333333;
}

.animate-on-scroll {
    opacity: 0;
}

@layer base {
    body {
        font-family: 'Poppins', 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        direction: ltr;
        text-align: left;
        transition: all 0.3s ease;
        overflow-x: hidden;
        width: 100%;
    }

    p {
        font-family: 'Poppins', sans-serif;
    }
}

.btn-primary {
    background-color: rgb(var(--primary-color));
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: rgba(30, 115, 184, 0.8);
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Tajawal', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Language Switcher Styles */
.language-switcher {
    background: white;
}

.language-switcher .lang-btn.active {
    background-color: rgb(var(--primary-color));
    color: white;
}

.language-switcher .lang-btn.active:hover {
    background-color: rgba(30, 115, 184, 0.9);
}

/* Header positioning for LTR */
.header-ltr {
    left: 0;
    right: auto;
}

/* Header positioning for RTL */
[dir="rtl"] .header-ltr,
[dir="rtl"] header {
    left: auto;
    right: 0;
}

/* Navigation direction for LTR */
.nav-ltr {
    flex-direction: row;
}

/* Navigation direction for RTL */
[dir="rtl"] .nav-ltr,
[dir="rtl"] nav {
    flex-direction: row-reverse;
}

/* Header actions for LTR */
.header-actions-ltr {
    flex-direction: row;
}

/* Header actions for RTL */
[dir="rtl"] .header-actions-ltr {
    flex-direction: row-reverse;
}

/* Smooth transitions for language switching */
* {
    transition: font-family 0.3s ease;
}

body {
    transition: direction 0.3s ease, text-align 0.3s ease;
}

body.custom-background {
    /* background-image: url(../../assets/img/bg-path.png); */
    background-position: center center;
    background-size: auto;
    background-repeat: repeat;
    background-attachment: scroll;
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: start;
}

/* Footer RTL Support */
.footer-content-ltr {
    direction: ltr;
}

[dir="rtl"] .footer-content-ltr {
    direction: rtl;
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-social-ltr {
    flex-direction: row;
}

[dir="rtl"] .footer-social-ltr {
    flex-direction: row-reverse;
}

.footer-bottom-ltr {
    flex-direction: row;
}

[dir="rtl"] .footer-bottom-ltr {
    flex-direction: row-reverse;
}

.footer-links-ltr {
    flex-direction: row;
}

[dir="rtl"] .footer-links-ltr {
    flex-direction: row-reverse;
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    top: 80px;
    overflow-y: auto;
    height: calc(100vh - 80px);
    visibility: hidden;
    transition: transform 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease-in-out, visibility 0s linear 0s;
}

[dir="rtl"] .mobile-menu-overlay {
    transform: translateX(-100%);
}

[dir="rtl"] .mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-content {
    max-width: 100%;
}

.mobile-nav-ltr {
    align-items: flex-start;
}

[dir="rtl"] .mobile-nav-ltr {
    align-items: flex-end;
}

/* Hamburger Menu Button Animation */
.mobile-menu-btn.active .hamburger-line-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line-2 {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line-3 {
    transform: rotate(-45deg) translate(7px, -6px);
}

[dir="rtl"] .mobile-menu-btn.active .hamburger-line-1 {
    transform: rotate(45deg) translate(-5px, 5px);
}

[dir="rtl"] .mobile-menu-btn.active .hamburger-line-3 {
    transform: rotate(-45deg) translate(-7px, -6px);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Desktop Navigation - Show at 1100px and above */
@media (min-width: 1100px) {
    .desktop-nav {
        display: flex !important;
    }

    .desktop-actions {
        display: flex !important;
    }

    .mobile-menu-btn-visible {
        display: none !important;
    }
}

/* Mobile Menu - Show below 1100px */
@media (max-width: 1099px) {
    .desktop-nav {
        display: none !important;
    }

    .desktop-actions {
        display: none !important;
    }

    .mobile-menu-btn-visible {
        display: flex !important;
    }
}

/* Responsive adjustments */
@media (max-width: 1099px) {
    header {
        padding: 0;
    }
}

@media (max-width: 640px) {
    .mobile-menu-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Hero Section RTL Support */
[dir="rtl"] .group svg {
    transform: scaleX(-1);
}

[dir="rtl"] .group:hover svg {
    transform: scaleX(-1) translateX(-4px);
}

/* Hero Grid Responsive */
@media (max-width: 768px) {
    #hero .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    #hero .h-\[800px\] {
        height: auto;
        min-height: 500px;
    }

    #hero .pl-10 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #hero .pr-10 {
        padding-right: 1rem;
    }
}

/* Header Scroll Animation - Fall Down with translateY */
header {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-bottom-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow, backdrop-filter, background-color;
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(107, 114, 128, 0.2) !important;
}

header.animate-fall-down {
    animation: fallDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fallDown {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
    }
}

/* Swiper Pagination Customization */
.swiper-pagination {
    position: static !important;
    margin-top: 40px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #E5E7EB;
    opacity: 1;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: rgb(var(--primary-color));
    width: 30px;
}

/* Second Slide Translate Effect */
@keyframes highlightBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Apply translateY to the "next" slide (the second one visible) */
.mySwiper .swiper-slide-next .group {
    transform: translateY(60px);
    transition: transform 0.3s ease;
}

/* Ensure text turns white on group hover for details link */
.group:hover .details-link {
    color: #ffffff !important;
}

.mySwiper .swiper-slide-next .group .details-link-wrapper {
    transform: translateY(0px) !important;
    transition: transform 0.3s ease;
    opacity: 1 !important;
    background: linear-gradient(to right, rgb(var(--primary-color)), transparent) !important;
}

.mySwiper .swiper-slide-next .group .details-link-wrapper .details-link {
    color: #ffffff !important;
}

.swiper-pagination-bullet {
    background: #fff !important;
    border: 1px solid #000000 !important;
    width: 14px !important;
    height: 14px !important;
}

/* Active bullet morphing triangle */
@keyframes trianglePulse {

    0%,
    100% {
        transform: scale(1);
        clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    }

    50% {
        transform: scale(1.2);
        clip-path: polygon(50% 10%, 5% 95%, 95% 95%);
    }
}

.swiper-pagination-bullet-active {
    background: #000000 !important;
    width: 20px !important;
    height: 20px !important;
    border: none !important;
    border-radius: 0 !important;
    animation: trianglePulse 2s infinite ease-in-out;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.stroked-text {
    color: white;
    /* This sets the fill color */
    -webkit-text-stroke-width: 1px;
    /* This sets the stroke width */
    -webkit-text-stroke-color: black;
    /* This sets the stroke color */
    transition: all .2s ease-in-out;
}

.stroked-text:hover {
    color: #ffffff !important;
}

/* Marquee Scroll Styles */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

/* Pause on hover */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* RTL Support for Marquee */
[dir="rtl"] .marquee-track {
    animation-name: marquee-scroll-rtl;
}

@keyframes marquee-scroll-rtl {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Awards Image Zoom Animation */
@keyframes zoomInImage {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom-in {
    animation: zoomInImage 0.5s ease-out forwards;
}

.cloth_pattern {
    background-image: url("../img/clothpattern.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100%;
}

.team-member:after {
    content: '';
    position: absolute;
    top: 30px;
    left: 20%;
    right: 20%;
    width: 60%;
    height: calc(100% - 120px);
    /* background: linear-gradient(180deg, rgba(var(--primary-color), 1), rgba(var(--primary-color), 1)); */
    background: linear-gradient(180deg, rgb(var(--primary-color) / 1), rgb(var(--primary-color) / 0.1));
    filter: blur(30px);
    border-radius: 10px;
    -webkit-border-radius: 10px;
    transform: scale(0);
    -webkit-transform: scale(0);
    transform-origin: center;
    -webkit-transform-origin: center;
    transition: all .5s ease-in-out;
    -webkit-transition: all .5s ease-in-out;
    z-index: 1;
}

.group:hover .team-member:after {
    transform: scale(1);
    -webkit-transform: scale(1);
}

/* RTL Font Overrides */
[dir="rtl"] .font-montserrat,
[dir="rtl"] .font-open_sans,
[dir="rtl"] .font-outfit {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}

/* RTL Hero Support */
[dir="rtl"] .hero-tag-container svg {
    transform: scaleX(-1);
}

/* RTL Animation Swaps */
[dir="rtl"] .animate__fadeInLeft {
    animation-name: fadeInRight;
}

[dir="rtl"] .animate__fadeInRight {
    animation-name: fadeInLeft;
}

/* Adjust line height for Arabic text readability */
[dir="rtl"] h1 {
    line-height: 1.4 !important;
}

/* Hero Image RTL Fix - Position image on left for Arabic on Desktop */
@media (min-width: 768px) {
    [dir="rtl"] .hero-image {
        right: auto !important;
        left: 0 !important;
    }
}

/* Services Accordion List Styling */
.service-accordion-content ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.service-accordion-content li {
    position: relative;
    padding-left: 1.5rem;
    width: fit-content;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Square Bullet */
.service-accordion-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    /* Align with text */
    width: 6px;
    height: 6px;
    background-color: rgb(var(--primary-color));
}

/* "Know More" Style Line Animation on Hover */
.service-accordion-content li::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    /* Slight offset below text */
    width: 100%;
    height: 2px;
    background-color: rgb(var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.service-accordion-content li:hover::after {
    transform: scaleX(1);
}

.service-accordion-content li:hover {
    color: rgb(var(--primary-color));
}

.clientLogo {
    width: 100px !important;
    height: 100px !important;
    /* filter: invert(54%) sepia(93%) saturate(1576%) hue-rotate(177deg) brightness(93%) contrast(83%); */
    filter: grayscale(100%);
}

.clientLogo:hover {
    filter: none;
}