/* ==================================================
   ZAHRA LOURA – RESPONSIVE FILE
   Mobile First Fixes
   ================================================== */


/* ===============================
   GLOBAL FIXES
   =============================== */

html, body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* منع أي فراغ تحت الصور */
.projects-grid img,
.project-item img,
.thumbnail img,
.teaser-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ==================================================
   LARGE DEVICES (≤1200px)
   ================================================== */

@media (max-width: 1200px) {

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .project-main-title h1 {
        font-size: 2.8rem;
    }
}


/* ==================================================
   TABLETS (≤992px)
   ================================================== */

@media (max-width: 992px) {

    /* HERO */
    .hero {
        min-height: auto !important;
        height: 60vh;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    /* HEADER */
    .header-container {
        gap: 0;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* PROJECT GRID */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* SPLIT SECTIONS */
    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-content-cols {
        grid-template-columns: 1fr;
    }

    /* REGISTER SECTION */
    .register-layout {
        grid-template-columns: 1fr;
    }

    .register-form {
        padding: 40px 25px;
    }

    /* CONTACT */
    .contact-switcher {
        grid-template-columns: 1fr;
        grid-template-areas:
            "map"
            "address"
            "form";
    }

    .contact-switcher .address,
    .contact-switcher .form {
        padding: 45px 20px;
    }


    .footer-bottom-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
        /* FIX HEADER GAP */
    .hero,
    .page-header,
    .first-section {
        margin-top: 50px;
        padding: 50px 0 100px;
    }
    .footer-grid {
        flex-direction: row;
        gap: 15%;
    }


}


/* ==================================================
   SMALL TABLETS (≤768px)
   ================================================== */

@media (max-width: 768px) {

    .header-container{
        flex-direction: row;
        gap: 20px;
    }
    .logo {
        width: 50%;
    }
    a.nav-link {
        font-size: 10px;
    }
    .main-nav ul {
        padding-right: 0;
    }
    .top-nav-container {
        flex-direction: column;
        gap: 15px;
        padding:1%;
    }

     /* HEADER */
     .main-nav ul {
        justify-content: center;
    }
    section {
        padding: 60px 0 !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* HERO */
    .hero {
        height: 50vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle-ar {
        font-size: 1.6rem;
    }

    /* PROJECT GRID */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-item {
        height: 220px;
    }

    /* GALLERY */
    .teaser-img {
        aspect-ratio: 1 / 1;
    }

    /* STATS */
    .stats-grid {
        flex-direction: column;
        gap: 25px;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* BLOG */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* PAGINATION */
    .pagination li a,
    .pagination li span {
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    /* 404 */
    .error-code {
        font-size: 5rem;
    }

    .error-title {
        font-size: 1.4rem;
    }
}


/* ==================================================
   MOBILE (≤576px)
   ================================================== */

@media (max-width: 576px) {

    /* HERO */
    .hero {
        height: 45vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* PROJECT ITEMS */
    .project-item {
        height: 200px;
    }

    /* SERVICES */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 25px;
    }

    /* REGISTER */
    .register-sec {
        padding: 70px 0;
    }

    
    /* CONTACT MAP */
    .contact-switcher .map-cover {
        min-height: 280px;
    }

    /* FOOTER */
    .main-footer {
        padding-top: 50px;
    }

    /* FIX HEADER GAP */
    .hero,
    .page-header,
    .first-section {
        margin-top: 50px;
        padding: 50px 0 100px;
    }
}


/* ==================================================
   EXTRA SMALL DEVICES (≤400px)
   ================================================== */

@media (max-width: 400px) {

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle-ar {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

}
/* ===============================
   MOBILE HEADER @576px
   =============================== */

@media (max-width: 576px) {

    body {
        padding-top: 0;
    }
    section {
        padding: 0px 0 10px 0 !important;

    }
    .hero{
        max-height: 150px;

    }
    section:not(.hero-sec):not(.stats-bar){
        border-top: none;
    }
    .top-nav {
        display: none;
    }

    /* زرار القائمة */
    .menu-toggle {
        background: transparent;
        border: none;
        color: var(--gold-primary);
        font-size: 1.8rem;
        cursor: pointer;
    }

    /* اخفاء القائمة افتراضياً */
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: #0f1012;
        display: none;
        padding: 20px 0;
        border-top: 1px solid rgba(212,175,55,0.3);
        box-shadow: 0 15px 30px rgba(0,0,0,0.6);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .main-nav a {
        font-size: 1.1rem;
        color: #fff;
    }

    .main-nav a:hover {
        color: var(--gold-primary);
    }

    /* لما نضيف active */
    .main-nav.active {
        display: block;
        animation: fadeMenu 0.3s ease;
    }

    .blog-single-title {
        margin: 20px auto 40px;
        font-size: 1.5rem;
    }
    .footer-col {
        margin-bottom: 10%;
    }
    h1.page-title {
        font-size: 2rem;
    }
    section.partners {
        margin-top: 10%;
    }
    .register-form h2 {
        font-size: 1rem;
    }
    .input-group {
        display: flex;
        width: 100%;
        flex-direction: column;
    }
    input.form-control {
        width: 100% !important;
    }

    @keyframes fadeMenu {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
