* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --san-juan: #455669;
    --midnight-navy: #0A192F;
    --paper-white: #F5F5F0;
    --gold: #c9a961;
    --gold-hover: #D4A574;
    --text-dark: #1A1A1B;
    --text-gray: #6B6B6B;
    --border-gray: #D0D0D0;
    --light-grey: #E8E8E8;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--paper-white);
}

/* Header */
header {
    background: var(--midnight-navy);
    padding: 1.25rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.header-nav {
    display: flex;
    gap: 3rem;
}

.header-nav a {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    cursor: pointer;
}

.header-nav a:hover {
    color: var(--gold);
}

/* Hero Section with Commercial Glass Towers Background */
.hero {
    background: 
        linear-gradient(rgba(10, 25, 47, 0.4), rgba(10, 25, 47, 0.4)),
        url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: multiply;
    padding: 10rem 4rem 12rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.4);
    z-index: 1;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Dual CTAs */
.hero-ctas {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 5rem;
    flex-wrap: wrap;
}

.cta-primary {
    padding: 1.2rem 3rem;
    background: var(--gold);
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    border: none;
}

.cta-primary:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

.cta-secondary {
    padding: 1.2rem 3rem;
    background: transparent;
    color: white;
    border: 2px solid var(--gold);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.cta-secondary:hover {
    background: var(--gold);
    color: white;
}

/* Slim Frosted Glass Search Bar - 20% Reduced Height */
.search-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1.2rem 1.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    margin-bottom: 1.2rem;
    text-align: left;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-field select {
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.search-field select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.2);
}

.search-field select option {
    background: var(--midnight-navy);
    color: white;
}

.search-button {
    grid-column: span 4;
    padding: 0.85rem;
    background: var(--gold);
    color: white;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--gold-hover);
}

/* WhatsApp Floating Icon */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-button svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.whatsapp-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    min-width: 250px;
    display: none;
}

.whatsapp-menu.active {
    display: block;
}

.whatsapp-menu-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.whatsapp-option {
    display: block;
    padding: 0.8rem;
    background: var(--paper-white);
    color: var(--text-dark);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.whatsapp-option:hover {
    background: var(--gold);
    color: white;
}

/* The Difference Section */
.difference-section {
    background: var(--paper-white);
    padding: 6rem 4rem;
    text-align: center;
}

.difference-content {
    max-width: 900px;
    margin: 0 auto;
}

.difference-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.difference-body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.8;
    font-weight: 300;
}

/* Leadership Section with Hidden Numbers */
.leadership-section {
    background: white;
    padding: 6rem 4rem;
}

.leadership-content {
    max-width: 1400px;
    margin: 0 auto;
}

.leadership-header {
    text-align: center;
    margin-bottom: 4rem;
}

.leadership-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.leadership-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: var(--text-gray);
    font-weight: 300;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.partner-card {
    background: var(--paper-white);
    border: 1px solid var(--border-gray);
    padding: 3rem 2rem;
    text-align: center;
}

.partner-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.partner-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.partner-connect-btn {
    padding: 1rem 2.5rem;
    background: var(--gold);
    color: white;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.partner-connect-btn:hover {
    background: var(--gold-hover);
}

.partner-selector {
    margin-top: 1.5rem;
    display: none;
}

.partner-selector.active {
    display: block;
}

.partner-selector select {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--border-gray);
    background: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.partner-call-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--gold);
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.partner-call-btn:hover {
    background: var(--gold-hover);
}

/* Coverage Section */
.coverage-section {
    background: var(--paper-white);
    padding: 6rem 4rem;
}

.coverage-content {
    max-width: 1600px;
    margin: 0 auto;
}

.coverage-header {
    text-align: center;
    margin-bottom: 5rem;
}

.coverage-category {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.coverage-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.coverage-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: var(--text-gray);
    font-weight: 300;
}

.market-category {
    margin-bottom: 5rem;
}

.category-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gold);
}

.category-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.location-card {
    background: white;
    border: 1px solid var(--border-gray);
    padding: 2rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.location-card:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.15);
}

.location-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.location-edge-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: block;
}

.location-edge-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.location-cta {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background: var(--gold);
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.location-cta:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

/* Lead Capture */
.lead-capture-section {
    background: var(--san-juan);
    padding: 6rem 4rem;
}

.lead-capture-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.lead-capture-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: white;
    margin-bottom: 1rem;
}

.lead-capture-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    font-weight: 300;
}

.lead-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-field label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-field input,
.form-field textarea {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

.form-field.full-width {
    grid-column: span 2;
}

.form-submit {
    grid-column: span 2;
    padding: 1.2rem;
    background: var(--gold);
    color: white;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.3s;
}

.form-submit:hover {
    background: var(--gold-hover);
}

/* Legal & Compliance Footer */
footer {
    background: var(--light-grey);
    padding: 4rem 4rem 2rem;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.footer-column p,
.footer-column a {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-column a:hover {
    color: var(--gold);
}

.rera-text {
    font-weight: 600;
    color: var(--text-dark);
}

.brokerage-highlight {
    color: var(--gold);
    font-weight: 600;
}

.disclaimer-box {
    background: white;
    border: 1px solid var(--border-gray);
    padding: 1rem;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-gray);
}

.footer-disclaimer-full {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gray);
}

.disclaimer-scroll-box {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    padding: 1rem;
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.625rem;
    line-height: 1.6;
    color: var(--text-gray);
    text-align: left;
}

.disclaimer-scroll-box::-webkit-scrollbar {
    width: 6px;
}

.disclaimer-scroll-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.disclaimer-scroll-box::-webkit-scrollbar-thumb {
    background: #c9a961;
    border-radius: 3px;
}

.disclaimer-scroll-box::-webkit-scrollbar-thumb:hover {
    background: #b8984e;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-gray);
}

.footer-copyright {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 300;
}

/* Responsive */
@media (max-width: 1200px) {
    .locations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-button {
        grid-column: span 2;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    .lead-form {
        grid-template-columns: 1fr;
    }
    
    .form-field.full-width,
    .form-submit {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-nav {
        gap: 1.5rem;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 5rem 1.5rem 7rem;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-ctas {
        flex-direction: column;
    }
    
    .search-bar {
        padding: 1.2rem 1.5rem;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .search-button {
        grid-column: span 1;
    }
    
    .locations-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
}

/* == Search Bar ==*/

.search-section {
    padding: 60px 20px;
    text-align: center;
    background: var(--san-juan);
}

.search-content {
    max-width: 600px;
    margin: 0 auto;
}

.search-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 8px;
    color: white;
}

.search-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 28px;
    opacity: 0.6;
    color: white;
}

.search-wrapper {
    position: relative;
}

.location-search-input {
    width: 100%;
    padding: 14px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    outline: none;
    box-sizing: border-box;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    border-top: none;
    background: #fff;
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Montserrat', sans-serif;
}

.search-result-item:hover {
    background: #f8f8f8;
}

.result-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.result-category {
    font-size: 0.75rem;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

.search-no-result {
    padding: 14px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* == Property Listing == */

.gallery-section {
  padding: 3rem 1.5rem;
}

.gallery-section h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

/* --- Gallery Grid Layout --- */
.gallery-grid {
    display: grid;
    /* auto-fill stops a single card from stretching across the screen */
    /* 320px gives the card enough width to comfortably display the price and text */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem; 
    padding-top: 1rem;
}

/* --- The Card --- */
.gallery-card {
    margin: 0;
    background: #fff;
    border-radius: 12px; /* Sharper, more corporate corners */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* --- Image & Badges --- */
.gallery-image-wrap {
    aspect-ratio: 16 / 10; /* A wider aspect ratio looks better for offices/land */
    width: 100%;
    overflow: hidden;
    background: #f8f8f8;
    position: relative; /* Anchors the badges */
}

.gallery-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image-wrap img {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

.gallery-badges {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.badge {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* --- Card Typography & Data --- */
.gallery-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1; /* Pushes the delete button to the bottom if descriptions vary in length */
}

.gallery-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

.gallery-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
    /* This neat trick limits the description to exactly 2 lines and adds '...' if it's too long */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Admin Controls --- */
.gallery-delete-btn {
    margin-top: auto; /* Always sits at the very bottom of the card */
    background: #fff;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-delete-btn:hover {
    background: #d32f2f;
    color: #fff;
}

.gallery-caption {
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Container for the whole filter bar */
.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

/* Each group (Type, Transaction, Budget) becomes a dropdown-style container */
.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    height: 46px; 
    position: relative;
    background: transparent !important; /* Forces background to disappear */
    border: none !important;
    overflow: visible !important; /* Allows the buttons to spill out */
    z-index: 100;
}

.filter-group:hover::before {
    height: auto; 
    bottom: -10px; /* This makes the white box wrap all buttons */
    border-color: #000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    bottom: -250px; /* Adjust this value based on how many buttons you have */
}

.filter-group:hover {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

/* Heading for the dropdown (The "Active" button acts as the header) */
.gallery-filter-btn {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-top: none; /* Prevents double borders when stacked */
    padding: 12px 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    cursor: pointer;
    color: #666;
    width: 100%;
    margin: 0;
    transition: background 0.2s, color 0.2s;
    display: none; /* Hide all by default */
}

/* Hide all buttons by default except the active one */
.gallery-filter-btn:not(.active) {
    display: none;
}

/* Modern hover effect for the options */
.gallery-filter-btn:not(.active):hover {
    background: #000 !important;
    color: #fff !important;
}

/* When you hover over the group, show all the other options */
.filter-group:hover .gallery-filter-btn {
    display: block;
    border-radius: 0; /* Square edges while the list is open */
}

/* Styling for the currently active/selected item */
.gallery-filter-btn.active {
    display: flex; 
    justify-content: space-between;
    align-items: center;
    color: #000;
    font-weight: 600;
    border-top: 1px solid #dcdcdc; /* Add top border back */
    border-radius: 4px; /* Rounded corners when closed */
    order: -1; /* This forces the active button to always jump to the top */
}

/* Add a tiny arrow icon to the active button to show it's a dropdown */
.gallery-filter-btn.active::after {
    content: '▼';
    font-size: 8px;
    margin-left: 10px;
    color: #999;
}

/* Hover effect on individual buttons inside the dropdown */
.gallery-filter-btn:hover {
    background: #000 !important;
    color: #fff !important;
}

/* Ensure the active one stays looking like a header when hovering */
.filter-group:hover .gallery-filter-btn.active {
    display: flex;
    border-radius: 4px 4px 0 0;
}

/* Fix rounding for the very first and last buttons in the list on hover */
.filter-group:hover .gallery-filter-btn:first-child {
    border-radius: 4px 4px 0 0;
}
.filter-group:hover .gallery-filter-btn:last-child {
    border-radius: 0 0 4px 4px;
}

/* Responsive fix for mobile */
@media (max-width: 768px) {
    .filter-group {
        width: 100%;
    }
}

/* Container for the search bar and filters */
.search-wrapper {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    gap: 10px;
    max-width: 1100px;
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative; /* Keep dropdown anchored here */
}

/* The text input - grows to take available space */
.location-search-input {
    flex: 2;
    min-width: 200px;
    border: none;
    padding: 12px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    outline: none;
    border-right: 1px solid #eee;
}

/* The dropdown selects */
.property-type-select {
    flex: 1;
    min-width: 150px;
    border: none;
    background: #fff;
    padding: 12px 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    appearance: none; /* Removes default browser arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

/* Add vertical dividers between selects */
.property-type-select:not(:last-of-type) {
    border-right: 1px solid #eee;
}

/* Search Results Dropdown Styling */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none; /* Managed by your script's .active class */
}

.search-results-dropdown.active {
    display: block;
}

/* Individual Result Items */
.search-result-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f0f7ff;
}

.result-name {
    font-weight: 600;
    font-size: 14px;
}

.result-category {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-wrapper {
        flex-direction: column;
        padding: 5px;
    }
    
    .location-search-input, 
    .property-type-select {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .property-type-select:last-of-type {
        border-bottom: none;
    }
}

.market-search-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.market-search-btn:hover {
    background: #333;
}

/* Ensure the button looks good on mobile */
@media (max-width: 768px) {
    .market-search-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        padding: 15px;
    }
}