:root {
    --main-green: #2d5a3f;
    --light-green: #8cae92;
    --gold: #c5a059;
}


body {

    background: url('photos/bg.png'), linear-gradient(to bottom, #f6eee2 0%, #0c6e3d 80%);

    background-size: auto, cover;
    background-repeat: repeat, no-repeat;
    margin: 0;
    min-height: 100vh;
}

.bg-dark-green {
    background-color: var(--main-green) !important;
}

.text {
    font-family: "TextFont";
    font-size: 3rem;
}

.section-title {
    font-size: 4.5rem;
    color: #000;
    margin-bottom: 30px;

    font-weight: bold;
    font-family: "TitleFont";
}

@font-face {
    font-family: 'TitleFont';
    src: url('../fonts/title font.ttf') format('truetype');
}

@font-face {
    font-family: 'TextFont';
    src: url('../fonts/texte font.otf') format('opentype');
}

.arabic-title {
    font-family: "TitleFont";
    font-size: 5rem !important;
}

.text-dark_8 {
    font-family: "TitleFont";
    width: 80%;
    font-size: 3rem;
    margin: 0 auto;
    line-height: 1.8;
    color: black;
}

.text-dark {
    font-family: "TitleFont";
    font-size: 1.6rem;
    width: 100%;
    text-align: right;
    line-height: 1.9;
    direction: rtl;
}

.arabic-title {
    margin-top: 20px !important;
    padding-top: 20px;
}

.main {
    min-height: 105vh;
    background: url('photo/back.png');
    width: 100%;
    padding-top: 170px;
}

/* Navbar container */
.custom-navbar {
    background-color: #e9e9df;
    padding: 12px 30px;
}

/* Left section */
.nav-left i {
    font-size: 20px;
    cursor: pointer;

}

.nav-btn {
    background: #deded6;
    border: none;
    padding: 20px 20px;
    border-radius: 999px;
    font-size: 17px;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btn:hover {
    background: #cfcfc6;
}

.nav-btn a {
    text-decoration: none;
    color: #000000;
    display: inline-block;
}

.nav-btn a:visited {
    color: #000000;
}

.nav-btn a:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Center menu */
.nav-center {
    list-style: none;
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    background: #d8d8cf;
    border-radius: 999px;
}

.nav-center li a {
    display: block;
    padding: 20px 20px;
    text-decoration: none;
    color: #000;
    font-size: 17px;
    border-radius: 999px;
    transition: 0.3s;
}

/* Active item */
.nav-center li.active a {
    background: #bfbfb5;
    font-weight: bold;
}

/* Harmonisation des images */
.custom-img {
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
}

/* Style de la carte de news */
.news-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* Style de la légende  */
.news-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .custom-img {
        height: 250px;
    }
}

.ads-wrapper {
    background-color: #ffffff;
    border: 8px solid #2d5a3f;
    border-radius: 40px;
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 1000px;
}

.ad-poster {
    height: 380px;
    width: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
    transition: transform 0.3s ease;
}

/* Effet de zoom au survol */
.ad-poster:hover {
    transform: scale(1.03);
}


.nav-center li a:hover {
    background: #cfcfc6;
}

.nav-logo img {
    height: 80px;
}

/* Responsive */
@media (max-width: 992px) {
    .custom-navbar {
        padding: 15px;
    }

    .nav-center {
        display: none;
        /* hide center menu on mobile */
    }
}

.border-gold {
    border: 3px solid var(--gold);
    border-radius: 15px;
    overflow: hidden;
    padding: 10px;
    background: white;
}

.news-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.news-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
}


/* buttom bar footer */



.footer-bottom-bar {
    background-color: #0c6e3d;
    /* Deep green */
    border-top: 1px solid #fff;
    padding: 20px 0;
    width: 100%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;

    justify-content: flex-end;
    padding: 0 40px;
}

.footer-right {
    display: flex;
    gap: 30px;
}

.footer-link {
    color: #000000;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 14px;
    white-space: nowrap;
}

.footer-link:hover {
    text-decoration: underline;
}


@media (max-width: 768px) {
    .footer-container {
        justify-content: center;
    }

    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}





body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('pattern.png');
    /* Une trame géométrique islamique */
    opacity: 0.1;
    z-index: -1;
}

.border-green-thick {
    border: 5px solid #1a5d3b !important;
    border-radius: 25px !important;
    background-color: #fff;
    overflow: hidden;
}


.custom-img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.ad-poster-img {
    height: 450px;
    width: 100%;
    object-fit: contain;
}

/* تنسيق الأرشيف */
.archive-full-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.archive-card {
    position: relative;
    background: #000;
}

.archive-caption {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px;
    font-size: 1.8rem;
    width: 100%;
}

.custom-arrow {
    width: 50px !important;
    color: #000 !important;
    font-size: 1.5rem;
    opacity: 1;
}

.carousel-control-prev {
    left: -60px;
}

.carousel-control-next {
    right: -60px;
}

/* Navbar Styles - From Store */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: linear-gradient(to bottom, #e8e0d4, #d4cdc2);
    z-index: 1000;
    direction: rtl;
    transition: transform 0.3s ease;
}

.navbar-hidden {
    transform: translateY(-100%);
}

.logo img {
    height: 100px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    direction: rtl;
}

.main-menu {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 5px;
    gap: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: #5a5a5a;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    white-space: nowrap;
    position: relative;
    font-weight: 500;
}

.nav-link:hover {
    color: #000;
}

.nav-link.active {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.nav-link.active::after {
    display: none;
}

.nav-left .nav-link {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
}

.nav-left .nav-link:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #333;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.icon-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Footer - From Store */
.footer {
    background: transparent;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    padding: 3rem 4rem;
    direction: rtl;
    position: relative;
    z-index: 10;
    border-top: 1px solid #fff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-logo {
    text-align: center;
}

.footer-logo img {
    height: 220px;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.social-icon:hover {
    transform: scale(1.1);
}

.footer-links {
    text-align: right;
}

.footer-links h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    transition: color 0.3s ease;
    gap: 1rem;
}

.link-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-5px);
}

.footer-contact {
    text-align: right;
}

.footer-contact h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.footer-contact p {
    color: #ccc;
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: #5a5a5a;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1002;
    padding: 0.5rem;
}

@media (max-width: 900px) {
    .hamburger {
        display: block;
    }

    .navbar {
        padding: 1rem;
        justify-content: space-between;
    }

    /* Center Logo on Mobile */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
    }

    .logo img {
        height: 80px;
        /* Slightly smaller on mobile */
    }

    /* Hide Desktop Menu */
    .nav-menu,
    .nav-left {
        display: none;
    }

    /* Mobile Menu State */
    .navbar.active {
        flex-direction: column;
        align-items: center;
        background: #e8e0d4;
        /* Solid background when open */
        height: 100vh;
        /* Full screen menu */
        justify-content: flex-start;
        padding-top: 6rem;
        overflow-y: auto;
    }

    .navbar.active .logo {
        position: absolute;
        top: 10px;
        /* Keep logo at top */
    }

    .navbar.active .hamburger {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .navbar.active .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        margin-bottom: 2rem;
    }

    .navbar.active .main-menu {
        flex-direction: column;
        width: 80%;
        background: transparent;
        border: none;
        gap: 1rem;
    }

    .navbar.active .nav-link {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .navbar.active .nav-left {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
    }
}


/* Hide hamburger menu */
.hamburger {
    display: none !important;
}


/* Mobile Responsive - Carousels */
@media (max-width: 768px) {

    /* Make carousels show 1 item at full width */
    .carousel-inner {
        width: 100% !important;
    }

    .carousel-item {
        width: 100% !important;
    }

    .carousel-item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Stack carousel items vertically on mobile */
    .carousel-item .row {
        flex-direction: column !important;
    }

    /* Target all column sizes */
    .carousel-item .col-md-4,
    .carousel-item .col-md-5,
    .carousel-item .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }

    /* Hide extra items - show only FIRST item in each carousel */
    .carousel-item .row .col-md-4:nth-child(n+2),
    .carousel-item .row .col-md-5:nth-child(n+2),
    .carousel-item .row .col-md-6:nth-child(n+2) {
        display: none !important;
    }

    /* Ensure news cards are full width */
    .news-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .custom-img {
        width: 100% !important;
        height: auto !important;
        max-height: 400px !important;
        object-fit: cover !important;
    }

    /* Adjust container padding for mobile */
    .border-green-thick {
        padding: 1rem !important;
        border-radius: 15px !important;
    }

    /* Adjust section titles */
    .section-title {
        font-size: 2.5rem !important;
    }

    .text {
        font-size: 1.5rem !important;
    }

    /* Adjust carousel controls */
    .custom-arrow {
        width: 35px !important;
        height: 35px !important;
    }

    .custom-arrow i {
        font-size: 1.2rem !important;
    }

    /* Adjust news caption */
    .news-caption {
        font-size: 1.1rem !important;
        padding: 0.8rem !important;
    }
}