/*============================*/
/*       ROOT VARIABLES       */
/*============================*/
:root {
    /* الألوان الأساسية */
    --primary-yellow: #ffea33;
    /* أصفر فاتح، مناسب للخلفيات */
    --primary-yellow-dark: #e6d300;
    /* أصفر داكن للنصوص على الخلفيات الفاتحة */
    --primary-red: #8B0000;
    /* أحمر داكن للنصوص أو التحذيرات */
    --primary-brown: #8c5e2c;
    /* بني فاتح للتفاصيل أو الخلفيات الثانوية */
    --secondary-brown: #b28c58;
    /* بني فاتح جدًا لتباين خفيف */
    --accent-green: #25d366;
    /* أخضر فاتح وزاهي */
    --accent-green-dark: #1da851;
    /* أخضر داكن للنصوص على الخلفية الفاتحة */
    --accent-green-hover: #159144;
    /* أخضر أغمق عند التحويم */
    --accent-blue: #4da6ff;
    /* أزرق فاتح للنصوص أو الروابط */
    --accent-blue-hover: #0062cc;
    /* أزرق داكن للتحويم */
    --checkmark-bg: #8c5e2c;
    /* لون علامة الاختيار على خلفية فاتحة */
    --checkmark-hover-bg: #b28c58;
    /* لون أفتح عند التحويم */
    --contact-bg: #362600;
    /* بني داكن للخلفيات القوية */
    --text-dark: #333;
    /* نص داكن على الخلفيات الفاتحة */
    --white: #fff;
    /* الأبيض */
    --body-bg: #f7f6f0;
    /* خلفية فاتحة ومريحة للعين */


    /* Font sizes */
    --font-large: 3rem;
    --font-medium-large: 1.5rem;
    --font-medium: 1.8rem;
    --font-small: 16px;
    --font-smaller: 14px;

    /* Shadows */
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-inset: inset 0 0 15px rgba(0, 0, 0, 0.05);

    /* Radii */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 15px;
    --radius-xl: 20px;

    /* Spacing */
    --gap-small: 6px;
    --gap-medium: 15px;
    --gap-large: 20px;

    font-family: 'Cairo', sans-serif;
}

/*============================*/
/*          BODY              */
/*============================*/
body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    margin: 0;
    overflow: hidden;
    /* منع أي تمرير في الوضع العادي */
}

/*============================*/
/*           NAVBAR           */
/*============================*/
nav {
    position: fixed;
    top: 70px;
    right: 40px;
    background-color: var(--primary-yellow);
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-small);
    border-radius: var(--radius-xl);
    z-index: 1000;
    width: max-content;
    height: auto;
    box-shadow: var(--shadow-light);
}

nav a {
    background-color: transparent;
    color: var(--primary-brown);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: var(--radius-large);
    font-size: var(--font-small);
    cursor: pointer;
    transition: all 0.3s;
}

nav a i {
    font-size: 24px;
    margin-top: 18px;
    margin-bottom: -10px;
}

nav a:hover,
nav a.active {
    color: var(--primary-red);
    transform: scale(1.05);
}

/*============================*/
/*       MAIN CONTAINER       */
/*============================*/
.main-container {
    display: flex;
    flex-direction: row-reverse;
    gap: var(--gap-large);
    padding: 90px 40px 20px 20px;
    justify-content: flex-start;
    align-items: flex-start;
}

/*============================*/
/*            HERO            */
/*============================*/
.hero {
    background-color: var(--primary-yellow);
    flex: 0 0 40%;
    border-radius: var(--radius-xl);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--primary-red);
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 2;
    height: 90vh;
    margin-right: 100px;
    bottom: 50px;
}

.hero-slider {
    width: 100%;
    height: 75%;
    overflow: hidden;
    border-radius: var(--radius-large);
    margin-bottom: 5px;
}

.hero-slider img {
    width: 100%;
    height: 100%;      
    object-fit: fill;
    display: none;
    border-radius: var(--radius-large);
    transition: opacity 1s ease-in-out;
}

.hero-slider img.active {
    display: block;
}

.hero h1 {
    font-size: var(--font-large);
    font-weight: 900;
}

.hero p {
    font-size: var(--font-medium-large);
    margin-bottom: 5px;
    color: var(--primary-brown);
}

.hero-icons {
    display: flex;
    gap: var(--gap-medium);
    margin-top: 20px;
}

.hero-icons a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: var(--font-small);
    font-weight: bold;
    color: var(--white);
    transition: all 0.3s ease;
}

.hero-icons a i {
    font-size: 18px;
}

.hero-icons a:nth-child(1) {
    background-color: var(--accent-green);
}

.hero-icons a:nth-child(1):hover {
    background-color: var(--accent-green-hover);
    transform: translateY(-2px);
}

.hero-icons a:nth-child(2) {
    background-color: var(--contact-bg);
}

.hero-icons a:nth-child(2):hover {
    background-color: var(--secondary-brown);
    transform: translateY(-2px);
}

/*============================*/
/*        CONTENT SECTION     */
/*============================*/
.content-section {
    background-color: var(--primary-yellow);
    flex: 0 0 50%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    /*margin-right: -25px;*/
    z-index: 1;
    max-height: 80vh;
    transition: all 0.5s ease-in-out;
    direction: rtl;
    text-align: right;
}

.content-section>div {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    display: block;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.content-section>div.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/*============================*/
/*          SECTIONS          */
/*============================*/
#home-section {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-yellow-light));
    padding: 20px;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    direction: rtl;
    text-align: right;
    color: var(--text-dark);
    line-height: 2;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 80vh;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Scrollbars */
#home-section::-webkit-scrollbar {
    width: 6px;
    opacity: 0;
    transition: opacity 0.3s;
}

#home-section:hover::-webkit-scrollbar {
    opacity: 1;
}

#home-section::-webkit-scrollbar-track {
    background: transparent;
}

#home-section::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

#home-section {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

/* Section Titles */
#home-section h2 {
    color: var(--primary-brown);
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
}

#home-section h3 {
    color: var(--secondary-brown);
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 15px;
    border-right: 5px solid var(--primary-brown);
    padding-right: 12px;
}

/* Lists */
#home-section ol {
    padding-right: 30px;
    margin-bottom: 25px;
    list-style: none;
}

#home-section ol li {
    background: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-large);
    border-right: 4px solid var(--primary-brown);
    font-size: 18px;
    font-weight: 500;
    position: relative;
    transition: background 0.3s ease, transform 0.2s ease;
}

#home-section ol li:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(-3px);
}

/* Paragraphs */
#home-section p {
    font-size: 18px;
    margin-top: 18px;
}

#home-section strong {
    color: var(--primary-brown);
    font-weight: bold;
}

/*============================*/
/*  SERVICES SECTION          */
/*============================*/
#services-section {
    background-color: var(--primary-yellow);
    padding: 25px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-inset);
    width: 100%;
    margin: auto;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--gap-large);
    overflow: hidden;
    box-sizing: border-box;
}

#services-section h2 {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-brown);
    margin: 0 0 10px 0;
    display: inline-block;
    border-bottom: 3px solid rgba(106, 75, 0, 0.3);
    padding-bottom: 5px;
}

#services-section ul li {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
    padding: 10px 15px;
    border-radius: var(--radius-medium);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

#services-section ul li .checkmark {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--checkmark-bg);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

#services-section ul li:hover .checkmark {
    transform: scale(1.1);
    background-color: var(--checkmark-hover-bg);
}

/*============================*/
/*  WORKS SECTION             */
/*============================*/
#works-section {
    background-color: var(--primary-yellow);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-inset);
    width: 100%;
    height: 100%;
    margin: 0;
    direction: rtl;
    text-align: center;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 20px;
}

/* Scrollbar */
#works-section::-webkit-scrollbar {
    width: 6px;
}

#works-section::-webkit-scrollbar-track {
    background: transparent;
}

#works-section::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#works-section h2 {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-brown);
    margin: 0 0 20px 0;
    display: inline-block;
    border-bottom: 3px solid rgba(106, 75, 0, 0.3);
    padding-bottom: 8px;
    text-align: center;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: var(--radius-large);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px;
    margin-bottom: 15px;
    z-index: 1;
}

.gallery-img:hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/*============================*/
/* CONTACT SECTION            */
/*============================*/
#contact-section {
    background-color: var(--primary-yellow);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-inset);
    max-width: 900px;
    margin: 0 auto;
    direction: rtl;
    text-align: right;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#contact-section h2 {
    font-size: 30px;
    color: var(--primary-brown);
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: inline-block;
    text-align: center;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
}

.contact-info p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--contact-bg);
}

.contact-info strong {
    color: var(--primary-brown);
}

.contact-info .phone a {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 15px;
    background-color: var(--primary-brown);
    color: var(--white);
    border-radius: var(--radius-small);
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.contact-info .phone a:hover {
    background-color: var(--checkmark-hover-bg);
}

.contact-info .email a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info .email a:hover {
    color: #a78a47;
}

.map-container {
    margin-top: 20px;
    width: 100%;
    border-radius: var(--radius-large);
    overflow: hidden;
    height: 250px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-large);
}

/*============================*/
/*        MEDIA QUERIES       */
/*============================*/
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        gap: 5px;
        align-items: center;
        padding: 5px;
    }

    .hero {
        width: 100%;
        height: auto;
        margin-right: auto;
        margin-top: 40%;
        border-radius: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .hero-slider {
        height: auto;
    }

    .hero-slider img {
        width: 100%;
        height: 75%;
    }

    .hero h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    .hero p {
        font-size: 0.95rem;
        text-align: center;
    }

    .hero-icons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }

    .hero-icons a {
        font-size: 13px;
        padding: 6px 10px;
        border-radius: 20px;
    }

    .content-section {
        width: 100%;
        max-height: none;
        overflow: visible;
        margin: 0;
        padding: 5px 0;
        background-color: var(--body-bg);
    }

    .content-section>div {
        position: relative;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding: 10px;
        width: 100%;
    }

    #home-section,
    #services-section,
    #works-section,
    #contact-section {
        width: 100%;
        max-height: none;
        padding: 10px;
        border-radius: 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        overflow: visible;
        margin-bottom: 50px;
        background-color: var(--primary-yellow);
        scroll-margin-top: 100px;
    }

    #home-section h2,
    #services-section h2,
    #works-section h2,
    #contact-section h2 {
        font-size: 22px;
    }

    #home-section h3 {
        font-size: 16px;
    }

    #home-section p,
    #services-section ul li,
    #works-section p,
    #contact-section p {
        font-size: 14px;
    }

    .gallery-img {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
    }

    .map-container {
        width: 100%;
        height: 180px;
    }

    nav {
        top: 5px;
        right: 50%;
        transform: translateX(50%);
        flex-direction: row-reverse;
        border-radius: var(--radius-xl);
        gap: 12px;
        width: 95%;
        justify-content: space-evenly;
        align-items: center;
        flex-wrap: wrap;
        padding: 5px 8px;
        box-sizing: border-box;
        position: fixed;
        z-index: 1000;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    nav a {
        font-size: 13px;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav a i {
        font-size: 18px;
        margin: 0;
    }

    body {
        overflow-x: hidden;
        overflow-y: scroll;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body::-webkit-scrollbar {
        display: none;
    }

    #scrollTopBtn {
        display: none;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: var(--checkmark-hover-bg);
        color: var(--primary-yellow);
        font-size: 18px;
        padding: 10px 12px;
        border-radius: 50%;
        text-align: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    #scrollTopBtn:hover {
        background-color: #ffd700;
        transform: translateY(-2px);
    }

    #scrollTopBtn i {
        font-size: 20px;
    }

    
}