/* --- 1. COLOR VARIABLES & BASE STYLES --- */
:root {
    --primary-blue: #004a8c;    /* Deep, professional blue */
    --secondary-orange: #ff9900; /* Bright, attractive orange for CTAs */
    --light-bg: #f7f7f7;        /* Light background for contrast */
    --text-color: #333333;
    --white: #ffffff;
}

/* Base and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

/* Reusable CTA Button Style */
.cta-button {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white) !important;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #003366;
}

/* --- 2. HEADER / NAVIGATION --- */
header {
    background: var(--primary-blue);
    color: var(--white);
    /* ADJUSTED: Reduced vertical padding to make the header box height smaller */
    padding: 10px 5%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; 
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* NEW LOGO STYLING: Handles the image */
.logo {
    /* Set container size to make the logo significantly larger */
    width: auto !important; 
    height: 90px !important;
    display: flex;
    align-items: center; 
    flex-direction: row; 
    padding: 0;
}

.logo img {
    /* Force the image to fit the container */
    width: auto !important;
    max-width: 90% !important;
    height: 250% !important;
    object-fit: contain !important; /* Ensures the whole logo is visible */
    
    /* Keep the filter for visibility against the dark header */
    filter: brightness(0) invert(1); 
}
/* END NEW LOGO STYLING */

nav ul {
    list-style: none;
    display: flex;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    padding: 0 15px;
    transition: color 0.3s;
    text-align: center; /* Center align nav text */
    line-height: 1.2;
}

nav ul li a:hover {
    color: var(--secondary-orange);
}

/* --- 3. HERO SECTION (Rotating Background) --- */
#hero {
    position: relative; /* Base for absolute slideshow */
    color: var(--white);
    text-align: center;
    padding: 150px 5%; 
    overflow: hidden; 
}

/* The element that holds the rotating background images */
#slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Dark overlay for text readability over bright images */
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.75); 
    
    /* NEW: This adds a 1.5-second fade effect between images */
    transition: background-image 1.5s ease-in-out;
}

/* Ensures the text content sits above the background */
.hero-content {
    position: relative;
    z-index: 10; 
    max-width: 800px;
    margin: 0 auto;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.emergency-tag {
    color: var(--secondary-orange);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.4;
}

.sub-headline {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* Large Call to Action Button */
.cta-button-lg {
    display: inline-block;
    background: var(--secondary-orange);
    color: var(--white);
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.6rem;
    font-weight: 700;
    transition: background-color 0.3s;
    margin-bottom: 20px;
    line-height: 1.3;
}

.cta-button-lg:hover {
    background-color: #e58800;
}

/* Trust Icons under CTA */
.trust-icons {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #eeeeee;
}

.trust-icons span {
    margin: 0 15px;
}

/* --- 4. TRUST BAR --- */
#trust-bar {
    background: var(--primary-blue);
    color: var(--secondary-orange);
    display: flex;
    justify-content: space-around;
    padding: 15px 5%;
    font-weight: bold;
    font-size: 1.1rem;
    flex-wrap: wrap;
    text-align: center;
}

.trust-item {
    margin: 5px 0;
}

/* --- 5. SERVICES PREVIEW (Grid) --- */
#services-preview {
    padding: 60px 5%;
    text-align: center;
    background: var(--white); 
}

#services-preview h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.service-intro {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

/* This is the card from the old 3-column flex layout */
.card {
    width: 300px; 
    background: var(--white);
    border-radius: 10px; 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); 
    overflow: hidden; 
    transition: transform 0.3s;
    text-align: left;
}

.card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 100%;
    height: 180px; 
    object-fit: cover; 
    display: block;
}

.card-text-content {
    padding: 15px;
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

.card-link {
    display: block;
    background: var(--secondary-orange);
    color: var(--white) !important;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.card-link:hover {
    background-color: #e58800;
}


/* --- 6. TESTIMONIALS SECTION (Rotating Reviews) --- */
#testimonials {
    background: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 50px 10%;
    margin-top: 50px;
}

#testimonials h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Slider Container */
#review-slider {
    position: relative; /* Base for absolute positioning of boxes */
    max-width: 700px;
    height: 220px; /* Increased height for bilingual reviews */
    margin: 0 auto 30px;
}

/* Individual Review Boxes (Stacked) */
.testimonial-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    
    padding: 20px;
    text-align: left; /* Align text inside the box */
    font-style: italic;
    background: var(--primary-blue); /* Same background color */
    
    border-left: 8px solid var(--secondary-orange); /* The orange bar */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 0 5px 5px 0; /* Only right corners are rounded */
    
    opacity: 0; /* CRITICAL: Start all reviews invisible */
    animation: review-fade 18s infinite; /* 18s total duration, 3 reviews = 6s each */
}

.review-text {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.author {
    margin-top: 10px;
    font-weight: bold;
    text-align: right; /* Align author name to the right */
    font-style: normal;
}

/* Apply staggered animation delay to each review box */
.testimonial-box:nth-child(1) {
    animation-delay: 0s;
}

.testimonial-box:nth-child(2) {
    animation-delay: 6s; /* Starts 6 seconds after the first one */
}

.testimonial-box:nth-child(3) {
    animation-delay: 12s; /* Starts 12 seconds after the first one */
}


/* KEYFRAMES: The animation to fade the reviews in and out */
@keyframes review-fade {
    /* 18s duration / 3 reviews = 6s per review */
    
    /* Show review for 5s (0% to 27.7%) */
    0% { opacity: 0; }
    5% { opacity: 1; }  /* Fade in quickly */
    27.7% { opacity: 1; } /* Hold */
    
    /* Fade out and remain hidden for the rest of the cycle (27.7% to 100%) */
    30% { opacity: 0; } 
    100% { opacity: 0; } 
}

/* --- 7. FOOTER --- */
footer {
    background: #222;
    color: #ccc;
    padding: 20px 5%;
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: var(--secondary-orange);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- 8. DROPDOWN NAVIGATION --- */
nav ul li {
    position: relative; /* Required for the dropdown to position correctly */
}

/* Style for the dropdown container (hidden by default) */
.dropdown-content {
    display: none; 
    position: absolute;
    top: 100%; /* Position it right below the parent link */
    left: 0;
    background-color: var(--primary-blue);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001; /* Make sure it's above other content */
    text-align: left; /* Align dropdown text to the left */
}

/* Links inside the dropdown */
.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.3;
}

/* Dropdown link hover effect */
.dropdown-content a:hover {
    background-color: #003366;
    color: var(--secondary-orange);
}

/* Show the dropdown when hovering over the .dropdown list item */
li.dropdown:hover .dropdown-content {
    display: block;
}

/* Optional: Keep the main "Services" link highlighted */
li.dropdown:hover > a {
    color: var(--secondary-orange);
}

/* --- 9. ARABIC STYLING --- */

/* Base class for Arabic text */
.arabic-text {
    display: block;
    direction: rtl; /* Set text direction to Right-to-Left */
    font-size: 0.8em;
    line-height: 1.1;
    color: #ccc; /* Default light color for dark backgrounds */
}

/* Specific adjustments */
.logo .arabic-text {
    font-size: 0.7em;
    font-weight: normal;
}

nav .arabic-text {
    font-size: 0.75em;
    font-weight: normal;
}

.dropdown-content .arabic-text {
    color: #ddd;
}

h1 .arabic-text,
h2 .arabic-text,
h3 .arabic-text {
    font-size: 0.7em;
    color: #666; /* Color for light backgrounds */
    font-weight: normal;
    margin-top: 5px;
}

.hero-content .arabic-text {
    color: #eee;
    font-size: 1rem;
}

/* Testimonial Arabic text */
.testimonial-box .review-text.arabic-text {
    font-size: 1.05em;
    color: #ddd;
    direction: rtl;
    border-right: 8px solid var(--secondary-orange); /* RTL border */
    border-left: 0;
    padding-right: 15px;
    padding-left: 0;
    margin-top: 15px;
    font-style: normal;
}

.testimonial-box .author .arabic-text {
    font-size: 1em;
    display: inline-block; /* Keep it next to the English name */
    color: #fff;
    font-weight: bold;
}

/* --- 10. LOGO LINK STYLING --- */

/* Makes the logo link inherit text color and remove underline */
a.logo-link {
    color: inherit;
    text-decoration: none;
}

/* --- 11. CONTACT PAGE REVAMP --- */

/* Grid container for Info + Form */
#contact-grid-section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--light-bg);
}

.contact-grid-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Info column, Form column (wider) */
    gap: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Left Column: Contact Info Blocks */
.contact-info-column h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.contact-info-block {
    display: flex;
    align-items: flex-start; /* Align icon with first line of text */
    margin-bottom: 30px;
}

.contact-info-block .contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--secondary-orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 20px;
}

.contact-info-block .contact-text h3 {
    font-size: 1.4rem;
    color: var(--primary-blue);
    margin: 0 0 5px 0;
}

/* Bilingual title in the info block */
.contact-info-block .contact-text h3 .arabic-text {
    display: inline-block;
    direction: rtl;
    font-size: 0.9em;
    font-weight: bold;
    color: var(--primary-blue);
    margin-left: 8px;
}

.contact-info-block .contact-text p {
    margin: 0;
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

.contact-info-block .contact-text a.info-link {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-blue);
    text-decoration: none;
}
.contact-info-block .contact-text a.info-link:hover {
    text-decoration: underline;
}

/* Bilingual address text */
.contact-info-block .contact-text p .arabic-text {
    direction: rtl;
    font-size: 1em;
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
}

/* Right Column: Form */
.form-container {
    padding: 0; /* Padding is now on the grid container */
}

.form-container h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

/* Bilingual form label */
.form-group label .arabic-text {
    display: block;
    direction: rtl;
    font-size: 0.9em;
    color: #555;
    font-weight: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
}

/* Map Section (Full-width below the grid) */
.map-container {
    padding: 60px 5%;
    text-align: center;
    background: var(--white);
    margin-top: 60px;
}

.map-container h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.map-container iframe {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 900px) {
    .contact-grid-container {
        grid-template-columns: 1fr; /* Stack columns */
        padding: 30px;
    }
}


/* --- 12. INTERNAL SERVICE PAGE STYLES --- */

/* Hero section for pages like relocation.html, painting.html, etc. */
.page-hero {
    position: relative;
    padding: 120px 5%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    color: var(--white);
}

/* Dark overlay for readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Re-using .hero-content styles for text */
.page-hero .hero-content {
    position: relative;
    z-index: 2;
}
.page-hero .hero-content h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.page-hero .hero-content p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 10px auto 0;
}


/* Main content area for service pages */
#services-list {
    max-width: 1200px; /* Widened for new grid */
    margin: 60px auto; /* Center the white box */
    padding: 40px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-item {
    margin-bottom: 40px;
}

.service-item h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    
    /* This aligns the English and Arabic titles */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Wraps if on small screen */
}

/* Arabic title styling inside the h2 */
.service-item h2 .arabic-text {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--primary-blue);
    direction: rtl;
    margin: 0;
}

.service-item p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.service-item ul {
    list-style-type: disc;
    padding-left: 20px;
}

.service-item li {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

/* --- 13. RELOCATION PAGE GRID --- */

/* This grid will hold the 2 service columns and the middle quote button */
.services-grid-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Service | Button | Service */
    gap: 30px;
    align-items: start; /* Align tops of the columns */
}

/* This is the new middle block for the button */
.quote-block-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: var(--light-bg);
    border-radius: 10px;
    height: 100%;
    text-align: center;
}

.quote-block-middle i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.quote-block-middle p {
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: bold;
    margin-bottom: 20px;
}

/* Remove bottom margin from service items when in the grid */
.services-grid-container .service-item {
    margin-bottom: 0;
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 900px) {
    .services-grid-container {
        grid-template-columns: 1fr; /* Stack all items */
    }
    
    .quote-block-middle {
        order: 3; /* Move button to the bottom on mobile */
        padding: 20px;
    }

    #services-list {
        max-width: 900px; /* Revert to standard width */
    }
}

/* --- 14. 4-COLUMN CARD GRID (HOMEPAGE) --- */

/* This selector replaces the old .service-cards-grid flex behavior */
#services-preview .service-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
    gap: 30px;
}

/* When in the grid, the card width should be auto */
#services-preview .service-cards-grid .card {
    width: auto; 
}

/* Responsive: 4 columns becomes 2 on tablets */
@media (max-width: 1100px) {
    #services-preview .service-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2 columns becomes 1 on mobile */
@media (max-width: 600px) {
    #services-preview .service-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 15. NEW: TWO CALL BUTTONS --- */

/* Layout for two side-by-side buttons in the hero section */
.cta-button-group {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between buttons */
    margin-top: 20px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

/* Ensure the large button size adapts when placed in a group */
.cta-button-group .cta-button-lg {
    font-size: 1.2rem; /* Reduce size slightly so they fit */
    padding: 10px 20px;
    text-align: center;
    width: 300px; /* Give them a max width for consistent size */
    margin-bottom: 0; /* Remove unnecessary margin */
}

/* Ensure Arabic text wraps correctly */
.cta-button-group .arabic-text {
    font-size: 0.75em;
    font-weight: normal;
    display: block;
    margin-top: 5px;
}