/*
 * Theme Name: Astra Child Real Estate
 * Template: astra
 * Version: 1.0.0
 * Description: Custom styles for Real Estate Project template.
 */

/* Import Font Awesome for icons */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

/* Define CSS variables - ***** ADJUST THESE VALUES BASED ON YOUR LIVE SITE MEASUREMENTS ***** */
:root {
    --astra-header-height: XXXpx; /* <--- REPLACE THIS WITH YOUR ACTUAL MEASURED ASTRA HEADER HEIGHT (e.g., 80px) */
    --sticky-nav-height: YYYpx; /* <--- REPLACE THIS WITH YOUR ACTUAL MEASURED PROJECT NAVIGATION HEIGHT (e.g., 60px) */
    --scroll-offset: calc(var(--astra-header-height) + var(--sticky-nav-height) + 20px); /* Header + Nav + an extra 20px buffer for padding */
}

/* --- General Typography & Base Styling --- */
body {
    font-family: 'Inter', sans-serif; /* Or any elegant font */
    color: #333;
    line-height: 1.6;
    margin: 0; /* Ensure no default body margin */
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif; /* Consistent heading font */
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

/* Ensure the hero section starts directly below the fixed Astra header */
.real-estate-hero-section {
    margin-top: var(--astra-header-height); /* Pushes the hero down by the header's height */
    position: relative; /* Ensure it stays in normal flow for its children */
    z-index: 1; /* Ensure it's above other content if necessary */
    width: 100%;
    height: 650px; /* Adjust height as needed */
    overflow: hidden;
    margin-bottom: 50px;
    border-radius: 0;
    box-shadow: none;
}

/* For anchor links to land below BOTH the sticky Astra header AND the project navigation */
html {
    scroll-padding-top: var(--scroll-offset); /* This is the main fix for jump links */
    scroll-behavior: smooth; /* Optional: for smoother transitions on anchor clicks */
}

/* Astra Specific Overrides to ensure full width */
/* These target Astra's main content wrappers to allow your sections to go full width */
.ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#content { /* Main content area ID in Astra */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.site-content { /* Class often found on content wrapper in Astra */
    padding-top: 0;
    padding-bottom: 0;
}

.entry-content.clear {
    width: 100%; /* Ensure the main content area is full width */
    max-width: 100%;
    padding: 0; /* Remove default padding here to allow children to control it */
}


/* --- Global Section Styling --- */
.real-estate-page-content-wrapper {
    max-width: 1200px; /* Limits the content width of inner sections */
    margin: 40px auto;
    padding: 0 20px;
}

.real-estate-section {
    scroll-margin-top: var(--scroll-offset); /* This ensures sections are visible below sticky nav */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 50px;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0; /* Initial state for animation */
}

.real-estate-section h2 {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.real-estate-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #e74c3c, #f39c12);
    border-radius: 2px;
}

/* --- Hero Section --- */
.project-hero-gallery {
    display: flex; /* For basic image display */
    width: 100%;
    height: 100%;
    /* No absolute positioning here, the parent .real-estate-hero-section handles it */
}

.project-hero-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    filter: brightness(0.7);
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.project-hero-gallery.placeholder {
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
}
.project-hero-gallery.placeholder img {
    filter: none;
    object-fit: contain;
    width: 80%;
    height: 80%;
}


.project-details-overlay {
    position: absolute; /* Keep overlay absolute relative to .real-estate-hero-section */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    padding: 20px;
}

.overlay-content-wrapper {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

.project-details-overlay .entry-title {
    font-size: 3.8em;
    font-weight: 800;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

.key-info-cards {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 20px 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 180px;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.info-card .info-icon {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 2em;
    color: #f39c12;
    margin-bottom: 8px;
    display: block;
}

.info-card p {
    font-size: 0.85em;
    margin-bottom: 3px;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-card h4 {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.hero-ctas {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-cta {
    background: linear-gradient(to right, #f39c12, #e74c3c);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.primary-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.6);
    filter: brightness(1.05);
}

.secondary-cta {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.secondary-cta:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* --- Project Navigation (Sticky) --- */
.project-navigation {
    background-color: #2c3e50;
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #3a536b;
    position: sticky;
    top: var(--astra-header-height); /* Make it sticky below the header */
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.project-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.project-navigation li {
    margin: 0 15px;
}

.project-navigation a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1em;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-navigation a:hover {
    background-color: #e74c3c;
    color: #ffffff;
}

/* --- Main Sections Container (for content sections) --- */
.main-sections-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
}

/* --- About Project Section --- */
.about-project-section .about-content {
    font-size: 1.1em;
    line-height: 1.8;
}

.about-project-section .about-content p {
    margin-bottom: 1em;
    color: #555;
}

.about-project-section h4 {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
}

.project-highlights-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.project-highlights-list li {
    background-color: #f0f4f7;
    padding: 12px 20px;
    border-left: 4px solid #f39c12;
    border-radius: 5px;
    font-size: 0.95em;
    color: #444;
    display: flex;
    align-items: center;
}

.project-highlights-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #28a745;
    margin-right: 10px;
}

.project-meta-details {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    font-size: 0.95em;
}

.project-meta-details p {
    margin: 0;
    color: #555;
}

.project-meta-details strong {
    color: #2c3e50;
    font-weight: 700;
}

/* --- Amenities Section --- */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.amenity-item {
    background-color: #f4f7f9;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.amenity-item:hover {
    transform: translateY(-8px);
    background-color: #e8f0f5;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.amenity-item .amenity-icon {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 2.5em;
    color: #e74c3c;
    margin-bottom: 10px;
    display: block;
}

.amenity-item p {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

/* --- Pricing Table Section --- */
.pricing-table-container {
    overflow-x: auto;
}

.pricing-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fcfcfc;
    border-radius: 10px;
    overflow: hidden;
}

.pricing-section th, .pricing-section td {
    padding: 18px 25px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 1em;
}

.pricing-section thead th {
    background-color: #2c3e50;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-section tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

.pricing-section tbody tr:hover {
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.pricing-section .price-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(to right, #f39c12, #e74c3c);
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4);
}

.pricing-section .price-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.6);
    filter: brightness(1.1);
}

.pricing-note {
    font-size: 0.9em;
    color: #777;
    text-align: center;
    margin-top: 20px;
}

/* --- Floor Plan & Main Gallery Sections (relying on WordPress native gallery block) --- */
.floor-plan-section .section-description,
.main-gallery-section .section-description {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-bottom: 30px;
}

/* Styles for WordPress native Gallery block within these sections */
.real-estate-section .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.real-estate-section .gallery-item {
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.real-estate-section .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.real-estate-section .gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.real-estate-section .gallery-caption {
    padding: 10px 15px;
    font-size: 0.9em;
    color: #555;
    font-style: italic;
}


/* --- Location Map Section --- */
.location-map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 450px;
    width: 100%;
    margin-top: 20px;
}

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

/* --- Related Projects Section --- */
.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.related-project-card {
    background-color: #fefefe;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.related-project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.related-project-card .card-content {
    padding: 15px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-project-card h3 {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.related-project-card h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.related-project-card h3 a:hover {
    color: #e74c3c;
}

.related-project-card p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 8px;
}

.related-project-card p span {
    font-weight: 600;
    color: #2c3e50;
}

.related-project-card .view-project-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    margin-top: auto;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.related-project-card .view-project-button:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

/* --- Contact Section --- */
.contact-section .contact-content {
    text-align: center;
    padding: 20px;
}

.contact-section p {
    font-size: 1.1em;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-section .contact-direct-button {
    background: linear-gradient(to right, #28a745, #218838);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    margin-top: 15px;
}

.contact-section .contact-direct-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
    filter: brightness(1.05);
}


/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .real-estate-hero-section {
        height: 550px;
    }
    .project-details-overlay .entry-title {
        font-size: 3em;
    }
    .key-info-cards {
        gap: 15px;
    }
    .info-card {
        padding: 15px 20px;
        min-width: unset;
        width: calc(33.33% - 15px); /* Three columns on smaller desktops/large tablets */
    }
    .real-estate-section {
        padding: 30px;
    }
    .real-estate-section h2 {
        font-size: 2em;
    }
    .project-navigation li {
        margin: 0 10px;
    }
    .project-highlights-list {
        grid-template-columns: 1fr;
    }
    .project-meta-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .real-estate-hero-section {
        height: 450px;
    }
    .project-details-overlay .entry-title {
        font-size: 2.5em;
    }
    .key-info-cards {
        flex-direction: column;
        gap: 15px;
    }
    .info-card {
        width: 100%;
        padding: 15px 20px;
    }
    .hero-ctas {
        flex-direction: column;
        gap: 15px;
    }
    .cta-button {
        width: 100%;
        text-align: center;
    }
    .project-navigation {
        padding: 10px 0;
    }
    .project-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    .real-estate-section {
        padding: 20px;
    }
    .real-estate-section h2 {
        font-size: 1.8em;
    }
    .amenities-grid, .gallery, .related-projects-grid { /* Target WordPress native gallery class 'gallery' */
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    .pricing-section th, .pricing-section td {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .real-estate-section .gallery-item img, .related-project-card img { /* Target img inside gallery-item */
        height: 180px;
    }
    .location-map-container {
        height: 300px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Apply animation delays to sections for staggered loading */
.real-estate-page-content-wrapper .real-estate-section:nth-child(1) { animation-delay: 0.2s; }
.real-estate-page-content-wrapper .real-estate-section:nth-child(2) { animation-delay: 0.4s; }
.real-estate-page-content-wrapper .real-estate-section:nth-child(3) { animation-delay: 0.6s; }
.real-estate-page-content-wrapper .real-estate-section:nth-child(4) { animation-delay: 0.8s; }
.real-estate-page-content-wrapper .real-estate-section:nth-child(5) { animation-delay: 1.0s; }
.real-estate-page-content-wrapper .real-estate-section:nth-child(6) { animation-delay: 1.2s; }
.real-estate-page-content-wrapper .real-estate-section:nth-child(7) { animation-delay: 1.4s; }
