/* =========================================
   Ethica Brand Theme Variables
   Extiende: theme-night.css
   Solo sobreescribe variables de MARCA.
   Todo lo demás lo hereda del night theme.
   ========================================= */

:root {
    /* ---- Brand Primary (#23b9e5) ---- */
    --primary-rgb: 35, 185, 229;
    --primary: #23b9e5;
    --primary-hover: #1ca5cc;
    /* Reducido para mejor legibilidad */
    --brand-primary: var(--primary);

    /* ---- Brand Secondary (#86c06a) ---- */
    --secondary-rgb: 134, 192, 106;
    --secondary: #86c06a;
    --secondary-hover: #75a85c;
    --brand-accent: var(--secondary);
    --brand-accent-hover: var(--secondary-hover);

    /* ---- Sombras botón (alineadas con el sistema Atlas) ---- */
    --btn-primary-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
    --btn-primary-shadow-hover: 0 6px 18px rgba(var(--primary-rgb), 0.4);

    /* ---- Gradiente títulos — Ethica Gradient ---- */
    --gradient-text-brand: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);

    /* ---- Soft bg & border ---- */
    --bg-soft-primary: rgba(var(--primary-rgb), 0.1);
    --border-highlight: rgba(var(--primary-rgb), 0.2);

    /* ---- btn-primary text override (primary is too light for pastel contrast) ---- */
    --primary-btn-text: #0d7fa3;
}


/* =========================================
   Logo Customizations
   ========================================= */

.nav-brand img {
    height: 25px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-brand:hover img {
    transform: scale(1.05);
}

.footer-brand img {
    height: 25px;
    width: auto;
}

/* =========================================
   Real Estate Hero & Search Bar
   ========================================= */

.hero-section {
    padding: 140px 0 110px;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

/* Glow blobs */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.hero-glow--1 {
    width: 600px;
    height: 600px;
    background: rgba(var(--primary-rgb), 0.08);
    top: -200px;
    right: -100px;
}

.hero-glow--2 {
    width: 400px;
    height: 400px;
    background: rgba(var(--secondary-rgb), 0.06);
    bottom: -80px;
    left: -60px;
}

.hero-content {
    text-align: left;
    position: relative;
    z-index: 1;
}

/* Stacked image visual */
.hero-visuals {
    position: relative;
    width: 420px;
    height: 420px;
    margin: 0 auto;
    z-index: 1;
}

.hero-img {
    position: absolute;
    object-fit: cover;
    border-radius: 20px;
}

.hero-img--back {
    width: 82%;
    height: 83%;
    top: 0;
    right: 0;
    z-index: 1;
    transform: rotate(3deg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.hero-img--front {
    width: 62%;
    height: 60%;
    bottom: 0;
    left: 0;
    z-index: 2;
    transform: rotate(-4deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    border: 5px solid var(--bg-body);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 580px;
    margin-left: 0;
    margin-right: 0;
    line-height: 1.65;
}

/* CTA row */
.hero-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Stats strip */
.hero-stats-strip {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-stat-pill {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.hero-stat-count {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-stat-sep {
    color: var(--text-tertiary);
    opacity: 0.35;
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 991px) {
    .hero-section {
        padding: 100px 0 80px;
    }

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

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-stats-strip {
        justify-content: center;
    }

    .hero-visuals {
        margin-top: 3.5rem;
        width: 380px;
        height: 380px;
    }
}

@media (max-width: 480px) {
    .hero-visuals {
        width: 290px;
        height: 290px;
        margin-top: 2.5rem;
    }
}

/* Glassmorphic Search Bar */
.search-container {
    background: var(--bg-glass-hover);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-light);
    border-radius: 30px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--glass-shadow);
    margin: 0 0 0 0;
    max-width: 640px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow-hover);
    background: rgba(255, 255, 255, 0.05);
}

.search-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.search-group i {
    color: var(--primary);
    margin-right: 15px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 16px 0;
    width: 100%;
    outline: none;
    font-size: 1.05rem;
}

.search-input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

.btn-search {
    background: var(--gradient-text-brand);
    color: var(--bg-body);
    border: none;
    padding: 0 32px;
    border-radius: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    min-height: 54px;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
}

.btn-search:hover {
    transform: scale(1.03) translateY(-1px);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.4);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        padding: 15px;
        border-radius: 24px;
        max-width: 100%;
        margin: 0 auto;
    }

    .search-group {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   Hero Search Dropdown
   ========================================= */

.search-container {
    position: relative;
}

/* Mirrors .filter-bar-floating */
.search-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2, 8px));
    left: 0;
    right: 0;
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 300;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-dropdown.is-open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

/* Mirrors filter section heading */
.search-dropdown-label {
    font-size: var(--text-xs, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: var(--space-3, 10px) var(--space-4, 14px) var(--space-2, 6px);
    border-bottom: 1px solid var(--border-subtle);
}

/* Mirrors .dropdown-item */
.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3, 10px);
    padding: var(--space-3, 10px) var(--space-4, 14px);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: var(--text-sm, 0.875rem);
    transition: background 0.15s ease, color 0.15s ease;
}

.search-dropdown-item i {
    color: var(--text-tertiary);
    width: 14px;
    flex-shrink: 0;
}

.search-dropdown-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-item:hover,
.search-dropdown-item.is-active {
    background: var(--bg-secondary-hover);
    color: var(--text-primary);
}

.search-dropdown-delete {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--radius-sm, 4px);
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

.search-dropdown-item:hover .search-dropdown-delete {
    opacity: 1;
}

.search-dropdown-delete:hover {
    color: var(--danger, #ef4444);
}

/* =========================================
   Pricing Overrides (Ethica)
   ========================================= */

.pricing-amount {
    font-size: 2rem !important;
    /* Igual que los titles democratizados */
}

.pricing-card--featured .pricing-amount {
    font-size: 2rem !important;
}

.pricing-currency {
    font-size: 1.25rem !important;
    /* Proporcional (h4 size) */
}

/* =========================================
   Ethica Dashboard Hero
   ========================================= */

.ethica-hero {
    position: relative;
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-12);
    margin-bottom: var(--space-8);
    overflow: hidden;
    isolation: isolate;
}

/* Glow blobs */
.ethica-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.ethica-hero-glow--1 {
    width: 480px;
    height: 480px;
    background: rgba(var(--primary-rgb), 0.10);
    top: -140px;
    right: -80px;
}

.ethica-hero-glow--2 {
    width: 320px;
    height: 320px;
    background: rgba(var(--secondary-rgb), 0.08);
    bottom: -100px;
    left: 160px;
}

/* Main layout: text left, stats right */
.ethica-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.ethica-hero-text {
    flex: 1;
    min-width: 260px;
}

/* Eyebrow label */
.ethica-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: var(--space-3);
    margin-top: 0;
}

.hero-eyebrow-icon {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Name — reuses h1 gradient from layout.css */
.ethica-hero-name {
    font-size: clamp(2rem, 4vw, 2.75rem) !important;
    margin-bottom: var(--space-3) !important;
}

.ethica-hero-subtitle {
    font-size: var(--text-base);
    color: var(--text-tertiary);
    max-width: 480px;
    margin-bottom: var(--space-6);
}

.ethica-hero-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* Stats block */
.ethica-hero-stats {
    display: flex;
    align-items: stretch;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-8);
    transition: background 0.2s ease;
}

.hero-stat-card:hover {
    background: var(--bg-card-hover);
}

.hero-stat-divider {
    width: 1px;
    background: var(--border-subtle);
    margin: var(--space-4) 0;
    align-self: stretch;
}

.hero-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Neutral tinted icon bg */
.bg-soft-neutral {
    background-color: rgba(255, 255, 255, 0.06);
}

.hero-stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-1);
    letter-spacing: -0.04em;
}

.hero-stat-value--positive {
    color: #6db88a;
}

.hero-stat-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 991px) {
    .ethica-hero {
        padding: var(--space-8);
    }

    .ethica-hero-stats {
        width: 100%;
    }

    .hero-stat-card {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .ethica-hero {
        padding: var(--space-6);
    }

    .ethica-hero-stats {
        flex-direction: column;
    }

    .hero-stat-divider {
        width: auto;
        height: 1px;
        margin: 0 var(--space-4);
        align-self: auto;
    }
}