﻿/* ============================================================
   🌿 TARIM HİZMETLERİ PORTALI STİL DOSYASI (2025 Revizyon)
   ============================================================ */

/* === 1. DEĞİŞKENLER VE TEMEL RESET === */
:root {
    --primary-red: #E30A17;
    --secondary-red: #B50C14;
    --accent-turquoise: #009CA6;
    --earth-green: #245C4F;
    --bg-light: #F5F6F7;
    --text-dark: #1F2A2E;
    --text-gray: #5C6A72;
    --border-light: #E2E5E7;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
    scroll-timeline: auto;
    scroll-snap-type: y proximity;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === 2. GENEL YAPI === */
body {
    background: linear-gradient(135deg, #ffffff 0%, #f3f5f6 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
}

/* === 3. HEADER BANNER === */
.header-banner {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: white;
    padding: 2.5rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

    .header-banner::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -10%;
        width: 450px;
        height: 450px;
        background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
        border-radius: 50%;
    }

.header-content {
    position: relative;
    z-index: 1;
}

.header-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

.ministry-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

    .ministry-logo i {
        color: var(--primary-red);
        font-size: 1.8rem;
    }

/* === 4. ARAMA PANELİ === */
.search-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.search-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--earth-green);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .search-label i {
        color: var(--accent-turquoise);
    }

.search-input-group {
    display: flex;
    align-items: stretch;
    background: var(--bg-light);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

    .search-input-group:focus-within {
        border-color: var(--accent-turquoise);
        box-shadow: 0 0 0 4px rgba(0,156,166,0.1);
    }

.search-icon {
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    color: var(--text-gray);
}

#searchInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
}

    #searchInput::placeholder {
        color: #A0A8AE;
    }

#clearSearch {
    background: transparent;
    border: none;
    padding: 0 1.25rem;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

    #clearSearch:hover {
        color: var(--accent-turquoise);
    }

.search-results-info {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    display: none;
}

    .search-results-info.active {
        display: block;
    }

/* === 5. SECTIONS === */
.section-wrapper {
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-out;
}

    .section-wrapper.hidden {
        display: none;
    }

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-turquoise), var(--earth-green));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* === 6. SERVICE CARDS (GRID DOSTU, EŞİT YÜKSEKLİK) === */

/* Bootstrap grid yapısını bozma */
.section-wrapper .row.g-4 {
    display: block;
}

    /* Kolonları esnek hale getir (eşit yükseklik için) */
    .section-wrapper .row.g-4 > [class*="col-"] {
        display: flex;
    }

/* Kart yapısı */
.service-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
    height: 100%;
}

    /* Üst çizgi efekti */
    .service-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: #245C4F;
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .service-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent-turquoise);
        box-shadow: var(--shadow-lg);
    }

        .service-card:hover::before {
            transform: scaleX(1);
        }

/* Bağlantı (kart tamamı tıklanabilir) */
.service-link {
    display: block;
    text-decoration: none;
    color: inherit;
    outline: none;
}

    .service-link:focus,
    .service-link:active {
        outline: none;
        box-shadow: none;
    }

/* Simge alanı */
.card-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(0,156,166,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-turquoise);
    transition: color 0.3s ease;
}

.service-card:hover .card-icon-wrapper {
    background: linear-gradient(135deg, var(--accent-turquoise), var(--earth-green));
    transform: scale(1.1);
}

.service-card:hover .card-icon {
    color: white;
}

/* Başlık ve açıklama */
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-gray);
    flex-grow: 1;
}

/* Alt ok efekti */
.card-arrow {
    margin-top: 1rem;
    color: var(--accent-turquoise);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* === 7. NO MATCH MESAJI === */
#noMatchMessage {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

    #noMatchMessage i {
        font-size: 3rem;
        color: var(--primary-red);
        margin-bottom: 1rem;
    }

    #noMatchMessage h4 {
        color: var(--text-dark);
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    #noMatchMessage p {
        color: var(--text-gray);
    }

/* === 8. İSTATİSTİK KARTLARI === */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* === 9. TARIM BANNER === */
.tarim-banner {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    padding: 1rem 0;
    border-bottom: 4px solid #e2e5e7;
    color: white;
}

.tarim-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tarim-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    text-align: center;
}

.tarim-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarim-logo-img {
    width: 140px;
    transition: transform 0.3s ease;
}

    .tarim-logo-img:hover {
        transform: scale(1.05);
    }

.tarim-text-block {
    max-width: 600px;
}

.tarim-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.tarim-subtitle {
    font-size: 1.1rem;
    color: #f5f5f5;
}

/* === 10. ANİMASYON, ERİŞİLEBİLİRLİK & RESPONSIVE === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FOCUS görünümü - sadece klavye ile erişimde */
.service-card:focus-within:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

.service-card:focus-within:focus-visible {
    outline: 3px solid var(--accent-turquoise);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--accent-turquoise);
    outline-offset: 4px;
    border-radius: 12px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .header-title {
        font-size: 1.75rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tarim-header-content {
        flex-direction: column;
        gap: 0.8rem;
    }

    .tarim-title {
        font-size: 1.6rem;
    }

    .tarim-logo-img {
        width: 110px;
    }
}

@media (max-width: 576px) {
    .header-banner {
        padding: 2rem 0;
    }

    .header-title {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .header-subtitle {
        font-size: 1rem;
        text-align: center;
    }

    .search-container {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}
