﻿/* --- Global Reset & Fonts --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Open Sans', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- DESIGN TOKENS --- */
:root {
    --primary-navy: #0f253b; /* Square Realty Primary */
    --accent-gold: #cda434; /* Square Realty Accent */
    --bg-light-primary: #ffffff; /* White background for the main Gallery grid */
    --bg-light-secondary: #f8f9fa; /* Light grey background for the Services section */
    --bg-light: #f5f7fa; /* General site background */
    --text-muted: #7f8c8d;
    --shadow-base: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-light);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- 1. HERO SECTION STYLING (The Navy Block) --- */
.page-header {
    background-color: var(--primary-navy);
    padding: 80px 0;
    color: white;
    text-align: center;
}

    .page-header h1 {
        font-size: 2.8rem;
        margin-bottom: 10px;
        color: white; /* Important override */
        font-weight: 700;
    }

    .page-header .subtitle {
        color: var(--accent-gold);
        font-size: 1.2rem;
        max-width: 800px;
        margin: 0 auto;
    }

/* --- 2. GALLERY CONTENT SECTION STYLING (The White Block) --- */
#gallery-content-section {
    padding-top: 50px;
    padding-bottom: 50px;
    background-color: var(--bg-light-primary); /* Clear separation from header/body */
}

/* --- Headings --- */
h1 {
    /* Retained standard h1 style for internal headings */
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-navy);
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Tabs Styling --- */
.tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 10px;
    /* Removed margin-top: 30px; from previous step as it's now internal padding */
}

.tab {
    padding: 12px 24px;
    margin: 0 5px 10px;
    background: none;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

    .tab:hover {
        background-color: #e9ecef;
        color: var(--primary-navy); /* Navy on hover */
    }

    .tab.active {
        background-color: var(--accent-gold); /* Gold for Active State */
        color: var(--primary-navy); /* Navy text on Gold background */
        font-weight: 700;
        box-shadow: 0 4px 10px rgba(205, 164, 52, 0.4); /* Richer, subtle gold shadow */
    }

/* --- Gallery Grid Layout --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
    border: 1px solid #f0f0f0;
}

    .gallery-item:hover {
        transform: translateY(-8px); /* Deeper lift on hover */
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); /* Stronger shadow */
    }

    .gallery-item img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.08); /* More pronounced zoom */
    }

.item-info {
    padding: 15px;
    background-color: white;
}

    .item-info h3 {
        font-size: 1.2rem;
        margin-bottom: 5px;
        color: var(--primary-navy); /* Navy text */
        font-weight: 600;
    }

    .item-info p {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

/* --- Animations --- */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* --- 3. SERVICES SECTION STYLING (The Light Gray Block) --- */
#services-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--bg-light-secondary); /* Clear separation from the Gallery */
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease; /* Modified to match the gallery hover */
    border-bottom: 4px solid transparent;
    height: 100%;
    text-align: center;
}

    .service-card:hover {
        transform: translateY(-8px); /* Consistent lift with gallery items */
        border-bottom: 4px solid var(--accent-gold);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

.service-icon {
    font-size: 30px;
    color: var(--primary-navy);
    background-color: rgba(205, 164, 52, 0.1); /* Light gold wash */
    padding: 15px;
    border-radius: 50%;
    margin-bottom: 15px;
    display: inline-block;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
