/* css/home.css */

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    /* Full viewport height */
    color: var(--white);
    position: relative;
    padding: 0 20px;

    /* You will replace this with an actual image in your assets folder */
    background-image: url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

/* Dark overlay for text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    /* To be on top of the overlay */
    z-index: 1;

    /* Simple fade-in animation */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}


/* --- Animation Keyframes --- */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- New Section: Property Categories --- */
.property-categories {
    padding: 5rem 0;
    background-color: var(--light-gray);
    /* A subtle background difference */
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--light-text);
    margin-top: -1rem;
    /* Pull it closer to the title */
    margin-bottom: 3rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* This is the key: 4 equal columns */
    gap: 1.5rem;
}

.category-card {
    position: relative;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default; 
}

/* For mobile screens, we stack the cards vertically */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 2rem;
    }
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    /* Smooth zoom on hover */
}

.category-card:hover img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* Darker overlay */
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Hidden by default */
    transition: background-color 0.3s ease, opacity 0.4s ease;
}

.category-card:hover .card-overlay {
    opacity: 1;
    /* Visible on hover */
    background-color: rgba(46, 204, 113, 0.85);
    /* Green overlay on hover */
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    transform: translateY(20px);
    /* Initial position for animation */
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover .category-icon {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
    /* Slight delay for icon animation */
}

.card-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover .card-overlay h3 {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.2s;
}

.card-overlay p {
    font-size: 1rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover .card-overlay p {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-text);
}

.section-title span {
    color: var(--primary-green);
}


/* --- New Section: Home About Us --- */
.home-about {
    padding: 5rem 0;
    background-color: var(--white);
}

.home-about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Two columns, image and content */
    align-items: center;
    gap: 3rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-content .section-title {
    text-align: left; /* Align title to the left for this section */
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.about-strengths {
    list-style: none;
    margin-bottom: 2rem;
}

.about-strengths li {
    color: var(--dark-text);
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.about-strengths .fa-check-circle {
    color: var(--primary-green);
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Responsive adjustments for the about section */
@media (max-width: 992px) {
    .home-about-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }

    .about-content .section-title {
        text-align: center; /* Center title when stacked */
    }

    .about-image {
        margin-bottom: 2rem;
    }
}


/* --- New Section: Client Logos --- */
.client-logos {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.client-logos .section-title {
    margin-bottom: 3rem;
}

.logos-slider {
    position: relative;
    width: 100%;
    overflow: hidden; /* This hides the overflowing logos */
}

/* This adds a transparent fade effect on the left and right edges */
.logos-slider::before,
.logos-slider::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}
.logos-slider::before {
    left: 0;
    background: linear-gradient(to left, rgba(249, 249, 249, 0), var(--light-gray));
}
.logos-slider::after {
    right: 0;
    background: linear-gradient(to right, rgba(249, 249, 249, 0), var(--light-gray));
}

.logos-track {
    display: flex;
    /* We have 8 logos, duplicated. So 16 total. Each takes ~200px width */
    width: calc(200px * 16); 
    animation: scroll 30s linear infinite;
}

/* Pause animation on hover for better UX */
.logos-slider:hover .logos-track {
    animation-play-state: paused;
}

/* The scrolling animation keyframes */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move the track to the left by the width of the first set of logos (8 * 200px) */
        transform: translateX(calc(-200px * 8));
    }
}

.logos-track img {
    height: 50px; /* Uniform height for all logos */
    width: 200px; /* Uniform width and spacing */
    padding: 0 40px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.logos-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
}


/* --- New Section: Home Gallery --- */
.home-gallery {
    padding: 5rem 0;
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px; /* Define a standard row height */
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Create the asymmetrical layout */
.gallery-item.item-1 {
    grid-column: span 2;
    grid-row: span 2;
}
.gallery-item.item-4 {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 204, 113, 0.7);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Responsive adjustments for the gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        grid-auto-rows: 250px;
    }
    /* Reset all spans for single column layout */
    .gallery-item.item-1,
    .gallery-item.item-4 {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 992px) {
    /* Make the property categories 2 columns on tablets */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Reduce font size in hero section for mobile */
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1rem;
    }

    /* Reduce fade effect width on client logo slider */
    .logos-slider::before,
    .logos-slider::after {
        width: 50px;
    }
}