/* =========================================
   1. General Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Gray background for the "outside" of the page */
body {
    background-color: #f0f0f0; 
    line-height: 1.6;
    overflow-x: hidden;
}

/* Main content wrapper (The "Box") */
.main-wrapper {
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    min-height: 100vh;
}

/* =========================================
   2. Top Ribbon Header
   ========================================= */
.top-ribbon {
    background-color: #333;
    color: white;
    padding: 10px 0;
    font-size: 14px;
    width: 100%;
}

.top-ribbon .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.contact-info {
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: #ff4d4d; /* Red phone icon */
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #1a237e; /* Dark blue on hover */
}

/* =========================================
   3. Logo & Side Images Section
   ========================================= */
.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 40px 20px 0px 20px; 
}

.centered-logo {
    max-width: 350px;
    height: auto;
}

.side-img {
    max-width: 200px;
    height: auto;
    margin-top: 60px; /* Sits slightly lower than logo */
}

.sub-logo-image {
    display: flex;
    justify-content: center;
    padding: 5px 20px 10px 20px; 
}

.bottom-img {
    max-width: 300px; /* 3.png size */
    width: 100%;
    height: auto;
}

/* =========================================
   4. Branding & Arabic Titles
   ========================================= */
.branding-section {
    text-align: center;
    padding: 10px 20px 60px 20px;
    direction: rtl; /* Proper Arabic alignment */
}

.main-title {
    font-size: 3rem;
    color: #1a237e;
    font-weight: 700;
}

.title-separator {
    width: 200px;
    height: 4px;
    background-color: #ff4d4d;
    border: none;
    margin: 20px auto;
}

.sub-title-container {
    display: inline-block;
    border-bottom: 5px solid #ff4d4d; /* Red line from start of text to end */
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.sub-title {
    font-size: 4rem; /* Big title increased by 100% */
    color: #333;
    font-weight: 800;
}

.service-desc {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a237e;
    margin: 10px 0;
}

.equipment-title {
    font-size: 2.2rem;
    color: #1a237e;
    font-weight: 700;
    margin: 30px 0;
}

.previous-work-title {
    font-size: 3rem;
    color: #1a237e;
    font-weight: 700;
    margin-top: 40px;
}

.small-info {
    margin: 25px 0;
    font-size: 1.15rem;
    color: #555;
    font-weight: 500;
}

/* =========================================
   5. General Image & Line Styling
   ========================================= */
.mid-page-img {
    max-width: 1000px; /* 4.png increased by 100% */
    width: 95%;
    height: auto;
    display: block;
    margin: 40px auto;
}

.large-img-plus {
    max-width: 1100px; /* 5.png increased by 100% */
    width: 98%;
    height: auto;
    display: block;
    margin: 50px auto;
}

.normal-img {
    max-width: 100%; /* 6.png standard size */
    height: auto;
    display: block;
    margin: 30px auto;
}

.black-separator {
    width: 80%;
    height: 2px;
    background-color: #000;
    border: none;
    margin: 30px auto;
}

.thick-black-separator {
    width: 90%;
    height: 6px; 
    background-color: #000;
    border: none;
    margin: 40px auto;
}

/* =========================================
   6. Grid Layouts
   ========================================= */

/* Top Grid (2x3) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 40px auto;
    max-width: 1000px;
    padding: 0 20px;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Gallery Grid (7x4 - 13.png to 38.png) */
.large-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1; /* Square uniform size */
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 4px;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* =========================================
   7. Lightbox Functionality
   ========================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border: 3px solid white;
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
}

/* Mirroring the top ribbon style for the footer */
.bottom-ribbon {
    background-color: #333;
    color: white;
    padding: 15px 0;
    font-size: 14px;
    width: 100%;
    margin-top: 20px;
}

.bottom-ribbon .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.bottom-ribbon .contact-info i {
    margin-right: 10px;
    color: #ff4d4d;
}

/* =========================================
   8. Responsiveness
   ========================================= */
@media (max-width: 992px) {
    .image-grid { grid-template-columns: repeat(2, 1fr); }
    .large-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .top-ribbon .container { flex-direction: column; gap: 10px; }
    .logo-wrapper { flex-direction: column; padding: 20px; }
    .side-img { margin-top: 0; max-width: 150px; order: 2; }
    .centered-logo { order: 1; margin-bottom: 20px; }

    .main-title { font-size: 2rem; }
    .sub-title { font-size: 2.2rem; }
    .service-desc { font-size: 1.3rem; }
    .equipment-title { font-size: 1.4rem; }
    .previous-work-title { font-size: 2rem; }
    
    .image-grid { grid-template-columns: 1fr; }
    .large-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}