/* ===================================================================
   FILE: styles.css
   PURPOSE: Main stylesheet for the One Roof Egypt website.
   =================================================================== */

/* ===================================
   1. GLOBAL STYLES & FONT IMPORTS
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* --- MAKE TEXT CARET SOLID (STOPS BLINKING) --- */
/* This is a better UX alternative to hiding the caret completely. */
input, 
textarea {
  animation: none; /* Disables the blinking animation */
  caret-color: black; /* Or another visible color like #333 */
}



/*
=====================================================
  1b. Header & Navigation (Improved Visibility)
=====================================================
*/


/*  STICKY NAVBAR STYLES
=====================================================*/

header {
  position: sticky; /* The magic property! */
  top: 0;           /* Stick to the very top of the screen */
  width: 100%;      /* Ensure it spans the full width */
  z-index: 1000;    /* Make sure it stays on top of other content */
}






.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

/* --- Prominent Language Switcher Button --- */
.btn-language {
  background-color: ​#ffd700; /* Your gold accent color */
  color:rgb(200, 200, 207)!important; /* Important to override Bootstrap's default link color */
  border-radius: 30px; /* Pill shape */
border:2px solid #25D366 !important; 
  padding: 0.5rem 1.2rem !important; /* Custom padding */
  font-weight: 600 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.btn-language:hover {
  background-color: #c4a828; /* A slightly darker gold on hover */
  color: #269722 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-language .fa-globe {
  font-size: 1.1rem; /* Control the icon size */
}

/* On smaller screens (when navbar collapses), make the button take full width for better tapping */
@media (max-width: 991px) {
  .nav-item.ms-lg-3 {
    margin-top: 1rem; /* Add some space above the button in the collapsed menu */
  }
  .btn-language {
    width: 100%;
    justify-content: center;
  }
}


/* ===================================
   2. HERO SECTION
   =================================== */
.hero {
    color: white;
    background: url('Resources/imageg.webp') no-repeat fixed top;
    background-size: cover;
    text-align: center;
    padding: 10rem 0;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero .container {
    max-width: 700px;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: 8px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero a.button {
    background: #d5b82c;
    padding: 1rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    color: black;
    font-weight: bold;
    max-width: 13rem;
    align-self: center;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.hero a.button:hover {
    background: #cba91a;
}

/* ===================================
   3. "BUILT TO LAST" SECTION
   =================================== */
.builttolast {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5vw;
    min-height: 85vh;
    padding: 4rem 5vw;
    background-color: white;
    overflow: hidden;
}

.builttolast .image-container {
    flex: 1 1 45%;
    height: 70vh;
}

.builttolast .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.builttolast .imagedesc {
    flex: 1 1 55%;
}

.builttolast .imagedesc h3 {
    font-size: 1.1rem;
    color: #d5b82c;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.builttolast .imagedesc h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.builttolast .imagedesc p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 40ch;
}

.builttolast .imagedesc .button-primary {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.builttolast .imagedesc .button-primary:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

/* ===================================
   4. SERVICES (PRODUCTS) SECTION
   =================================== */
.services .service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.services .card {
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.services .card:hover {
    transform: translateY(-10px);
}

.services .card .image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.services .card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.services .card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Ensures content area fills space */
}

.services .card h3 {
    color: #000000;
}

/* Special styling for the "Contact Us" card */
#h3custom2 {
    color: #008610;
    font-weight: bold;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ===================================
   5. OUR CUSTOMERS LOGO BANNER
   =================================== */
#ourcust {
    padding-top: 5vh;
    padding-bottom: 5vh;
    background-color: #f8f9fa;
}

#ourcust h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 auto 3rem auto;
    padding-bottom: 1rem;
    border-bottom: 0.2rem solid #d5b82c;
    max-width: 25rem;
}

#container {
    height: 20vh;
    position: relative;
    /* THIS IS KEY: 'auto' enables the horizontal scrollbar only when needed. */
    overflow-x: auto; 
    overflow-y: hidden;
    margin: 2rem 0 5rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #888 #e0e0e0;
}

/* Styling for the scrollbar itself */
#container::-webkit-scrollbar {
    height: 0.7rem;
}
#container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 0.625rem;
}
#container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 0.625rem;
}
#container::-webkit-scrollbar-thumb:hover {
    background: #555;
}


/* THIS IS THE MAGIC: When you hover over the container, it pauses the animation */
#container:hover .photobanner {
    animation-play-state: paused;
}

.photobanner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    gap: 4rem;
    align-items: center;
    /* THIS IS KEY: The animation that makes it auto-scroll */
    animation: bannermove 150s linear infinite;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
}

.logo-item a {
    display: flex;
    height: 100%;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo-item a:hover {
    transform: scale(2);
}

.logo-item img {
    height: 10vh;
    width: auto;
    max-width: 12.5rem;
    object-fit: contain;
}

/* The animation definition */
@keyframes bannermove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===================================
   6. CONTACT SECTION
   =================================== */
.contact {
    background: #f8f9fa;
    padding: 5rem 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.contact .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact .contact-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact .contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.contact .contact-details {
    font-style: normal;
    line-height: 1.8;
}

.contact .contact-details div {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.contact .contact-details strong {
    flex-shrink: 0;
    width: 90px;
    color: #333;
}

.contact .contact-details a {
    color: #007bff;
    text-decoration: none;
}
.contact .contact-details a:hover {
    text-decoration: underline;
}

.contact .contact-socials {
    display: flex;
    align-items: center;
    margin-top: 2rem;
    border-top: 2px solid #eee;
    padding-top: 1.5rem;
}

.contact .contact-socials strong {
    width: 90px;
}

.contact .cologo {
    display: flex;
    gap: 1rem;
}

.contact .cologo .fa {
    padding: 0;
    margin: 0;
    font-size: 1.8rem;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    transition: transform 0.2s ease;
}

.contact .cologo .fa-facebook { color: #3B5998; }
.contact .cologo .fa-whatsapp { color: #25D366; }
.contact .cologo .fa:hover {
    transform: scale(1.15);
}

.contact .contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    min-height: 350px;
}

.contact .contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}





/*/* ===================================
   6B. CONTACT FORM SECTION (MORE COMPACT)
   =================================== */

.contact-form-section {
    background: #ecf0f1;
    /* CHANGE: Reduced vertical padding */
    padding: 2rem 0; 
}

.contact-form-section h2 {
    text-align: center;
    /* CHANGE: Reduced font size */
    font-size: clamp(1.6rem, 4vw, 2.2rem); 
    margin-bottom: 0.5rem;
}

.contact-form-section .section-subtitle {
    text-align: center;
    /* CHANGE: Reduced font size and bottom margin */
    font-size: 1rem; 
    color: #666;
    margin-bottom: 2rem; 
}

.contact-form-section .form-container {
    max-width: 750px;
    margin: 0 auto;
    background: white;
    /* CHANGE: Reduced padding inside the form container */
    padding: 1.5rem; 
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softened shadow */
}

/* This is the new grid layout for the side-by-side fields */
.contact-form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Create two equal columns */
    gap: 1rem; /* Space between the columns */
}

.contact-form-section .form-group {
    /* CHANGE: Reduced bottom margin */
    margin-bottom: 0.75rem; 
}

.contact-form-section .form-group label {
    display: block;
    /* CHANGE: Reduced bottom margin */
    margin-bottom: 0.3rem; 
    font-weight: 600;
    color: #333;
    font-size: 0.9rem; /* CHANGE: Slightly smaller label font */
}

.contact-form-section input[type="text"],
.contact-form-section input[type="email"],
.contact-form-section textarea {
    width: 100%;
    /* CHANGE: Reduced padding inside input fields */
    padding: 0.6rem; 
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-section input:focus,
.contact-form-section textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.contact-form-section textarea {
    resize: vertical;
    /* CHANGE: Reduced the default rows to make it shorter initially */
    rows: 4; 
}

.contact-form-section .button-primary {
    display: block;
    width: 100%;
    /* CHANGE: Reduced padding for a shorter button */
    padding: 0.7rem 1.5rem; 
    border: none;
    font-size: 1rem; /* CHANGE: Slightly smaller button text */
    margin-top: 0.75rem; /* CHANGE: Reduced top margin */
}
/* --- Form Submit Button Styling --- */

.contact-form-section .button-primary {
    display: inline-block;
    width: 100%;
    /*Makethebuttonfull-width*/padding: 1rem;
    border: none;
    /*Removedefaultbuttonborder*/border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    /*InitialState:;
    YellowBackground*/background-color: #0061c8;
    color: black;
    /*Smoothtransitionforthecolorflip*/transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}

/* Hover State: Flip to Blue Background */
.contact-form-section .button-primary:hover {
    background-color: #286e2d; /* The blue color */
    color: white; /* White text for contrast */
    transform: translateY(-2px); /* A subtle lift on hover */
}


/* --- Responsive adjustment for the compact form --- */
/* On smaller screens, stack the columns instead of having them side-by-side */
@media (max-width: 768px) {
    .contact-form-section .form-row {
        grid-template-columns: 1fr; /* Switch back to a single column */
    }
}
/* ===================================
   7. FOOTER
   =================================== */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* ===================================
   8. ANIMATIONS
   =================================== */

/* --- Scroll Reveal Animation --- */
.reveal {
    position: relative;
    transform: translateY(100px);
    opacity: 0;
    transition: all 1.5s ease; /* Shortened for a snappier feel */
}

.reveal.active {
    transform: translateY(0px);
    opacity: 1;
}

/* --- JS-Controlled Highlight for Contact Section --- */
.contact .contact-info {
    position: relative;
    z-index: 2;
    background: transparent !important; /* Prepare for pseudo-element background */
    transition: transform 0.3s ease-out, box-shadow 0.5s ease-out;
}

.contact .contact-info::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white; /* Default background */
    border-radius: 8px; /* Match the card's border-radius */
    transition: background-color 0.8s ease-in-out;
    z-index: -1;
}

.contact .contact-info.highlight-active {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 123, 255, 0.5); /* Blue glow */
}

.contact .contact-info.highlight-active::before {
    background-color: #fffde7; /* Creamy yellow highlight */
}

/* ===================================
   9. RESPONSIVE MEDIA QUERIES
   =================================== */

/* --- Screens smaller than 768px (Tablets and Mobiles) --- */
@media (max-width: 768px) {
    /* Built To Last Section */
    .builttolast {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        gap: 2rem;
        padding: 3rem 1rem;
    }
    .builttolast .image-container {
        width: 100%;
        height: 45vh;
        margin-bottom: 1.5rem;
    }
    .builttolast .imagedesc p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Our Customers Section */
    #ourcust {
        padding-top: 3vh;
        padding-bottom: 3vh;
    }
    #container {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
        height: auto;
        padding: 1rem 0;
    }
    .photobanner {
        position: static;
        animation: none;
        transform: none !important;
        justify-content: flex-start;
        padding: 0 1rem;
        gap: 2.5rem;
    }
    .logo-item img {
        height: 6vh;
    }
    #container::-webkit-scrollbar { height: 0.5rem; }
    #container::-webkit-scrollbar-track { background: #e0e0e0; border-radius: 0.625rem; }
    #container::-webkit-scrollbar-thumb { background: #888; border-radius: 0.625rem; }
    #container::-webkit-scrollbar-thumb:hover { background: #555; }

}
/*
=====================================================
  10. FIXES FOR SMALL MOBILE DEVICES (e.g., iPhone)
=====================================================
*/



/* --- Screens larger than 768px (Desktops) --- */
@media (min-width: 768px) {
    /* Contact Section Grid */
    .contact .contact-grid {
        grid-template-columns: 1fr 1fr;
        align-items: stretch; /* Make columns equal height */
    }

/* --- Fix the Map container to maintain aspect ratio --- */
.contact .contact-map {
    position: relative; /* Required for the child iframe */
    padding-top: 75%;   /* This creates a 4:3 aspect ratio. Use 56.25% for 16:9 */
    height: 0;          /* Height is controlled by padding, making it responsive */
    min-height: auto;   /* Override the previous min-height */
}

.contact .contact-map iframe {
    /* Make the iframe fill the container perfectly */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
}


   /* ===================================== */
    /* NEW: FIX FOR CONTACT DETAILS ON MOBILE */
    /* ===================================== */
    .contact .contact-details div {
        display: block; /* Stack the label and the detail vertically */
        margin-bottom: 1.5rem; /* Add more space between stacked items */
    }

    .contact .contact-details strong {
        width: auto; /* Allow the label to take its natural width */
        margin-bottom: 0.25rem; /* Add a little space below the label */
    }

    .contact .contact-socials {
        display: block; /* Also stack the "Follow Us" label */
    }

    .contact .contact-socials strong {
        margin-bottom: 1rem;
    }
    /* --- End of new contact fix --- */




/* --- Media Query for screens smaller than 480px --- */
@media (max-width: 480px) {
    /* Reduce hero section size */
    .hero {
        padding: 6rem 0; /* Reduce vertical padding */
        height: auto;    /* Let height be determined by content */
    }
    .hero h1 {
        font-size: 2.2rem; /* Reduce heading font size */
    }
    .hero p {
        font-size: 1.1rem;
    }

    /* Reduce "Built to Last" section padding */
    .builttolast {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Reduce padding on the language switcher button */
    .btn-language {
        padding: 0.4rem 1rem !important;
    }

    /* =================================== */
    /* NEW: FONT SIZE TWEAK FOR CONTACT   */
    /* =================================== */
    .contact .contact-info h3 {
        font-size: 1.5rem; /* Make the "Get in Touch" heading a bit smaller */
    }
}