/**
 * Valentia Inmobiliaria - Main Stylesheet
 * Custom Premium Design System - V2 (Idealista Features & Media Slider)
 */

/* ==========================================================================
   0. DESIGN TOKENS (CSS VARIABLES)
   ========================================================================== */
:root {
    /* Color Palette */
    --color-primary: #111111;         /* Rich Deep Charcoal */
    --color-primary-light: #222222;
    --color-accent: #b89f74;          /* Elegant Warm Gold/Beige */
    --color-accent-hover: #9c845b;
    --color-bg: #fafafa;              /* Soft Off-White */
    --color-bg-card: #ffffff;
    --color-bg-light: #f5f5f3;        /* Warm light grey */
    --color-border: #e6e6e2;
    --color-border-light: #f0f0ed;
    --color-text: #2c2c2a;            /* Dark readable charcoal */
    --color-text-muted: #757570;
    --color-white: #ffffff;
    
    /* Transaction Tags */
    --color-tag-venta: #111111;       
    --color-tag-alquiler: #b89f74;    
    
    /* Utility Colors */
    --color-whatsapp: #0dc143;
    --color-whatsapp-hover: #0b9e37;
    --color-success: #2e7d32;
    --color-error: #d32f2f;
    --color-discount: #e04f5f;        /* Idealista red price drop tag */

    /* Typography */
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Layout & Spacing */
    --container-width: 1240px;
    --header-height: 80px;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
    
    /* Shadows */
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   1. BASE STYLES & RESET
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--color-primary);
    font-weight: 600;
    line-height: 1.25;
}

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

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

ul, ol {
    list-style: none;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.container, .section-container, .header-container, .footer-container, .directory-container, .sheet-container, .page-container, .blog-container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.bg-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   2. BUTTONS & UI COMPONENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    font-size: 15px;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent);
}

.btn-secondary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-accent-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: var(--color-white);
}

.btn-whatsapp:hover {
    background-color: var(--color-whatsapp-hover);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
}

.icon-svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    vertical-align: middle;
}

/* Floating WhatsApp Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-whatsapp);
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(13, 193, 67, 0.4);
    z-index: 999;
    transition: var(--transition-smooth);
}

.whatsapp-float-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--color-whatsapp-hover);
}

.whatsapp-float-btn .icon-whatsapp {
    width: 32px;
    height: 32px;
}

/* Section Headers */
.section-header {
    max-width: 650px;
    margin-bottom: 50px;
}

.section-tag {
    font-family: var(--font-headings);
    color: var(--color-accent);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.15em;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 17px;
}

/* ==========================================================================
   3. SITE HEADER (NAVIGATION)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    height: 70px;
}

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

/* Logo */
.site-logo {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-headings);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    line-height: 1;
}

.logo-sub {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.32em;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.site-header.scrolled .logo-main {
    color: var(--color-primary);
}

/* Nav Menu */
.site-navigation {
    display: flex;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary-light);
    letter-spacing: 0.03em;
    padding: 8px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--color-accent);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-header-phone {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 18px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.site-header.scrolled .btn-header-phone {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-header-phone:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.site-header.scrolled .btn-header-phone:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-fast);
}

/* Mobile Drawer */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-bg-card);
    z-index: 2000;
    box-shadow: var(--shadow-large);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border-light);
}

.drawer-close {
    font-size: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
}

.drawer-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-nav-list li {
    margin-bottom: 20px;
}

.mobile-nav-list a {
    font-size: 18px;
    font-weight: 500;
    font-family: var(--font-headings);
    display: block;
    padding: 8px 0;
}

.mobile-nav-list a:hover {
    color: var(--color-accent);
}

.drawer-footer {
    border-top: 1px solid var(--color-border-light);
    padding-top: 24px;
}

.drawer-footer p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.drawer-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   4. HERO & SEARCH BOX (FRONT PAGE)
   ========================================================================== */
.hero-section {
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
    position: relative;
}

.hero-content {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    color: var(--color-white);
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    max-width: 700px;
    color: var(--color-white);
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 20px;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-search-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-large);
    max-width: 900px;
    color: var(--color-text);
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 16px;
    align-items: flex-end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.search-field select, .search-field input {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background-color: var(--color-white);
    width: 100%;
    outline: none;
    transition: var(--transition-fast);
}

.search-field select:focus, .search-field input:focus {
    border-color: var(--color-accent);
}

.search-submit .btn {
    padding: 13px 28px;
    height: 48px;
}

/* ==========================================================================
   5. PROPERTY CARDS GRID
   ========================================================================== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.property-card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

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

.property-card-image {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.property-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.property-card:hover .property-card-image::after {
    opacity: 1;
}

.property-image-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Overlay container for Tags & Labels (Idealista style) */
.property-card-tags-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.property-tag {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    color: var(--color-white);
}

.tag-venta {
    background-color: var(--color-primary);
}

.tag-alquiler {
    background-color: var(--color-accent);
}

/* Idealista Label Badges */
.labels-container-idealista {
    display: flex;
    gap: 6px;
}

.badge-label {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    color: var(--color-white);
}

.label-nuevo {
    background-color: #2e7d32; /* Rich emerald green */
}

.label-oportunidad {
    background-color: #ef6c00; /* Warm dark amber */
}

.label-rebajado {
    background-color: var(--color-discount); /* Red discount */
}

.label-reservado {
    background-color: #616161; /* Charcoal */
}

/* Card Content Details */
.property-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Idealista price comparison container */
.price-container-idealista {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.price-current {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.price-previous {
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: line-through;
    font-weight: 400;
}

.price-drop-badge {
    background-color: rgba(224, 79, 95, 0.1);
    color: var(--color-discount);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.property-price {
    margin-bottom: 8px;
}

.property-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.35;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.property-title a:hover {
    color: var(--color-accent);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.property-location .icon-svg {
    stroke: var(--color-accent);
    flex-shrink: 0;
}

/* Attributes bar */
.property-meta {
    display: flex;
    border-top: 1px solid var(--color-border-light);
    padding-top: 16px;
    margin-top: auto;
    justify-content: space-between;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.meta-item .icon-svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-accent);
}

.no-properties {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

/* ==========================================================================
   6. SERVICES SECTION (HOME PAGE)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--color-bg-card);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-subtle);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--color-accent);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-bg-light);
    color: var(--color-accent);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition-fast);
}

.service-card:hover .service-icon {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.service-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.service-text {
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   7. CONTACT SECTION & FORMS
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 60px;
    align-items: start;
}

.contact-info-panel {
    padding-right: 20px;
}

.contact-panel-title {
    font-size: 40px;
    margin-bottom: 16px;
}

.contact-panel-desc {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.method-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.method-icon {
    width: 44px;
    height: 44px;
    background-color: var(--color-bg-light);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-details h4 {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.method-details a, .method-details span {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    display: block;
}

.method-details .phones-list a {
    display: inline-block;
    margin-right: 15px;
}

.method-details a:hover {
    color: var(--color-accent);
}

/* Form Panel */
.contact-form-panel {
    background-color: var(--color-bg-card);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border-light);
}

.form-panel-title {
    font-size: 24px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input, .form-group textarea {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    outline: none;
    transition: var(--transition-fast);
    background-color: var(--color-bg);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-accent);
    background-color: var(--color-white);
}

.form-group textarea {
    height: 120px;
    resize: none;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.alert-danger {
    background-color: rgba(198, 40, 40, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(198, 40, 40, 0.2);
}

/* ==========================================================================
   8. ARCHIVE / DIRECTORY FILTERS & LAYOUT
   ========================================================================== */
.archive-hero {
    padding: 120px 24px 60px;
    text-align: center;
}

.archive-hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.archive-tag {
    font-size: 13px;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

.archive-title {
    font-size: 44px;
    color: var(--color-white);
    margin-top: 10px;
    margin-bottom: 16px;
}

.archive-desc {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    font-weight: 300;
}

/* Directory Layout */
.archive-directory-section {
    padding-top: 50px;
}

.directory-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar filter */
.directory-filters {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 90px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.filters-header h3 {
    font-size: 18px;
}

.btn-reset-filters {
    font-size: 13px;
    color: var(--color-accent);
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-reset-filters:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    outline: none;
    background-color: var(--color-bg);
}

.filter-input:focus {
    border-color: var(--color-accent);
}

.filter-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Content Area Header */
.directory-content-area {
    display: flex;
    flex-direction: column;
}

.directory-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border-light);
}

.results-counter {
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 15px;
}

.results-counter span {
    color: var(--color-primary);
    font-weight: 700;
}

.mobile-filter-trigger-wrapper {
    display: none;
}

.directory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.no-results-message {
    text-align: center;
    padding: 60px 40px;
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.no-results-message h3 {
    font-size: 22px;
    color: var(--color-primary);
}

.no-results-message svg {
    stroke: var(--color-accent);
}

.filterable-property-card {
    transition: transform 0.35s ease, opacity 0.3s ease, box-shadow 0.35s ease;
}

.filterable-property-card.filter-hide {
    opacity: 0;
    transform: scale(0.9);
    position: absolute;
    pointer-events: none;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
}

/* ==========================================================================
   9. INTERACTIVE GALLERY SLIDER (CPT SINGLE PAGE)
   ========================================================================== */
.property-slider-section {
    position: relative;
    height: 65vh;
    min-height: 480px;
    overflow: hidden;
    background-color: var(--color-primary);
}

.property-gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.property-slider-overlay-content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
    pointer-events: none; /* Let clicks pass to arrow buttons if overlapping */
}

.property-slider-overlay-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    color: var(--color-white);
    pointer-events: auto; /* Re-enable clicks for links inside overlay */
}

.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

.property-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.tag-operacion {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    color: var(--color-white);
}

.tag-tipo {
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    color: var(--color-white);
}

.property-main-title {
    font-size: 48px;
    color: var(--color-white);
    margin-bottom: 10px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 900px;
}

.property-price-wrapper {
    margin-top: 10px;
}

.property-price-wrapper .price-current {
    font-size: 36px;
    color: var(--color-white);
}

.property-price-wrapper .price-previous {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

.property-price-wrapper .price-drop-badge {
    background-color: var(--color-discount);
    color: var(--color-white);
    font-size: 13px;
    padding: 4px 10px;
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}

.slider-arrow:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.05);
}

.slider-prev {
    left: 30px;
}

.slider-next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.slider-dot.active {
    background-color: var(--color-white);
    transform: scale(1.25);
}

/* ==========================================================================
   10. SINGLE PAGE SHEET LAYOUT & MEDIA EMBEDS
   ========================================================================== */
.property-sheet-section {
    padding-top: 60px;
}

.sheet-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 50px;
    align-items: start;
}

/* Specs ribbon */
.property-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
    background-color: var(--color-bg-card);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--color-border-light);
    margin-bottom: 40px;
}

.spec-grid-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.spec-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
}

.spec-value .icon-svg {
    stroke: var(--color-accent);
}

.energy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
}

.energy-a { background-color: #2e7d32; }
.energy-b { background-color: #4caf50; }
.energy-c { background-color: #8bc34a; }
.energy-d { background-color: #fbc02d; }
.energy-e { background-color: #ff9800; }
.energy-f { background-color: #ff5722; }
.energy-g { background-color: #d84315; }

/* Property Info Panels */
.property-description, .property-features, .property-virtual-tour-section, .property-floor-plan-section {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-subtle);
    margin-bottom: 40px;
}

.property-description h2, .property-features h2, .property-virtual-tour-section h2, .property-floor-plan-section h2 {
    font-size: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 12px;
    font-family: var(--font-headings);
}

.description-content p {
    margin-bottom: 16px;
    color: #4a4a46;
    line-height: 1.7;
}

/* Features checklist */
.features-checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.features-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.check-icon {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 14px;
}

/* Visita Virtual 3D Iframe wrapper */
.virtual-tour-iframe-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-subtle);
}

.virtual-tour-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Plano floor plan styling */
.section-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-top: -16px;
    margin-bottom: 20px;
}

.floor-plan-wrapper {
    border: 1px solid var(--color-border);
    padding: 20px;
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.floor-plan-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.floor-plan-img:hover {
    transform: scale(1.03);
    cursor: zoom-in;
}

/* Sticky Sidebar Sheet */
.property-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-contact-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-medium);
}

.sidebar-contact-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.sidebar-contact-card p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.sidebar-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.sidebar-form-separator {
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
    line-height: 0.1em;
    margin: 20px 0 24px;
}

.sidebar-form-separator span {
    background: var(--color-bg-card);
    padding: 0 10px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.sidebar-contact-form input, .sidebar-contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    outline: none;
    margin-bottom: 12px;
    background-color: var(--color-bg);
}

.sidebar-contact-form input:focus, .sidebar-contact-form textarea:focus {
    border-color: var(--color-accent);
    background-color: var(--color-white);
}

.sidebar-contact-form textarea {
    height: 90px;
    resize: none;
}

/* ==========================================================================
   11. GENERAL PAGES & FALLBACKS
   ========================================================================== */
.static-page-section, .index-blog-section {
    padding-top: calc(var(--header-height) + 40px);
}

.page-container, .blog-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-title, .page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 40px;
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-post-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-content-wrap {
    padding: 30px;
}

.post-date {
    font-size: 13px;
    color: var(--color-accent);
    margin-bottom: 8px;
    display: block;
}

.post-excerpt {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.read-more-link {
    font-weight: 600;
    color: var(--color-primary);
}

.read-more-link:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   12. SITE FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--color-primary);
    color: #a8a8a4;
    font-size: 14px;
    border-top: 1px solid var(--color-primary-light);
}

.footer-widgets {
    padding-top: 80px;
    padding-bottom: 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
    gap: 40px;
}

.footer-logo .logo-main {
    color: var(--color-white);
}

.brand-desc {
    margin-top: 20px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.tag-accent {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.widget-title {
    color: var(--color-white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.contact-details li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.contact-details .icon-svg {
    stroke: var(--color-accent);
    margin-top: 3px;
    flex-shrink: 0;
}

.contact-details a:hover {
    color: var(--color-accent);
}

.phones-list a {
    display: block;
    margin-bottom: 4px;
}

.hours-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.hours-list .days {
    color: var(--color-white);
    font-weight: 500;
}

.hours-list .closed {
    color: #ff6b6b;
}

.footer-bottom {
    border-top: 1px solid var(--color-primary-light);
    padding: 30px 0;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.copyright {
    font-size: 13px;
}

.design-credit {
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 500;
}

/* ==========================================================================
   13. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 40px;
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .directory-container {
        grid-template-columns: 1fr;
    }
    
    .directory-filters {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        z-index: 1500;
        overflow-y: auto;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-radius: 0;
    }
    
    .directory-filters.open {
        left: 0;
    }
    
    .mobile-filter-trigger-wrapper {
        display: block;
    }
    
    .directory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sheet-container {
        grid-template-columns: 1fr;
    }
    
    .property-sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .slider-prev {
        left: 15px;
    }
    
    .slider-next {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .site-navigation {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .btn-header-phone {
        display: none;
    }
    
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .hero-search-box {
        padding: 16px;
    }
    
    .search-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .search-submit {
        margin-top: 10px;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
    }
    
    .features-checklist {
        grid-template-columns: 1fr;
    }
    
    .property-main-title {
        font-size: 30px;
    }
    
    .property-main-price {
        font-size: 26px;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .property-slider-section {
        height: 50vh;
        min-height: 350px;
    }
}
