/* ============================================
   casasenoferta.com - Stylesheet Principal
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    font-size: 15px;
}
a { color: var(--brand-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-secondary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

/* === UTILITIES === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--brand-accent); }
.text-primary-c { color: var(--brand-primary); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: #16a34a; }
.text-danger { color: #dc2626; }
.text-sm { font-size: .85rem; }
.text-lg { font-size: 1.15rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* === NAVBAR === */
.navbar {
    background: var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-brand { display: flex; align-items: center; gap: 8px; }
.navbar-logo { height: 40px; width: auto; }
.navbar-brand-text { font-size: 1.3rem; font-weight: 700; color: var(--brand-primary); }
.navbar-brand-text small { font-weight: 400; opacity: .7; }
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.navbar-toggle span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: .3s; }
.navbar-menu { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: .9rem;
    border-radius: 6px;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.nav-link:hover { background: var(--bg-secondary); color: var(--brand-primary); }

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; background: none; border: none; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-primary);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    min-width: 200px;
    padding: 6px 0;
    z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: .9rem;
    transition: background .15s;
}
.nav-dropdown-menu a:hover { background: var(--bg-secondary); }
.nav-dropdown-menu hr { border: none; border-top: 1px solid #e2e8f0; margin: 4px 0; }

/* Buttons in nav */
.btn-primary, .nav-link.btn-primary {
    background: var(--brand-primary);
    color: #fff !important;
    border-radius: 6px;
}
.btn-primary:hover { background: #1e3a8a; }
.btn-accent, .nav-link.btn-accent {
    background: var(--brand-accent);
    color: #fff !important;
    border-radius: 6px;
}
.btn-accent:hover { background: #ea580c; }

/* Language */
.lang-selector { display: flex; gap: 2px; margin-left: 8px; }
.lang-btn {
    padding: 4px 8px;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: .2s;
}
.lang-btn.active, .lang-btn:hover { background: var(--brand-primary); color: #fff; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: #1e3a8a; color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--brand-accent); color: #fff; }
.btn-accent:hover { background: #ea580c; color: #fff; transform: translateY(-1px); }
.btn-secondary { background: #e2e8f0; color: var(--text-primary); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--brand-primary); color: var(--brand-primary); }
.btn-outline:hover { background: var(--brand-primary); color: #fff; }
.btn-outline-accent { background: transparent; border: 2px solid var(--brand-accent); color: var(--brand-accent); }
.btn-outline-accent:hover { background: var(--brand-accent); color: #fff; }
.btn-white { background: #fff; color: var(--brand-primary); }
.btn-white:hover { background: #f1f5f9; color: var(--brand-primary); }

/* === ALERTS === */
.flash-container { margin-top: 10px; }
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
    animation: slideDown .3s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid #16a34a; }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }
.alert-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; opacity: .5; }
.alert-close:hover { opacity: 1; }

/* === FORMS === */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .9rem; color: var(--text-primary); }
.form-label .required { color: #dc2626; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}
.form-control:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(30,64,175,.1); }
.form-control::placeholder { color: #9ca3af; }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: .8rem; color: var(--text-secondary); margin-top: 4px; }
.form-error { font-size: .8rem; color: #dc2626; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-primary); }
.form-inline { display: flex; gap: .5rem; align-items: end; }
.form-inline .form-group { flex: 1; margin-bottom: 0; }

/* === CARDS === */
.card {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid #e2e8f0; font-weight: 600; }
.card-footer { padding: 12px 20px; border-top: 1px solid #e2e8f0; background: #f8fafc; }

/* === PROPERTY CARDS === */
.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.property-card { position: relative; }
.property-card .card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
}
.property-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.property-card:hover .card-img img { transform: scale(1.05); }
.property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.badge-venta { background: var(--brand-primary); color: #fff; }
.badge-renta { background: #8b5cf6; color: #fff; }
.property-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: .2s;
}
.property-fav-btn:hover { background: #fff; transform: scale(1.1); }
.property-fav-btn.active { color: #dc2626; }
.property-card .card-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.property-card .card-body h3 a { color: var(--text-primary); }
.property-card .card-body h3 a:hover { color: var(--brand-primary); }
.property-location { color: var(--text-secondary); font-size: .85rem; margin-bottom: 8px; }
.property-price { font-size: 1.25rem; font-weight: 700; color: var(--brand-primary); }
.property-price-converted { font-size: .8rem; color: var(--text-secondary); }
.property-features {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: .85rem;
    color: var(--text-secondary);
}
.property-features span { display: flex; align-items: center; gap: 4px; }

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 12px; }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 30px; }
.hero-search {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.hero-search select, .hero-search input {
    border: none;
    padding: 16px 20px;
    font-size: 1rem;
    flex: 1;
    outline: none;
}
.hero-search select { border-right: 1px solid #e2e8f0; max-width: 200px; }
.hero-search .btn { border-radius: 0; padding: 16px 32px; }

/* === SECTIONS === */
.section { padding: 50px 0; }
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.section-subtitle { color: var(--text-secondary); margin-bottom: 30px; }

/* Cities Grid */
.cities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.city-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: .2s;
}
.city-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.city-card h3 { font-size: 1rem; }
.city-card .city-count { background: var(--brand-primary); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: .8rem; font-weight: 600; }

/* === PROPERTY DETAIL === */
.detail-hero { background: var(--bg-primary); padding: 30px 0; border-bottom: 1px solid #e2e8f0; min-height: 180px; contain: layout style; }
.detail-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; }
.detail-title { font-size: 1.6rem; }
.detail-location { color: var(--text-secondary); margin-top: 4px; }
.detail-price-box { text-align: right; }
.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--brand-primary); }
.detail-price-converted { color: var(--text-secondary); font-size: .9rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding: 30px 0; }
.detail-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 24px;
}
.detail-feature { text-align: center; padding: 12px; }
.detail-feature .feature-value { font-size: 1.5rem; font-weight: 700; color: var(--brand-primary); }
.detail-feature .feature-label { font-size: .8rem; color: var(--text-secondary); }

/* Gallery */
.gallery { margin-bottom: 24px; }
.gallery-main { width: 100%; aspect-ratio: 4/3; max-height: 500px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; background: #e2e8f0; contain: layout; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color .2s;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--brand-primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Sidebar */
.sidebar-card { position: sticky; top: 84px; }
.contact-form { padding: 24px; }
.contact-form h3 { margin-bottom: 16px; }
.agent-info { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.agent-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; }
.agent-name { font-weight: 600; }
.agent-company { font-size: .85rem; color: var(--text-secondary); }

/* Social Texts */
.social-block { margin-top: 20px; }
.social-tab { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.social-tab button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    transition: .2s;
}
.social-tab button.active, .social-tab button:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.social-content { background: #f8fafc; padding: 16px; border-radius: 8px; font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }
.social-copy-btn { margin-top: 8px; }

/* === WIZARD === */
.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 30px 20px 20px;
    max-width: 700px;
    margin: 0 auto;
}
.wizard-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.wizard-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .85rem;
    background: #e2e8f0;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: .3s;
}
.wizard-step-indicator.active .wizard-step-num { background: var(--brand-primary); color: #fff; }
.wizard-step-indicator.completed .wizard-step-num { background: #16a34a; color: #fff; }
.wizard-step-label { font-size: .7rem; margin-top: 6px; color: var(--text-secondary); text-align: center; }
.wizard-step-indicator.active .wizard-step-label { color: var(--brand-primary); font-weight: 600; }
.wizard-step-indicator::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.wizard-step-indicator:last-child::after { display: none; }
.wizard-step-indicator.completed::after { background: #16a34a; }
.wizard-step-indicator.active::after { background: var(--brand-primary); }

.wizard-form {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.wizard-actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* Photo Upload */
.photo-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: .2s;
    margin-bottom: 16px;
}
.photo-upload-area:hover { border-color: var(--brand-primary); background: #f0f7ff; }
.photo-upload-area.dragover { border-color: var(--brand-accent); background: #fff7ed; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-item { position: relative; border-radius: 8px; overflow: hidden; height: 120px; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220,38,38,.9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-item .photo-desc { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); color: #fff; padding: 4px 8px; font-size: .75rem; }

/* === DASHBOARD === */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; min-height: calc(100vh - 200px); }
.sidebar-nav {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    height: fit-content;
    position: sticky;
    top: 84px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: var(--text-primary);
    font-size: .9rem;
    transition: .2s;
}
.sidebar-nav a:hover { background: var(--bg-secondary); color: var(--brand-primary); }
.sidebar-nav a.active { background: rgba(30,64,175,.06); color: var(--brand-primary); font-weight: 600; border-right: 3px solid var(--brand-primary); }
.sidebar-nav .nav-section { padding: 8px 24px; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-top: 12px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--brand-primary); }
.stat-card .stat-label { font-size: .85rem; color: var(--text-secondary); }

/* === TABLES === */
.table-wrapper { overflow-x: auto; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    font-size: .9rem;
}
.table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-secondary);
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.table tr:hover { background: #f8fafc; }
.table-actions { display: flex; gap: 6px; }

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

/* === PAGINATION === */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 30px; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
}
.pagination a { background: var(--bg-primary); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.pagination a:hover { background: var(--brand-primary); color: #fff; }
.pagination .active { background: var(--brand-primary); color: #fff; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* === PLANS SECTION === */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.plan-card { text-align: center; padding: 36px 24px; position: relative; border: 2px solid transparent; }
.plan-card.featured { border-color: var(--brand-accent); }
.plan-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-accent);
    color: #fff;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}
.plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 2.2rem; font-weight: 700; color: var(--brand-primary); margin-bottom: 4px; }
.plan-price small { font-size: .85rem; font-weight: 400; color: var(--text-secondary); }
.plan-features { text-align: left; margin: 24px 0; }
.plan-features li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .9rem; }
.plan-features li::before { content: '✓'; color: #16a34a; font-weight: 700; margin-right: 8px; }

/* === AUTH PAGES === */
.auth-container { max-width: 440px; margin: 40px auto; padding: 0 20px; }
.auth-card { padding: 40px; }
.auth-card h2 { text-align: center; margin-bottom: 24px; }
.auth-divider { text-align: center; margin: 20px 0; color: var(--text-secondary); font-size: .85rem; }

/* === SUMMARY CARD (Wizard step 6) === */
.summary-card { border-left: 4px solid var(--brand-primary); }
.summary-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.summary-label { width: 160px; font-weight: 500; color: var(--text-secondary); font-size: .9rem; flex-shrink: 0; }
.summary-value { flex: 1; font-size: .9rem; }

/* === FILTER BAR === */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: 24px;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 150px; }
.filter-bar .form-control { padding: 8px 12px; font-size: .85rem; }
.results-count { color: var(--text-secondary); margin-bottom: 16px; font-size: .9rem; }

/* === SUCCESS PAGE (Wizard step 7) === */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

/* === FOOTER === */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 50px 0 20px;
    margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer a { color: #94a3b8; font-size: .9rem; display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 20px; text-align: center; font-size: .85rem; }
.footer-brand { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-brand .text-accent { color: var(--brand-accent); }

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-primary);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
}
.modal-close { float: right; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* === ADMIN SPECIFIC === */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }

/* === MESSAGES TABLE === */
.msg-unread { font-weight: 600; background: #eff6ff; }
.msg-preview { color: var(--text-secondary); font-size: .85rem; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === NO IMAGE PLACEHOLDER === */
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: .85rem;
    width: 100%;
    height: 100%;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar-toggle { display: flex; }
    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
    }
    .navbar-menu.open { display: flex; }
    .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 16px; }
    .lang-selector { margin: 8px 0; }
    .hero h1 { font-size: 1.8rem; }
    .hero-search { flex-direction: column; border-radius: 10px; }
    .hero-search select { border-right: none; border-bottom: 1px solid #e2e8f0; max-width: none; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-header { flex-direction: column; }
    .detail-price-box { text-align: left; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar-nav { display: flex; overflow-x: auto; gap: 0; border-radius: 10px; padding: 0; }
    .sidebar-nav a { padding: 12px 16px; white-space: nowrap; border-right: none !important; }
    .sidebar-nav a.active { border-bottom: 3px solid var(--brand-primary); border-right: none; }
    .sidebar-nav .nav-section { display: none; }
    .property-grid { grid-template-columns: 1fr; }
    .wizard-progress { gap: 2px; }
    .wizard-step-label { font-size: .6rem; }
    .wizard-form { margin: 0 10px 40px; padding: 20px; }
    .plans-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .gallery-main { max-height: 280px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 1.5rem; }
    .property-card .card-img { height: 180px; }
    .detail-features { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================
   HOMEPAGE: TRUST SIGNALS
   ============================================ */
.hero-stats { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.hero-stat { font-size: .9rem; color: rgba(255,255,255,.9); }
.hero-stat strong { font-size: 1.2rem; display: block; color: #fff; }

/* ============================================
   HOMEPAGE: SECTION HEADER
   ============================================ */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-subtitle { color: var(--text-secondary); font-size: .9rem; margin-top: 2px; }

/* ============================================
   HOMEPAGE: BLOG HERO ARTICLE
   ============================================ */
.hp-blog-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .25s, transform .2s;
}
.hp-blog-hero:hover { box-shadow: 0 8px 30px rgba(0,0,0,.1); transform: translateY(-2px); }
.hp-blog-hero__img { overflow: hidden; }
.hp-blog-hero__img img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; transition: transform .4s; }
.hp-blog-hero:hover .hp-blog-hero__img img { transform: scale(1.03); }
.hp-blog-hero__body { padding: 28px 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hp-blog-hero__body h3 { font-size: 1.35rem; line-height: 1.35; }
.hp-blog-hero__body p { color: var(--text-secondary); font-size: .92rem; line-height: 1.55; }
.hp-blog-meta { font-size: .82rem; color: var(--text-secondary); }

/* Badge */
.hp-badge { display: inline-block; background: var(--brand-primary); color: #fff; padding: 3px 10px; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.hp-badge-sm { font-size: .75rem; color: var(--brand-accent); font-weight: 600; }

/* ============================================
   HOMEPAGE: GUIDE CARDS (3 cols, with image)
   ============================================ */
.hp-guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hp-guide-card {
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .25s, transform .2s;
    border: 1px solid #e2e8f0;
}
.hp-guide-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.hp-guide-card img { width: 100%; height: 170px; object-fit: cover; }
.hp-guide-ph { width: 100%; height: 170px; background: linear-gradient(135deg,var(--brand-primary),var(--brand-secondary)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.hp-guide-card__body { padding: 14px 16px; }
.hp-guide-card__body h4 { font-size: .95rem; line-height: 1.35; margin: 4px 0 6px; }

/* ============================================
   HOMEPAGE: QUICK READS (no image, 2 cols)
   ============================================ */
.hp-sub-title { font-size: 1.1rem; margin: 28px 0 14px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.hp-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp-quick-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s;
    border: 1px solid #e2e8f0;
    align-items: flex-start;
}
.hp-quick-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.hp-quick-icon { font-size: 1.8rem; flex-shrink: 0; margin-top: 2px; }
.hp-quick-card h4 { font-size: .92rem; line-height: 1.35; margin-bottom: 4px; }
.hp-quick-card p { font-size: .82rem; color: var(--text-secondary); line-height: 1.45; margin-bottom: 4px; }

/* ============================================
   HOMEPAGE: TOPIC CHIPS
   ============================================ */
.hp-topics { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hp-topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: .88rem;
    font-weight: 500;
    transition: all .2s;
}
.hp-topic-chip:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.hp-topic-chip:hover .hp-topic-count { background: rgba(255,255,255,.25); color: #fff; }
.hp-topic-icon { font-size: 1.1rem; }
.hp-topic-count { background: var(--brand-primary); color: #fff; font-size: .7rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; }

/* ============================================
   HOMEPAGE: COMPACT BLOG ROW
   ============================================ */
.hp-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp-compact-card {
    display: flex;
    gap: 14px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    transition: box-shadow .2s;
    align-items: center;
}
.hp-compact-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.hp-compact-card img { width: 100px; height: 66px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.hp-compact-card h4 { font-size: .88rem; line-height: 1.3; margin-top: 2px; }

/* ============================================
   RESPONSIVE: HOMEPAGE BLOG
   ============================================ */
@media (max-width: 768px) {
    .hp-blog-hero { grid-template-columns: 1fr; }
    .hp-blog-hero__img img { min-height: 200px; height: 200px; }
    .hp-blog-hero__body { padding: 18px; }
    .hp-blog-hero__body h3 { font-size: 1.15rem; }
    .hp-guides { grid-template-columns: 1fr; }
    .hp-quick-grid { grid-template-columns: 1fr; }
    .hp-compact-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 16px; }
    .hero-stat strong { font-size: 1rem; }
    .section-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   FASE 9+: DETAIL PAGE ENHANCEMENTS
   ============================================ */

/* Breadcrumbs */
.breadcrumb-list {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    list-style: none; padding: 0; margin: 0; font-size: .85rem;
}
.breadcrumb-list li { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.breadcrumb-list li a { color: var(--brand-primary); text-decoration: none; }
.breadcrumb-list li a:hover { text-decoration: underline; }
.breadcrumb-list li + li::before { content: '›'; color: #cbd5e1; font-weight: 700; font-size: 1rem; }

/* Feature icons */
.detail-feature .feature-icon {
    font-size: 1.4rem; color: var(--brand-primary); margin-bottom: 6px; display: block;
}

/* Gallery photo count */
.gallery-main { position: relative; }
.gallery-count {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,.65); color: #fff; padding: 4px 12px;
    border-radius: 20px; font-size: .8rem; font-weight: 500;
    backdrop-filter: blur(4px);
}

/* FA icon placeholder: prevent CLS when Font Awesome loads async */
.fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"] {
    display: inline-block; min-width: 1em; min-height: 1em; vertical-align: -0.125em;
}
/* Property card image aspect ratio */
.property-card .property-img img { aspect-ratio: 3/2; object-fit: cover; width: 100%; height: auto; }

/* Detail extras grid */
.detail-extras-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.detail-extra-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: var(--bg-secondary, #f8fafc);
    border-radius: 8px; font-size: .9rem; color: var(--text-primary);
}
.detail-extra-item i { color: var(--brand-primary); width: 18px; text-align: center; }

/* Financing badges */
.financing-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.fin-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 8px; font-size: .85rem; font-weight: 600;
    background: color-mix(in srgb, var(--fin-color, #059669) 10%, white);
    color: var(--fin-color, #059669);
    border: 1px solid color-mix(in srgb, var(--fin-color, #059669) 25%, white);
}
/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, green 10%, white)) {
    .fin-badge { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
}

/* Amenities grid */
.amenities-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
}
.amenity-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; font-size: .88rem; color: var(--text-primary);
}
.amenity-icon { font-size: 1.1rem; min-width: 22px; text-align: center; }

/* Property description expandable */
.property-description {
    line-height: 1.8; white-space: pre-wrap; max-height: 250px; overflow: hidden;
    transition: max-height .4s ease;
}
.property-description.expanded { max-height: none; }

/* Map container */
.map-container { border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }

/* Contact buttons */
.contact-buttons { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.btn-contact {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 8px; font-size: .9rem; font-weight: 600;
    text-decoration: none; text-align: center; transition: all .2s;
}
.btn-contact-phone { background: #eff6ff; color: var(--brand-primary); border: 1px solid #bfdbfe; }
.btn-contact-phone:hover { background: var(--brand-primary); color: #fff; }
.btn-contact-whatsapp { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }
.btn-contact-whatsapp:hover { background: #25D366; color: #fff; }
.btn-contact-email { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-contact-email:hover { background: #475569; color: #fff; }

/* Share buttons */
.btn-share {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; color: #fff;
    text-decoration: none; font-size: .9rem; transition: opacity .2s;
}
.btn-share:hover { opacity: .85; }

/* Quick nav sidebar */
.sidebar-quicknav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-quicknav a {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 6px; font-size: .85rem;
    color: var(--text-secondary); text-decoration: none; transition: all .2s;
}
.sidebar-quicknav a:hover { background: var(--bg-secondary, #f8fafc); color: var(--brand-primary); }
.sidebar-quicknav a i { width: 16px; text-align: center; }

/* Related articles */
.related-articles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-article-card {
    display: flex; gap: 12px; padding: 10px; border: 1px solid #e2e8f0;
    border-radius: 10px; text-decoration: none; color: inherit;
    transition: box-shadow .2s, border-color .2s; align-items: center;
}
.related-article-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); border-color: var(--brand-primary); }
.related-article-img { width: 90px; height: 70px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.related-article-img img { width: 100%; height: 100%; object-fit: cover; }
.related-article-noimg {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary, #f8fafc);
}
.related-article-body h4 { font-size: .88rem; line-height: 1.3; margin-top: 2px; }
.related-article-body p { margin-top: 4px; }

/* Similar properties grid override */
.similar-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Agent logo */
.agent-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; border: 1px solid #e2e8f0; }

/* ============================================
   RESPONSIVE: DETAIL ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    .related-articles-grid { grid-template-columns: 1fr; }
    .similar-grid { grid-template-columns: 1fr; }
    .detail-extras-grid { grid-template-columns: 1fr 1fr; }
    .amenities-grid { grid-template-columns: 1fr 1fr; }
    .contact-buttons { flex-direction: column; }
}
@media (max-width: 480px) {
    .detail-extras-grid { grid-template-columns: 1fr; }
    .amenities-grid { grid-template-columns: 1fr; }
    .financing-badges { flex-direction: column; }
}

/* ============================================================
   CALCULADORA HIPOTECARIA - Fase 11
   ============================================================ */

/* Hero */
.mortgage-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: #fff;
    padding: 40px 0 32px;
    text-align: center;
}
.mortgage-hero h1 { font-size: 2rem; margin-bottom: 8px; font-weight: 800; }
.mortgage-hero h1 i { margin-right: 8px; opacity: 0.8; }
.mortgage-hero p { font-size: 1.05rem; opacity: 0.85; max-width: 600px; margin: 0 auto; }
.mortgage-updated {
    display: inline-block;
    margin-top: 12px;
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
}
.mortgage-updated i { margin-right: 4px; }

/* Market strip */
.mortgage-market-strip {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
}
.market-cards {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.market-card {
    text-align: center;
    padding: 8px 20px;
}
.market-val { display: block; font-size: 1.4rem; font-weight: 800; color: #1e40af; }
.market-lbl { display: block; font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }

/* Main layout */
.mortgage-main { padding: 30px 0 50px; }
.mortgage-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .mortgage-layout { grid-template-columns: 1fr; }
}

/* Cards */
.calc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
.calc-card h2 {
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.calc-card h2 i { color: #1e40af; }
.calc-card h3 {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.calc-card h3 i { color: #1e40af; font-size: 0.9rem; }

/* Fields */
.calc-field { margin-bottom: 18px; }
.calc-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.calc-sub-val { font-weight: 400; color: #64748b; font-size: 0.8rem; }
.calc-hint { color: #94a3b8; font-size: 0.78rem; }

/* Money input */
.calc-input-money {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.calc-input-money:focus-within { border-color: #1e40af; }
.calc-currency {
    padding: 10px 12px;
    background: #f1f5f9;
    font-weight: 700;
    color: #1e40af;
    font-size: 1.1rem;
}
.calc-input-money input {
    border: none;
    outline: none;
    padding: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    width: 100%;
    font-family: inherit;
}

/* Percentage input */
.calc-input-pct {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    width: 120px;
}
.calc-input-pct input {
    border: none;
    outline: none;
    padding: 6px 8px;
    width: 80px;
    font-size: 0.95rem;
    font-family: inherit;
}
.calc-input-pct span {
    padding: 6px 8px;
    background: #f1f5f9;
    font-weight: 600;
    color: #64748b;
}
.calc-field-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.calc-field-inline label { width: 100%; }

/* Range sliders */
.calc-field input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    margin-top: 8px;
}
.calc-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.calc-field input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.calc-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Plazo buttons */
.calc-plazo-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.calc-plazo-btns button {
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s;
    font-family: inherit;
}
.calc-plazo-btns button:hover { border-color: #1e40af; color: #1e40af; }
.calc-plazo-btns button.active {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}

/* Bank selector */
.bank-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bank-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.bank-check:hover { border-color: #cbd5e1; background: #f8fafc; }
.bank-check input { display: none; }
.bank-check-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.bank-check-box i { display: none; color: #fff; font-size: 11px; }
.bank-check input:checked ~ .bank-check-box {
    background: var(--bank-color, #1e40af);
    border-color: var(--bank-color, #1e40af);
}
.bank-check input:checked ~ .bank-check-box i { display: block; }
.bank-check input:checked ~ .bank-check-info strong { color: var(--bank-color, #1e40af); }
.bank-check-info { line-height: 1.3; }
.bank-check-info strong { display: block; font-size: 0.88rem; color: #0f172a; transition: color 0.15s; }
.bank-check-info small { color: #64748b; font-size: 0.75rem; }

/* Result hero */
.calc-result-hero {
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    color: #fff;
    text-align: center;
    border: none;
}
.result-hero-label { font-size: 0.85rem; opacity: 0.8; margin-bottom: 4px; }
.result-hero-amount { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.result-hero-sub { font-size: 0.82rem; opacity: 0.7; margin-bottom: 16px; }
.result-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 14px;
}
.result-hero-grid div { text-align: center; }
.result-hero-grid span { display: block; font-size: 0.95rem; font-weight: 700; }
.result-hero-grid small { font-size: 0.68rem; opacity: 0.7; }
@media (max-width: 500px) {
    .result-hero-grid { grid-template-columns: repeat(2, 1fr); }
    .result-hero-amount { font-size: 2rem; }
}

/* Compare table */
.calc-table-wrap { overflow-x: auto; }
.calc-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.calc-compare-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.calc-compare-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
.calc-compare-table .row-best td { background: #eff6ff; }
.calc-empty { text-align: center; color: #94a3b8; padding: 24px !important; }
.bank-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.badge-best {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    font-weight: 700;
}
.calc-detail-toggle { text-align: center; margin-top: 8px; }
.btn-link {
    background: none;
    border: none;
    color: #1e40af;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* AI card */
.calc-ai-card { border: 2px solid #7c3aed; }
.calc-ai-card h3 i { color: #7c3aed; }
.btn-ai-analysis {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s;
    margin-top: 8px;
}
.btn-ai-analysis:hover { transform: translateY(-1px); }
.calc-ai-loading { text-align: center; padding: 20px; }
.spinner-dots { display: inline-flex; gap: 6px; }
.spinner-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7c3aed;
    animation: dotPulse 1.2s ease-in-out infinite;
}
.spinner-dots span:nth-child(2) { animation-delay: 0.2s; }
.spinner-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,80%,100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.1); } }
.calc-ai-loading p { margin-top: 10px; color: #64748b; font-size: 0.85rem; }
.calc-ai-meta { display: block; margin-top: 12px; color: #94a3b8; }

/* AI analysis response styling */
#mc-ai-content .bank-analysis { margin-bottom: 14px; }
#mc-ai-content .bank-analysis h4 { color: #1e40af; font-size: 0.95rem; margin-bottom: 4px; }
#mc-ai-content .bank-analysis ul { padding-left: 0; list-style: none; font-size: 0.85rem; }
#mc-ai-content .bank-analysis li { margin-bottom: 3px; }
#mc-ai-content .ai-recommendation {
    background: #eff6ff;
    border-left: 4px solid #1e40af;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    font-size: 0.88rem;
}
#mc-ai-content .ai-disclaimer {
    font-size: 0.78rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 12px;
}

/* Disclaimer */
.calc-disclaimer {
    display: flex;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 14px;
    font-size: 0.78rem;
    color: #92400e;
    margin-top: 16px;
}
.calc-disclaimer i { color: #f59e0b; flex-shrink: 0; margin-top: 2px; }

/* SEO content */
.mortgage-seo-content {
    max-width: 800px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}
.mortgage-seo-content h2 { font-size: 1.3rem; color: #0f172a; margin-bottom: 10px; }
.mortgage-seo-content h3 { font-size: 1.05rem; color: #1e40af; margin: 20px 0 6px; }
.mortgage-seo-content p { color: #475569; line-height: 1.7; margin-bottom: 12px; font-size: 0.92rem; }

/* ============================================================
   CALCULADORA SEO: FAQs, CTAs, Breadcrumbs nav
   ============================================================ */

/* Breadcrumbs nav (generic, reusable) */
nav.breadcrumbs { background: #f1f5f9; padding: 10px 0; font-size: 0.82rem; }
nav.breadcrumbs a { color: #1e40af; text-decoration: none; }
nav.breadcrumbs a:hover { text-decoration: underline; }
nav.breadcrumbs .sep { color: #94a3b8; margin: 0 6px; }
nav.breadcrumbs span:last-child { color: #64748b; }

/* FAQ Section */
.mortgage-faq-section, .isr-faq-section {
    max-width: 800px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}
.mortgage-faq-section h2, .isr-faq-section h2 {
    font-size: 1.3rem;
    color: #0f172a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mortgage-faq-section h2 i, .isr-faq-section h2 i { color: #1e40af; }
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    font-family: inherit;
    gap: 12px;
}
.faq-q span { flex: 1; }
.faq-q i {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.faq-item.open .faq-q { background: #f8fafc; }
.faq-item.open .faq-q i { transform: rotate(180deg); color: #1e40af; }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 18px;
}
.faq-item.open .faq-a {
    max-height: 500px;
    padding: 0 18px 16px;
}
.faq-a p {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}
.faq-a a { color: #1e40af; text-decoration: underline; }

/* CTA Cards */
.calc-cta-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #7dd3fc;
}
.calc-cta-card h3 i { color: #0284c7; }
.btn-cta-calc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0284c7;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    margin-top: 8px;
    transition: background 0.15s;
}
.btn-cta-calc:hover { background: #0369a1; color: #fff; }

/* CTA Properties */
.mortgage-cta-properties, .isr-cta-properties {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    color: #fff;
    border-radius: 16px;
    margin: 40px 0 0;
}
.mortgage-cta-properties h2, .isr-cta-properties h2 { font-size: 1.3rem; margin-bottom: 8px; }
.mortgage-cta-properties p, .isr-cta-properties p { opacity: 0.8; margin-bottom: 16px; }
.btn-cta-properties {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #fff;
    color: #1e40af;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.15s;
}
.btn-cta-properties:hover { transform: translateY(-2px); color: #1e40af; }

/* Mobile optimizations for calculator */
@media (max-width: 600px) {
    .mortgage-hero h1, .isr-hero h1 { font-size: 1.4rem; }
    .mortgage-hero p, .isr-hero p { font-size: 0.9rem; }
    .market-cards { gap: 8px; }
    .market-card { padding: 6px 12px; }
    .market-val { font-size: 1.1rem; }
    .calc-plazo-btns button { padding: 6px 10px; font-size: 0.78rem; }
    .bank-check { padding: 6px 10px; }
    .bank-check-info strong { font-size: 0.82rem; }
    .calc-compare-table { font-size: 0.78rem; }
    .calc-compare-table th, .calc-compare-table td { padding: 6px 5px; }
    .faq-q { padding: 12px 14px; font-size: 0.85rem; }
    .mortgage-seo-content, .isr-seo-content { padding-top: 20px; }
    .mortgage-cta-properties, .isr-cta-properties { padding: 24px 16px; margin: 24px 0 0; }
}

/* ============================================================
   CALCULADORA ISR por Venta de Inmuebles
   ============================================================ */
.isr-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #7c3aed 100%);
    color: #fff; padding: 40px 0 30px; text-align: center;
}
.isr-hero h1 { font-size: 1.6rem; margin-bottom: 10px; }
.isr-hero h1 i { margin-right: 6px; }
.isr-hero p { opacity: 0.85; max-width: 600px; margin: 0 auto 12px; font-size: 0.95rem; }
.isr-updated {
    display: inline-block; background: rgba(255,255,255,0.15);
    padding: 5px 14px; border-radius: 20px; font-size: 0.78rem;
}
.isr-main { padding: 30px 0; }
.isr-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

/* Toggle switch */
.isr-toggle-field { margin-top: 8px; }
.isr-toggle-label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 0.9rem; font-weight: 600; color: #0f172a;
}
.isr-toggle-label small { font-weight: 400; color: #64748b; }
.isr-toggle-label input { display: none; }
.isr-toggle-switch {
    width: 44px; height: 24px; background: #cbd5e1; border-radius: 12px;
    position: relative; transition: background 0.2s; flex-shrink: 0;
}
.isr-toggle-switch::after {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 18px; height: 18px; background: #fff; border-radius: 50%;
    transition: transform 0.2s;
}
.isr-toggle-label input:checked + .isr-toggle-switch { background: #16a34a; }
.isr-toggle-label input:checked + .isr-toggle-switch::after { transform: translateX(20px); }

.isr-info-box {
    display: flex; gap: 10px; background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 10px; padding: 12px; margin-top: 10px; font-size: 0.82rem;
}
.isr-info-box i { color: #16a34a; font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.isr-info-box p { margin: 4px 0 0; color: #475569; line-height: 1.5; }

/* Results */
.isr-result-hero { background: linear-gradient(135deg, #f5f3ff, #ede9fe); border: 2px solid #c4b5fd; }
.isr-result-hero .result-hero-amount { font-size: 2.2rem; }

/* Desglose table */
.isr-desglose-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.isr-desglose-table td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; }
.isr-desglose-table td.r { text-align: right; font-family: 'Courier New', monospace; white-space: nowrap; }
.isr-desglose-table tr.sub td { color: #94a3b8; font-size: 0.78rem; border: none; padding: 2px 8px; }
.isr-desglose-table tr.total td { border-top: 2px solid #e2e8f0; font-weight: 600; }
.isr-desglose-table tr.final td { background: #f8fafc; font-size: 1rem; }
.isr-desglose-table tr.exento td { color: #16a34a; }
.isr-desglose-table tr.neto td { color: #1e40af; font-weight: 600; }
.isr-desglose-table tr.sep td { border: none; padding: 4px; }

/* State info */
.isr-estado-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.isr-estado-item {
    text-align: center; padding: 14px; background: #f8fafc;
    border-radius: 10px; border: 1px solid #e2e8f0;
}
.isr-estado-val { display: block; font-size: 1.3rem; font-weight: 700; color: #0f172a; }
.isr-estado-lbl { display: block; font-size: 0.82rem; color: #64748b; margin-top: 2px; }
.isr-estado-item small { display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }

/* Exencion card */
.isr-exencion-card { text-align: center; padding: 20px; }
.isr-exencion-icon { font-size: 2rem; margin-bottom: 8px; }
.isr-exencion-full { background: #f0fdf4; border: 2px solid #86efac; }
.isr-exencion-full .isr-exencion-icon { color: #16a34a; }
.isr-exencion-full h3 { color: #16a34a; }
.isr-exencion-partial { background: #fefce8; border: 2px solid #fde047; }
.isr-exencion-partial .isr-exencion-icon { color: #ca8a04; }
.isr-exencion-partial h3 { color: #ca8a04; }

/* SEO content */
.isr-seo-content, .mortgage-seo-content {
    max-width: 800px; margin: 30px auto 0;
    padding-top: 30px; border-top: 1px solid #e2e8f0;
}
.isr-seo-content h2, .mortgage-seo-content h2 { font-size: 1.2rem; color: #0f172a; margin-bottom: 12px; }
.isr-seo-content h3, .mortgage-seo-content h3 { font-size: 1rem; color: #334155; margin: 20px 0 8px; }
.isr-seo-content p, .mortgage-seo-content p { font-size: 0.88rem; color: #475569; line-height: 1.7; margin-bottom: 12px; }
.isr-seo-content a, .mortgage-seo-content a { color: #1e40af; text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .isr-layout { grid-template-columns: 1fr; }
    .isr-hero h1 { font-size: 1.3rem; }
    .isr-hero p { font-size: 0.85rem; }
    .isr-estado-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .isr-estado-val { font-size: 1.1rem; }
    .isr-result-hero .result-hero-amount { font-size: 1.8rem; }
    .isr-desglose-table { font-size: 0.8rem; }
    .isr-desglose-table td { padding: 5px 4px; }
}

/* Nav tools dropdown icons */
.nav-tools-dropdown .nav-dropdown-menu a i {
    width: 20px; text-align: center; margin-right: 6px; color: #64748b;
}
.nav-tools-dropdown .nav-dropdown-menu a:hover i { color: #1e40af; }
