/* 
   Duarte Imóveis - Luxury Real Estate Stylesheet
   Designed with a premium, elegant, editorial layout.
*/

/* Google Fonts loaded via <link> in HTML for better performance */

/* --- Design Variables --- */
:root {
    --primary: #94222c;       /* Premium Burgundy / Red Logo color */
    --primary-hover: #b02b37; /* Lighter burgundy for interactive states */
    --dark: #121212;          /* True luxury dark */
    --dark-grey: #1a1a1a;     /* Section grey dark */
    --light-grey: #f4f4f4;    /* Light backgrounds */
    --text-dark: #1c1c1c;     /* Clean dark text */
    --text-muted: #666666;    /* Muted body text */
    --text-light: #ffffff;    /* Light text */
    --gold: #c3a475;          /* Luxury Elite Gold accent */
    --gold-hover: #d2b78b;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 8px;
    --shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 45px rgba(0, 0, 0, 0.12);
}

/* --- Base Reset & Defaults --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4, .serif-font {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Header / Navbar --- */
header {
    background-color: var(--dark-grey);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    height: 90px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

header .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: var(--transition);
}

footer .logo-img {
    height: 60px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    fill: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-brand {
    font-size: 26px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.logo-sub {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background-color: var(--gold);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-dropdown svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
    transition: var(--transition);
}

.nav-dropdown:hover svg {
    transform: rotate(180deg);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 75vh;
    min-height: 550px;
    max-height: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 3;
    pointer-events: none;
}

/* Elegant Hero Background Carousel */
.hero-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Translucent Search Bar Container */
.hero-search-wrapper {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    z-index: 10;
}

.hero-search-bar {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.search-field {
    position: relative;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.search-field:nth-child(3) {
    border-right: none;
}

.search-field label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    font-weight: 500;
}

.search-field select,
.search-field input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
}

.search-field select option {
    background-color: var(--dark-grey);
    color: #ffffff;
    padding: 10px;
}

.search-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-search {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    outline: none;
    border-radius: 40px;
    padding: 16px 36px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-search:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 15px rgba(148, 34, 44, 0.4);
    transform: translateY(-1px);
}

/* --- Section Introduction --- */
.intro-section {
    padding: 80px 0 40px;
    background-color: #ffffff;
}

.intro-section h2 {
    font-size: 42px;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.intro-section p {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 700px;
}

/* --- Destinations Section --- */
.destinations-section {
    padding: 0 0 80px 0;
    background-color: #ffffff;
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.destination-card {
    position: relative;
    height: 480px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.destination-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
    transition: var(--transition);
}

.destination-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.destination-card:hover .destination-img {
    transform: scale(1.08);
}

.destination-card:hover::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.85) 100%);
}

.destination-label {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 3;
    color: var(--text-light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* --- Agent CTA Section (Você é corretor...) --- */
.agent-cta {
    background-color: var(--dark-grey);
    color: var(--text-light);
    padding: 100px 0;
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.agent-cta .container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 80px;
}

.agent-cta h2 {
    font-size: 48px;
    line-height: 1.2;
    max-width: 450px;
}

.agent-cta-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
}

.agent-cta-content p {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.btn-outline {
    display: inline-block;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background-color: transparent;
    color: var(--text-light);
    border-radius: 40px;
    padding: 14px 38px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--dark);
    border-color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* --- Properties Section --- */
.properties-section {
    padding: 100px 0;
    background-color: #fafafa;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.property-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.property-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.property-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.property-card:hover .property-img {
    transform: scale(1.06);
}

/* Ribbon "ELITE" Badge */
.badge-elite {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #c3a475 0%, #aa8b5c 100%);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.badge-elite svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.property-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.property-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.4;
}

.property-location svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

.property-features {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.feature-item svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
}

/* Category Tabs for Properties filtering */
.category-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: #ffffff;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    padding: 10px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.tab-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.tab-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(148, 34, 44, 0.15);
}

/* --- Footer --- */
footer {
    background-color: var(--dark);
    color: var(--text-light);
    padding: 80px 0 50px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo .logo-icon {
    fill: #ffffff;
}

.footer-logo .logo-brand {
    color: #ffffff;
}

.footer-logo .logo-sub {
    color: rgba(255,255,255,0.6);
}

.footer-nav {
    display: flex;
    gap: 40px;
}

.footer-nav a {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-nav a:hover {
    color: #ffffff;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.7);
}

.social-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.social-icon:hover {
    background-color: #ffffff;
    color: var(--dark);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

/* --- Responsive Media Queries --- */

@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .intro-section h2 {
        font-size: 36px;
    }
    
    .destinations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .agent-cta .container {
        gap: 40px;
    }
    
    .agent-cta h2 {
        font-size: 38px;
    }
}

@media (max-width: 900px) {
    header {
        height: 80px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        height: 82vh;
        min-height: 560px;
    }
    
    .hero-search-bar {
        grid-template-columns: 1fr;
        border-radius: 20px;
        padding: 20px;
        gap: 16px;
    }
    
    .search-field {
        border-right: none;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding-bottom: 12px;
    }
    
    .btn-search {
        border-radius: 12px;
        padding: 14px 20px;
    }
    
    .agent-cta .container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .agent-cta h2 {
        margin: 0 auto;
    }
    
    .agent-cta-content {
        align-items: center;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 20px;
    }
    
    .logo-img {
        height: 38px;
    }
    
    .intro-section h2 {
        font-size: 28px;
    }
    
    .destinations-grid {
        grid-template-columns: 1fr;
    }
    
    .destination-card {
        height: 380px;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .agent-cta h2 {
        font-size: 30px;
    }
    
    .footer-top {
        padding-bottom: 30px;
        margin-bottom: 30px;
    }
}

/* --- Hero Content Headline --- */
.hero-content {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 900px;
    pointer-events: none;
    animation: heroFadeIn 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.hero-tagline {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold);
    margin-bottom: 16px;
    display: block;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 72px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    margin: 0;
}

@media (max-width: 900px) {
    .hero-title  { font-size: 44px; }
    .hero-content { top: 28%; }
}

@media (max-width: 600px) {
    .hero-title  { font-size: 32px; }
    .hero-tagline { font-size: 10px; letter-spacing: 3px; }
    .hero-content { top: 24%; }
}

/* --- Burger / Mobile Nav --- */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .burger-btn { display: flex; }
}

/* Mobile overlay backdrop */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Mobile drawer panel */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    background-color: var(--dark-grey);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    padding: 28px 32px 40px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-close-btn {
    align-self: flex-end;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.65);
    padding: 4px;
    margin-bottom: 28px;
    transition: color 0.2s ease;
}
.mobile-close-btn:hover { color: #ffffff; }
.mobile-close-btn svg { width: 22px; height: 22px; display: block; }

.mobile-nav-logo { margin-bottom: 36px; }
.mobile-nav-logo .logo-img { height: 38px; }

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mobile-nav-links li a {
    display: block;
    padding: 16px 0;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.mobile-nav-links li a:hover {
    color: var(--gold);
    padding-left: 8px;
}

.mobile-whatsapp-btn {
    display: block;
    text-align: center;
    background-color: #25d366;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 40px;
    margin-top: 32px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.mobile-whatsapp-btn:hover {
    background-color: #20ba59;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

/* --- Stats Section --- */
.stats-section {
    background-color: var(--dark-grey);
    padding: 70px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 58px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.stat-plus {
    font-size: 38px;
    color: var(--gold);
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 480px) {
    .stat-number { font-size: 44px; }
    .stat-plus { font-size: 30px; }
}

/* --- Card Hover Overlay --- */
.card-view-overlay {
    position: absolute;
    inset: 0;
    background: rgba(148, 34, 44, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.32s ease;
    z-index: 5;
}

.card-view-overlay span {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    padding: 10px 26px;
    border-radius: 40px;
    transform: translateY(8px);
    transition: transform 0.32s ease;
}

.property-card:hover .card-view-overlay { opacity: 1; }
.property-card:hover .card-view-overlay span { transform: translateY(0); }

/* --- Scroll Reveal Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card scroll reveal (managed by JS transition-delay) */
.fade-in-up {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Property Details Page Styles --- */

.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.luxury-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(148, 34, 44, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.navigation-header {
    padding: 30px 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

.property-detail-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 60px;
    padding-bottom: 100px;
    align-items: start;
}

.detail-main-content {
    min-width: 0;
}

/* --- Gallery Styling --- */
.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.gallery-main-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 520px;
    background-color: var(--dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.gallery-main-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(18, 18, 18, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.gallery-arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.gallery-arrow:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(148, 34, 44, 0.4);
}

.gallery-arrow.left {
    left: 20px;
}

.gallery-arrow.right {
    right: 20px;
}

.gallery-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 5px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.thumbnail-item {
    flex: 0 0 100px;
    height: 65px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail-item:hover, .thumbnail-item.active {
    opacity: 1;
    border-color: var(--gold);
}

/* --- Header Info Styling --- */
.detail-info-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge-elite-detail {
    align-self: start;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-elite-detail svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.detail-title {
    font-size: 42px;
    color: var(--text-dark);
    line-height: 1.1;
    font-weight: 600;
}

.detail-price-address {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
}

.detail-address {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 500px;
}

.detail-address svg {
    width: 16px;
    height: 16px;
    fill: var(--primary);
    flex-shrink: 0;
}

.luxury-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.02) 100%);
    margin: 30px 0;
}

/* --- Specs Grid --- */
.detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.spec-card {
    background-color: #fafafa;
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 500;
}

.spec-value-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.spec-value-wrapper svg {
    width: 18px;
    height: 18px;
    fill: var(--gold);
}

/* --- Description --- */
.detail-description h2 {
    font-size: 26px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.description-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 400;
}

.desc-p {
    margin-bottom: 16px;
}

/* --- Sidebar Styling --- */
.detail-sidebar {
    position: sticky;
    top: 130px;
}

.contact-sticky-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-sticky-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.contact-sticky-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.agent-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.agent-info {
    display: flex;
    flex-direction: column;
}

.agent-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.agent-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-whatsapp-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 40px;
    padding: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp-detail:hover {
    background-color: #20ba59;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
    transform: translateY(-2px);
}

.sidebar-alternative-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.phone-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.phone-link:hover {
    color: var(--primary);
}

/* --- Media Queries Property Details --- */
@media (max-width: 1000px) {
    .property-detail-container {
        gap: 30px;
    }
    
    .detail-title {
        font-size: 34px;
    }
}

@media (max-width: 900px) {
    .property-detail-container {
        grid-template-columns: 1fr;
        padding-bottom: 60px;
    }
    
    .detail-sidebar {
        position: static;
        margin-top: 20px;
    }
    
    .detail-price-address {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .detail-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .detail-title {
        font-size: 28px;
    }
    
    .detail-price {
        font-size: 26px;
    }
}
