/**
 * Ev Arkadaşı Platformu - Rebuilt style.css (v2.0)
 * Architecture: Concrete-First (Zero CLS)
 * Purpose: Performance, Stability, and Modern Design
 */

/* 1. Design Tokens */
:root {
    --primary: #4f46e5;
    /* Darkened for accessibility contrast */
    --primary-dark: #3730a3;
    --secondary: #db2777;
    --accent: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;

    --grad-primary: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    --grad-hero: linear-gradient(135deg, #4f46e5 0%, #3730a3 50%, #764ba2 100%);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);

    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 25px;
    --radius-full: 50px;
}

/* 2. Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
    /* Static Reservation for CLS (Hardened in index.php) */
    padding-top: 205px !important;
}

@media (max-width: 991px) {
    body {
        padding-top: 185px !important;
    }
}

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

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* 3. Layout & Header Lock (Nuclear Lock) */
.navbar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 75px !important;
    background: var(--primary) !important;
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--white) !important;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--white) !important;
    font-weight: 600;
    padding: 12px 20px !important;
    /* Increased for Touch Targets (Accessibility) */
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

#header-adsense {
    position: absolute !important;
    top: 75px !important;
    left: 0 !important;
    width: 100% !important;
    height: 110px !important;
    background: var(--white);
    z-index: 1999;
}

/* 4. Hero Section */
.hero-section {
    position: relative;
    background: var(--grad-hero);
    padding: 100px 0 120px;
    min-height: 1200px;
    /* Locked to prevent collapse */
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 2.5rem;
    /* Locked to match Critical CSS exactly to prevent reflow */
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    min-height: 180px;
    /* Lock for CLS */
}

.hero-content .lead {
    font-size: 1.25rem;
    color: var(--white);
    opacity: 1;
    /* Maximum contrast */
    margin-bottom: 2rem;
    min-height: 100px;
    /* Lock for CLS */
}

/* 5. Components: Search Box */
.search-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-height: 500px;
    position: relative;
    z-index: 20;
}

.search-box h2 {
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.form-select,
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* 6. Components: Stats */
.hero-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    min-width: 180px;
    height: 150px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* 7. Listing Cards */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 20px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 30px;
    background: var(--grad-primary);
    border-radius: 3px;
}

.ilan-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    height: 100%;
}

.ilan-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.ilan-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: var(--gray-100);
}

.ilan-card .card-body {
    padding: 1.5rem;
}

.ilan-card .card-title {
    font-weight: 700;
    margin-bottom: 10px;
}

/* 8. Modern Buttons */
.btn {
    border-radius: var(--radius-full);
    padding: 12px 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--grad-primary);
    border: none;
    color: var(--white);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

/* 9. Footer */
.footer-modern {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 40px;
    margin-top: 100px;
    position: relative;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    display: block;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    display: block;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 10. Utilities */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

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

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Animations Suppressed for ATF Stability */
@media (prefers-reduced-motion: no-preference) {

    .ilan-card,
    .btn,
    .nav-link {
        transition: all 0.3s ease;
    }
}