/* 
 * Custom CSS for Al-Assan Single Page Website
 * Theme: Home and Kitchen Products Company
 * RTL Support: Yes (Arabic)
 */

/* Define color variables based on the specified color palette */
:root {
    --dark-blue: #2B2D42;
    --grey-blue: #8D99AE;
    --light-grey: #EDF2F4;
    --primary-red: #EF233C;
    --dark-red: #D90429;
}

/* =========== General Styling =========== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--dark-blue);
    overflow-x: hidden;
    background-color: #fff;
}

section {
    padding: 5rem 0;
    position: relative;
}

.ltr-text {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    color: #555;
    font-weight: 400;
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: var(--primary-red);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--dark-red);
}

/* =========== Preloader =========== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #EDF2F4;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    max-width: 150px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--primary-red);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========== Section Styling =========== */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    position: relative;
    margin-bottom: 1rem;
    font-weight: 800;
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--dark-blue);
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-red);
    margin: 15px auto 0;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--grey-blue);
    max-width: 700px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--light-grey) !important;
}

.text-primary-red {
    color: var(--primary-red) !important;
}

.bg-primary-red {
    background-color: var(--primary-red) !important;
}

/* =========== Button Styling =========== */
.btn {
    border-radius: 30px;
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary-red {
    background-color: var(--primary-red);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(239, 35, 60, 0.3);
    color: white;
}

.btn-primary-red:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--dark-red);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-primary-red:hover:before {
    width: 100%;
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    background-color: transparent;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* =========== Navbar Styling =========== */
.navbar {
    padding: 1.2rem 2rem;
    transition: all 0.3s ease;
}

.navbar-scrolled {
    padding: 0.7rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background-color: var(--dark-blue) !important;
}

.navbar-brand img {
    height: 50px;
    transition: all 0.3s ease;
}

.navbar-scrolled .navbar-brand img {
    height: 45px;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--light-grey);
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary-red);
}

.navbar-dark .navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-dark .navbar-nav .nav-link:hover:after,
.navbar-dark .navbar-nav .nav-link.active:after {
    width: 70%;
}

/* =========== Hero Section =========== */
.hero-section {
    height: 100vh;
    min-height: 700px;
    background-image: linear-gradient(to bottom, rgba(43, 45, 66, 0.8), rgba(43, 45, 66, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px; /* To account for fixed navbar */
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 70%; 
    margin: 0 auto;
}

.hero-image {
    max-height: 350px; 
    width: auto;
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

/* =========== Featured Products Carousel =========== */
.featured-section {
    position: relative;
    z-index: 1;
    padding-top: 3rem;
}

.carousel-item {
    height: 500px;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background-color: rgba(43, 45, 66, 0.7);
    border-radius: 10px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    bottom: 40px;
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 5px;
}

.carousel-indicators button.active {
    background-color: var(--primary-red);
}

.carousel-control-prev, .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(43, 45, 66, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

/* =========== About Section =========== */
.about-section {
    position: relative;
    z-index: 1;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: -20px;
    background-color: var(--primary-red);
    color: white;
    padding: 20px;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 20px rgba(239, 35, 60, 0.3);
    animation: pulse 2s infinite;
}

.experience-badge .years {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.about-feature {
    margin-bottom: 1.5rem;
}

.about-feature .icon-box {
    min-width: 50px;
}

.about-feature h5 {
    margin-bottom: 0.5rem;
}

/* =========== Vision Section =========== */
.vision-card {
    background-color: white;
    transition: all 0.3s ease;
    border: none;
}

.vision-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.vision-card .icon-box {
    width: 80px;
    height: 80px;
    background-color: rgba(237, 242, 244, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.vision-card:hover .icon-box {
    background-color: rgba(239, 35, 60, 0.1);
}

/* =========== Products Section =========== */

.nav-pills {
    margin-bottom: 2rem;
}

.nav-pills .nav-link {
    color: var(--dark-blue);
    border-radius: 30px;
    padding: 0.7rem 1.5rem;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active, 
.nav-pills .nav-link:hover {
    background-color: var(--primary-red);
    color: white;
}

.product-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8; 
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 15px; 
    transition: all 0.5s ease;
}


.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    display: none; 
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-text {
    color: #666;
    margin-bottom: 0.5rem;
}

.product-code {
    color: var(--grey-blue);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* =========== Call to Action Section =========== */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section:before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-section:after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* =========== Contact Section =========== */
.contact-info-card {
    background-color: white;
    transition: all 0.3s ease;
    border: none;
}

.contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.contact-info-card .icon-box {
    width: 80px;
    height: 80px;
    background-color: rgba(237, 242, 244, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.contact-info-card:hover .icon-box {
    background-color: rgba(239, 35, 60, 0.1);
}

.contact-form-card, .map-card {
    background-color: white;
    border: none;
    border-radius: 10px;
}

.form-control {
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--grey-blue);
    box-shadow: 0 0 0 0.25rem rgba(141, 153, 174, 0.25);
}

/* =========== FAQ Section =========== */
.accordion-item {
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.accordion-button {
    padding: 1.2rem 1.5rem;
    font-weight: 600;
    color: var(--dark-blue);
    background-color: white;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-red);
    background-color: white;
}

.accordion-button:after {
    background-size: 1.2rem;
    transition: all 0.3s ease;
}

.accordion-body {
    padding: 1.5rem;
    color: #666;
}

/* =========== Footer =========== */
.footer {
    position: relative;
    overflow: hidden;
}

.footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-red), var(--dark-red));
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-red);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-red);
    color: white;
    transform: translateY(-5px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

.contact-info li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

/* =========== Back to Top Button =========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(239, 35, 60, 0.3);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-red);
    color: white;
    transform: translateY(-5px);
}

/* =========== Animation Styles =========== */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* =========== Responsive Styles =========== */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .carousel-item {
        height: 450px;
    }
}

@media (max-width: 992px) {
    .navbar {
        padding: 1rem;
    }
    
    .navbar-collapse {
        background-color: var(--dark-blue);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .experience-badge {
        width: 100px;
        height: 100px;
        right: 10px;
    }
    
    .experience-badge .years {
        font-size: 2rem;
    }
    
    .carousel-item {
        height: 400px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }
    
    .py-6 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption {
        max-width: 100%;
        right: 10%;
        left: 10%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 40px;
    }
    
    .hero-section {
        min-height: 600px;
    }
    
    .carousel-item {
        height: 300px;
    }
}

/* =========== Custom Animation Classes =========== */
.animated-element {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation-name: fadeInUp;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInDown {
    animation-name: fadeInDown;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fadeInLeft {
    animation-name: fadeInLeft;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fadeInRight {
    animation-name: fadeInRight;
}