/* iqar.at — Real Estate */

:root {
    --iq-primary: #c9a962;
    --iq-primary-dark: #a88b4a;
    --iq-secondary: #1e3a5f;
    --iq-secondary-light: #2a4f7a;
    --iq-dark: #0c1222;
    --iq-surface: #141c2e;
    --iq-light: #f4f6f9;
    --iq-muted: rgba(244, 246, 249, 0.65);
    --iq-border: rgba(201, 169, 98, 0.2);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 76px;
    background-color: var(--iq-dark);
    color: var(--iq-light);
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5 {
    font-family: 'Playfair Display', 'Inter', serif;
    font-weight: 700;
    color: var(--iq-light);
}

.text-muted {
    color: var(--iq-muted) !important;
}

.text-primary {
    color: var(--iq-primary) !important;
}

a {
    color: var(--iq-primary);
}

a:hover {
    color: var(--iq-primary-dark);
}

/* Navbar */
.navbar {
    background-color: rgba(12, 18, 34, 0.95) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--iq-border);
}

.navbar-brand {
    padding: 0;
}

.site-logo {
    height: 40px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover .site-logo {
    opacity: 0.9;
}

.footer-logo {
    height: 34px;
    width: auto;
    display: block;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--iq-muted) !important;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--iq-primary) !important;
}

.dropdown-menu {
    background-color: var(--iq-surface);
    border: 1px solid var(--iq-border);
}

.dropdown-item {
    color: var(--iq-light);
}

.dropdown-item:hover {
    background-color: rgba(201, 169, 98, 0.1);
    color: var(--iq-primary);
}

/* Hero */
.hero-section {
    position: relative;
    background-image:
        linear-gradient(135deg, rgba(12, 18, 34, 0.88) 0%, rgba(30, 58, 95, 0.75) 50%, rgba(12, 18, 34, 0.9) 100%),
        url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&q=80');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(12, 18, 34, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    color: var(--iq-muted);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.search-card {
    background: rgba(20, 28, 46, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--iq-border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.search-card .form-label {
    color: var(--iq-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-card .form-control,
.search-card .form-select {
    background-color: var(--iq-dark);
    border: 1px solid var(--iq-border);
    color: var(--iq-light);
    padding: 0.65rem 0.85rem;
}

.search-card .form-control:focus,
.search-card .form-select:focus {
    background-color: var(--iq-dark);
    border-color: var(--iq-primary);
    color: var(--iq-light);
    box-shadow: 0 0 0 0.2rem rgba(201, 169, 98, 0.15);
}

.search-card .input-group-text {
    background-color: var(--iq-dark);
    border: 1px solid var(--iq-border);
    color: var(--iq-primary);
}

/* Cards */
.card {
    background-color: var(--iq-surface);
    border: 1px solid var(--iq-border);
    border-radius: 12px;
    color: var(--iq-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(201, 169, 98, 0.4);
}

.card-title {
    color: var(--iq-light) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Property cards */
.property-card {
    overflow: hidden;
}

.property-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4em 0.75em;
    border-radius: 6px;
}

html[dir="rtl"] .property-badge {
    left: auto;
    right: 12px;
}

.badge-sale {
    background-color: var(--iq-primary);
    color: var(--iq-dark);
}

.badge-rent {
    background-color: var(--iq-secondary);
    color: var(--iq-light);
}

.property-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--iq-primary);
}

.property-meta {
    font-size: 0.85rem;
    color: var(--iq-muted);
}

.property-meta i {
    color: var(--iq-primary);
}

.property-location {
    font-size: 0.9rem;
}

/* Category cards */
.category-card {
    color: inherit;
}

.category-card:hover {
    color: inherit;
}

.category-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 98, 0.1);
    border: 1px solid var(--iq-border);
    border-radius: 50%;
    font-size: 1.75rem;
    color: var(--iq-primary);
    transition: background 0.3s ease;
}

.category-card:hover .category-icon {
    background: rgba(201, 169, 98, 0.2);
}

.category-link {
    color: var(--iq-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Feature cards */
.feature-icon {
    font-size: 2.5rem;
    color: var(--iq-primary);
}

.feature-card h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

/* Sections */
.section-alt {
    background-color: var(--iq-surface);
    border-top: 1px solid var(--iq-border);
    border-bottom: 1px solid var(--iq-border);
}

.section-header .display-5 {
    margin-bottom: 0.5rem;
}

/* Stats */
.stats-section {
    background: linear-gradient(135deg, var(--iq-secondary) 0%, var(--iq-dark) 100%);
    border-top: 1px solid var(--iq-border);
    border-bottom: 1px solid var(--iq-border);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--iq-primary);
    line-height: 1.2;
}

.stat-label {
    color: var(--iq-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Free listing highlights */
.free-pill {
    display: inline-block;
    background: rgba(201, 169, 98, 0.15);
    border: 1px solid var(--iq-primary);
    color: var(--iq-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.free-banner-card {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.12) 0%, var(--iq-surface) 100%);
    border: 1px solid var(--iq-border);
    border-radius: 12px;
}

.free-banner-card h3 {
    color: var(--iq-light);
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
}

/* Nav post button */
.btn-nav-post {
    margin: 0.25rem 0 0.25rem 0.75rem;
    padding: 0.45rem 1.1rem !important;
    font-size: 0.9rem;
    white-space: nowrap;
}

html[dir="rtl"] .btn-nav-post {
    margin: 0.25rem 0.75rem 0.25rem 0;
}

/* How it works */
.step-number {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--iq-primary);
    color: var(--iq-dark);
    font-weight: 700;
    border-radius: 50%;
    font-size: 1rem;
}

.step-card h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
}

/* CTA */
.cta-card {
    background: linear-gradient(135deg, var(--iq-surface) 0%, rgba(30, 58, 95, 0.5) 100%);
    border: 1px solid var(--iq-border);
    border-radius: 16px;
}

.cta-card-accent {
    border-color: rgba(201, 169, 98, 0.35);
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.08) 0%, var(--iq-surface) 100%);
}

/* Post ad page */
.page-hero {
    background: linear-gradient(180deg, var(--iq-surface) 0%, var(--iq-dark) 100%);
    border-bottom: 1px solid var(--iq-border);
}

.lister-type-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 98, 0.1);
    border: 1px solid var(--iq-border);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--iq-primary);
}

.lister-type-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
}

.post-ad-panel {
    max-width: 800px;
    border-color: var(--iq-border);
}

.post-ad-feature {
    padding: 1rem;
}

.post-ad-feature i {
    display: block;
    font-size: 1.5rem;
    color: var(--iq-primary);
    margin-bottom: 0.5rem;
}

.post-ad-feature span {
    font-size: 0.9rem;
    color: var(--iq-muted);
}

/* Buttons */
.btn-primary {
    background-color: var(--iq-primary);
    border-color: var(--iq-primary);
    color: var(--iq-dark);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--iq-primary-dark);
    border-color: var(--iq-primary-dark);
    color: var(--iq-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--iq-primary);
    color: var(--iq-primary);
}

.btn-outline-primary:hover {
    background-color: var(--iq-primary);
    border-color: var(--iq-primary);
    color: var(--iq-dark);
}

.btn-outline-light {
    border-color: rgba(244, 246, 249, 0.4);
    color: var(--iq-light);
}

.btn-outline-light:hover {
    background-color: var(--iq-light);
    border-color: var(--iq-light);
    color: var(--iq-dark);
}

/* Footer */
.site-footer {
    background-color: var(--iq-surface);
    border-top: 1px solid var(--iq-border);
}

.site-footer h5 {
    color: var(--iq-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.footer-links a {
    color: var(--iq-muted);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--iq-primary);
}

.footer-divider {
    border-color: var(--iq-border);
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card,
.category-card,
.feature-card {
    animation: fadeInUp 0.5s ease-out both;
}

.property-card:nth-child(2) { animation-delay: 0.1s; }
.property-card:nth-child(3) { animation-delay: 0.2s; }
.property-card:nth-child(4) { animation-delay: 0.3s; }

/* RTL — Tajawal (body) + El Messiri (headings) */
html[dir="rtl"] body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 400;
    text-align: right;
    letter-spacing: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .display-1,
html[dir="rtl"] .display-2,
html[dir="rtl"] .display-3,
html[dir="rtl"] .display-4,
html[dir="rtl"] .display-5,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .stat-number,
html[dir="rtl"] .property-price {
    font-family: 'El Messiri', 'Tajawal', serif;
    font-weight: 700;
    letter-spacing: 0;
}

html[dir="rtl"] .navbar-brand {
    font-family: 'El Messiri', 'Tajawal', serif;
    font-weight: 700;
}

html[dir="rtl"] .navbar-nav .nav-link,
html[dir="rtl"] .card-title,
html[dir="rtl"] .btn,
html[dir="rtl"] .form-label,
html[dir="rtl"] .search-card .form-control,
html[dir="rtl"] .search-card .form-select,
html[dir="rtl"] .property-meta,
html[dir="rtl"] .category-link,
html[dir="rtl"] .stat-label,
html[dir="rtl"] .lead {
    font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] .navbar-nav .nav-link,
html[dir="rtl"] .btn {
    font-weight: 500;
}

html[dir="rtl"] .hero-subtitle,
html[dir="rtl"] .text-muted,
html[dir="rtl"] .card-text,
html[dir="rtl"] .property-location {
    font-family: 'Tajawal', sans-serif;
    font-weight: 400;
}

html[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
html[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
html[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
html[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
html[dir="rtl"] .me-auto { margin-left: auto !important; margin-right: 0 !important; }
html[dir="rtl"] .ms-auto { margin-right: auto !important; margin-left: 0 !important; }
html[dir="rtl"] .dropdown-menu-end { right: auto !important; left: 0 !important; }

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .search-card {
        padding: 1.25rem;
    }

    .search-card .col-md-2 .btn {
        margin-top: 0.5rem;
    }

    .btn-nav-post {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
}
