/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html, body {
    max-width: 100%;
    overflow-x: hidden; 
}

body {
    background: rgba(255,255,255,0.82);
    color: #222;
    line-height: 1.7;
}

/* ================= HERO ================= */
.hero { 
    position: relative;
    height: 90vh; 
    background: url("../images/rmgc-office.png") center/cover no-repeat;
    display: flex; 
    align-items: center; 
    padding: 0 80px; 
} 
.hero-overlay {
    position: absolute; 
    inset: 0; 
    background: rgba(27, 52, 92, 0.753);
} 
.hero-content { 
    position: relative;
    max-width: 650px;
    color: #fff; 
} 
.hero-content h1 { 
    font-size: 58px; 
    font-weight: 700;
    margin-bottom: 30px; 
}
.hero-content h1 span { 
    font-weight: 200; 
    color: #aec7f0; 
} 
.hero-buttons { 
    display: flex; 
    gap: 18px; 
} 
.btn-primary { 
    background: #f6f7f89f; 
    border: 2px solid #1b345c; 
    color: #1b345c; 
    padding: 14px 32px; 
    text-decoration: none; 
    font-weight: 320; 
    border-radius: 25px;
    transition: all 0.3s ease; 
}
.btn-primary:hover {
    background: #0e1827;
    color: #fff;
}

@media screen and (max-width: 768px) {
     .hero { 
        padding: 0 30px; 
        height: 60vh; } 
     .hero-content h1 { 
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 20px; } 
     .hero-content p { 
        font-size: 16px; 
        margin: 12px 0 20px; } 
     .hero-buttons { 
        flex-direction: row; 
        gap: 12px; } 
     .btn-primary { 
        padding: 10px 24px; 
        font-size: 14px; } 
      }

/* ================= INTRO ================= */
.intro {
    background: #fff;
    padding: 90px 60px;
    text-align: center;
}
.intro h2 {
    font-size: 40px;
    color: #1b345c;
    margin-bottom: 18px;
}
.intro p {
    max-width: 750px;
    margin: auto;
    font-size: 20px;
}
.link-more {
    display: inline-block;
    margin-top: 22px;
    color: #1b345c;
    font-weight: 600;
    text-decoration: none;
}
@media screen and (max-width: 768px) {

    .intro {
        padding: 60px 20px;
    }

    .intro h2 {
        font-size: 28px;       
        line-height: 1.2;   
    }

    .intro p {
        font-size: 16px;     
        max-width: 100%;       
    }

    .link-more {
        font-size: 14px;      
        margin-top: 16px;
    }
}

/* ================= FILIALES ================= */
.filiales {
    background: #e2ebf321; 
    padding: 100px 60px;
    text-align: center;
}
.filiales h2 {
    font-size: 42px;
    margin-bottom: 60px;
    color: #1b345c;
    font-weight: 700;
}
.filiales-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px; 
}
.filiales-logos a {
    display: block;
    width: 130px;   
    height: 130px;
    border-radius: 50%; 
    overflow: hidden;
    background: #ffffff; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.247);
    transition: transform 0.5s, box-shadow 0.5s;

    opacity: 0;
    transform: scale(0.5); /* تبدأ صغيرة */
    transition: all 0.6s ease-out;
}
.filiales-logos a.show {
    opacity: 1;
    transform: scale(1); 
}
.filiales-logos a img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: transform 0.5s;
}
.filiales-logos a:hover {
    transform: scale(1.1); 
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}
@media screen and (max-width: 768px) {

    .filiales {
        padding: 60px 20px; 
    }

    .filiales h2 {
        font-size: 28px;    
        line-height: 1.2;     
        margin-bottom: 40px;
    }

    .filiales-logos {
        gap:15px;            
    }

    .filiales-logos a {
        width: 40%;        
        height: auto;         
        aspect-ratio: 1 / 1;  
    }

    .filiales-logos a img {
        width: 80%;           
        height: 80%;
    }
}

/* ================= STATS ================= */
.stats {
    background: #1b345c;
    color: #ffffff;
    padding: 60px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    text-align: center;
    gap: 30px;
}
.stat h3 {
    font-size: 60px; 
    color: #ffffff; 
    margin-bottom: 10px;
}
.stat p {
    font-size: 25px; 
    margin: 0;
    color: #ffffff;
}
@media screen and (max-width: 768px) {
    .stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr); 
        gap: 15px;
        padding: 40px 20px;
        text-align: center;
    }

    .stats .stat {
        min-width: auto;
    }

    .stat h3 {
        font-size: 36px;
    }

    .stat p {
        font-size: 14px;
    }
}

/* ================= NEWS ================= */
.news {
    padding: 90px 60px;
}
.news h2 {
    text-align: center;
    font-size: 34px;
    margin-bottom: 50px;
    color: #1b345c;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}
.news article {
    border: 1px solid #e6e6e6;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    background: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    cursor: pointer;
}
.news article:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.news article img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f9f9f9;
}
.news article h4 {
    font-size: 16px;
    margin: 10px 15px 5px;
    color: #1b345c;
}
.news article p {
    font-size: 14px;
    margin: 0 15px 10px;
    color: #555;
    line-height: 1.4;
}
.news article span {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}
.news-more {
    text-align: center;
    margin-top: 40px;
}
.link-more {
    text-decoration: none;
    font-weight: 600;
    color: #1b345c;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.link-more i {
    display: inline-block;
    animation: moveArrow 0.4s infinite alternate;
}
@keyframes moveArrow {
    0%   { transform: translateX(0); }
    100% { transform: translateX(8px); } 
}
@media screen and (max-width: 768px) {

    .news {
        padding: 40px 20px; 
    }

    .news h2 {
        font-size: 26px; 
        text-align: center;
    }

    .news-grid {
        grid-template-columns: 1fr; 
        gap: 20px; 
    }

    .news article {
        padding: 15px 10px; 
        box-shadow: 0 6px 15px rgba(0,0,0,0.08); 
    }

    .news article img {
        height: 120px; 
        object-fit: contain;
        margin-bottom: 10px;
    }

    .news article h4 {
        font-size: 16px;
        margin: 8px 0 5px;
    }

    .news article p {
        font-size: 13px; 
        line-height: 1.4;
    }

    .news article span {
        font-size: 12px; 
        margin-bottom: 10px;
    }

    .news-more a {
        font-size: 16px;
    }
}



#backToTop {
    position: fixed;
    bottom: 20px;
    right: 40px;
    background-color: #1b345c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: visible; 
    position: fixed;
}
#backToTop i {
    position: relative;
    z-index: 2;
}
#backToTop .ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #0e1827;
    border-radius: 50%;
    animation: ripple-animation 1.5s infinite;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.5;
}
@keyframes ripple-animation {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.6;
    }
}
#backToTop:hover {
    background-color: #c3c5c7;
}

