/* --- GLOBAL LAYOUT --- */
body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #333;
}

/* Container for the main grid rows */
#FirstLine, #SecondLine {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 30px; /* Space between the blocks */
    max-width: 1400px; /* Prevent it from getting too wide on huge screens */
    margin: 0 auto 50px auto; /* Centered, with bottom spacing */
    padding: 0 40px; /* Side padding */
}

/* --- BLOCK STYLING --- */
.block {
    background-color: #f9f9f9; /* Light grey background */
    border-radius: 30px;       /* Modern rounded corners */
    padding: 60px;             /* Spacious internal padding */
    display: flex;
    flex-direction: column;
    justify-content: center;   /* Center content vertically */
    align-items: flex-start;   /* Align text to the left */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Soft shadow */
    min-height: 400px;         /* Ensure blocks have substance */
    position: relative;
    overflow: hidden;
}

/* --- SPECIFIC BLOCKS --- */

/* Hero Text Block */
#block1 {
    font-size: 3em;
    font-weight: bold;
    line-height: 1.2;
    color: #222;
}

/* Slider Block (Remove padding so image hits edge) */
#block2 {
    padding: 0; 
    background-color: #000; /* Dark background behind slides */
}

/* Catering Block */
#block3 {
    background-color: #fff4e6; /* Slight warm tone for food/catering */
    font-size: 2em;
    font-weight: bold;
}

/* Platforms Block (Where to order) */
#block4 {
    align-items: center; /* Center buttons */
    justify-content: space-evenly; /* Spread them out */
    flex-direction: row; /* Horizontal list of buttons */
    flex-wrap: wrap;
    gap: 20px;
}

/* Platform Logo Buttons */
.PlatformsLogo {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.2s;
    background-color: #fff; /* Fallback */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.PlatformsLogo:hover {
    transform: scale(1.1); /* Pop effect */
}

/* Add your logos via CSS (or keep using your JS if preferred) */
#ChatFood { background-image: url('../icons/chatfood-icon.png'); } /* Update paths! */
#Talabat { background-image: url('../icons/talabat-icon.png'); }
#Noon { background-image: url('../icons/noon-icon.png'); }


/* --- NEWSLETTER SECTION --- */
#NewsletterContainer {
    background-color: #222; /* Dark section */
    color: white;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

#Newsletter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    gap: 50px;
}

#NewsletterText h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

#NewsletterText p {
    margin: 0;
    opacity: 0.8;
}

#NewsletterInputContainer form {
    display: flex;
    gap: 10px;
}

#EmailInput {
    padding: 15px 20px;
    border-radius: 50px;
    border: none;
    width: 300px;
    font-size: 16px;
}

#NewsletterInputButton {
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    background-color: #fff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

#NewsletterInputButton:hover {
    opacity: 0.8;
}

/* --- ARROW CIRCLE (Keep your existing element styled) --- */
.circle {
    margin-top: 30px;
    width: 50px;
    height: 50px;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.arrow {
    border: solid black;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Container adjustments */
.slider-container {
    position: relative; /* Needed so images stick to this block */
    padding: 0;         /* Remove padding so images touch edges */
    overflow: hidden;   /* Hide anything that spills out */
    background-color: #000; /* Background color while loading */
}

/* The Images (Slides) */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Prevents stretching/zooming issues */
    
    /* The Magic: Smooth Fade Transition */
    opacity: 0; 
    transition: opacity 1.5s ease-in-out; 
    z-index: 1;
}

/* The Active Slide (Visible) */
.slide.active {
    opacity: 1;
    z-index: 2; /* Sits on top */
}

/* --- UPGRADED HERO TEXT BLOCK --- */

#block1 {
    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 60px; /* Spacious padding */
    background-color: #fdfdfd; /* Very subtle off-white for warmth */
    position: relative;
    border-radius: 30px; /* Keeps your rounded look */
}

.hero-content {
    max-width: 550px; /* Prevents text from stretching too wide to read */
}

/* 1. The Eyebrow (Brand Tagline) */
.eyebrow {
    display: block;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px; /* Spaced out letters look expensive */
    font-weight: bold;
    color: #8c8c8c; /* Muted grey */
    margin-bottom: 15px;
}

/* 2. The Headline */
#block1 h1 {
    font-size: 4rem; /* Massive size */
    font-weight: 800; /* Extra Bold */
    line-height: 1.05; /* Tighter spacing for impact */
    color: #111;
    margin: 0 0 25px 0;
    letter-spacing: -1px; /* Slightly tighter letters for modern look */
}

/* 3. The Body Text */
#block1 p {
    font-size: 1.15rem;
    line-height: 1.7; /* Easy to read */
    color: #555;
    margin-bottom: 40px;
}

#block1 p strong {
    color: #000; /* Highlights key items like Baguettes/Croissants */
    font-weight: 600;
}

/* 4. Buttons (Refined) */
.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Safe for mobile */
}

.btn-primary {
    background-color: #000;
    color: #fff;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Subtle lift */
}

.btn-primary:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: transparent;
    color: #111;
    padding: 16px 38px; /* Slightly smaller to match height of primary */
    border: 2px solid #e0e0e0; /* Light border initially */
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #000; /* Darken border on hover */
    background-color: #fff;
}

/* --- RESPONSIVE LAYOUT (Tablets & Mobile) --- */
/* This triggers when screen is smaller than 900px */
@media (max-width: 900px) {
    
    /* 1. Stack the grid blocks vertically */
    #FirstLine, #SecondLine {
        grid-template-columns: 1fr; /* Switch to 1 column */
        gap: 20px;      /* Smaller gap between blocks */
        padding: 0 20px; /* Less side padding on mobile */
    }

    /* 2. Adjust Block sizing for mobile */
    .block {
        min-height: auto; /* Let content dictate height, don't force huge empty space */
        padding: 40px 30px; /* Slightly smaller internal padding */
    }

    /* 3. Ensure the Slider (#block2) keeps its shape */
    #block2 {
        min-height: 400px; /* Force the image slider to stay tall */
        width: 100%;       /* Ensure full width */
    }

    /* 4. Center text in the Hero block */
    #block1 {
        align-items: center;
        text-align: center;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    /* 5. Center the buttons in Hero block */
    .hero-buttons {
        justify-content: center;
    }

    /* 6. Fix "Box 3" and "Box 4" font sizes for mobile */
    #block3 {
        font-size: 1.5em; /* Slightly smaller text */
        text-align: center;
    }
    
    #block4 {
        padding: 40px 20px; /* Ensure buttons have room */
    }
}

