/* css/shared.css */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

:root {
    --primary-red: #e92126;
    --dark-gray: #353736;
    --white: #ffffff;
    --font-head: 'Tajawal', sans-serif;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--dark-gray);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Bootstrap Overrides */
.text-danger { color: var(--primary-red) !important; }
.bg-danger { background-color: var(--primary-red) !important; }
.btn-danger { background-color: var(--primary-red); border-color: var(--primary-red); }

a { text-decoration: none !important; transition: 0.3s; }

/* Floating Buttons */
.floating-actions {
    position: fixed;
    bottom: 30px; left: 30px; z-index: 999;
    display: flex; flex-direction: column; gap: 15px;
}
.fab {
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: white; font-size: 20px;
}
.fab.support { background-color: #00d2d3; }
.fab.cart { background-color: #9ecc40; }


/* --- Desktop Navigation Styling --- */
.desktop-nav a {
    font-family: 'Oswald', sans-serif; /* Or var(--font-head) if you use variables */
    font-weight: 700;
    font-size: 14px;
    color: #353736; /* Your dark gray variable */
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

/* Hover & Active State */
.desktop-nav a:hover, 
.desktop-nav a.active {
    color: #e92126; /* Your primary red variable */
}

/* Optional: Red dot/underline for active state on desktop */
.desktop-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e92126;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.desktop-nav a:not(.active)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e92126;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
}


/* ===========================
   MOBILE RESPONSIVE STYLES
   =========================== */

/* General Mobile Utilities */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .display-1 { font-size: 2.5rem !important; }
    .display-2 { font-size: 2rem !important; }
    .display-3 { font-size: 1.75rem !important; }
    .display-4 { font-size: 1.5rem !important; }
    .display-5 { font-size: 1.25rem !important; }
    
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.5rem !important; }
    h4 { font-size: 1.25rem !important; }
    h5 { font-size: 1.1rem !important; }
    h6 { font-size: 1rem !important; }
    
    .container,
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-lg-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mt-5 {
        margin-top: 2rem !important;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 13px;
    }
    
    .display-1 { font-size: 2rem !important; }
    .display-2 { font-size: 1.75rem !important; }
    .display-3 { font-size: 1.5rem !important; }
    .display-4 { font-size: 1.25rem !important; }
    .display-5 { font-size: 1.1rem !important; }
    
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    h4 { font-size: 1.1rem !important; }
    h5 { font-size: 1rem !important; }
    h6 { font-size: 0.9rem !important; }
    
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .py-lg-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    
    .mt-5 {
        margin-top: 1.5rem !important;
    }
}

/* Sidebar Mobile */
@media (max-width: 768px) {
    .sidebar-menu {
        width: 280px;
    }
    
    .sidebar-menu {
        padding: 80px 30px 30px;
    }
}

/* Prevent Horizontal Overflow */
* {
    box-sizing: border-box;
}

section,
.container,
.container-fluid,
.row {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;

}

img {
    max-width: 100%;
    height: auto;
}

/* Fix for AOS animations causing overflow */
[data-aos] {
    overflow: visible;
}

/* Ensure AOS animations don't cause horizontal overflow */
@media (max-width: 768px) {
    [data-aos] {
        will-change: transform, opacity;
    }
    
    /* Prevent AOS fade-left/right from causing overflow */
    [data-aos="fade-left"],
    [data-aos="fade-right"] {
        transform: translateX(0) !important;
    }
    
    /* Reset AOS transforms on mobile to prevent overflow */
    .aos-animate {
        transform: translateX(0) !important;
        transform: translateY(0) !important;
    }
}

@media (max-width: 768px) {
    /* Ensure all sections are contained */
    section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
    }
    
    /* Fix container overflow */
    .container,
    .container-fluid {
        max-width: 100%;
        width: 100%;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Prevent row overflow */
    .row {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    /* Fix column overflow */
    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
        max-width: 100%;
    }
    
    /* Fix images */
    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
    
    /* Fix fixed positioned elements */
    .fixed-comm-buttons {
        max-width: calc(100vw - 30px);
    }
    
    /* Prevent text overflow */
    h1, h2, h3, h4, h5, h6, p, span, a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix for all sections */
    section {
        box-sizing: border-box;
    }
    
    /* Fix for cards and containers */
    .card,
    .card-body,
    .card-footer {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix for buttons */
    .btn {
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Fix for forms */
    .form-control,
    input,
    textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for iframes */
    iframe {
        max-width: 100%;
        width: 100%;
    }
    
    /* Fix for swiper */
    .swiper {
        max-width: 100%;
        overflow: hidden;
    }
    
    .swiper-wrapper {
        max-width: 100%;
    }
    
    /* Fix for gallery items */
    .gallery-item {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Fix for stat circles */
    .stat-circle {
        max-width: 100%;
    }
}

a i {
    width: fit-content !important;
    height: fit-content !important;
}

html[lang="ar"] .bk-hero__title {
    color: var(--primary-red) !important;
}