/* =======================================================
   JANNAH STYLE BLOCKS (Revised)
   ======================================================= */

/* RENK PALETİ TANIMLARI */
:root {
    --ed-green-dark: #2B542C;
    --ed-blue-dark: #245269;
    --ed-brown-dark: #66512C;
    --ed-red-dark: #843534;

    --ed-green-light: #DFF0D8;
    --ed-blue-light: #D9EDF7;
    --ed-yellow-light: #FCF8E3;
    --ed-red-light: #F2DEDE;

    --color-text: #333;
    --color-text-secondary: #666;

    --ed-border-radius: 10px;
}

/* GENEL BLOK YAPISI */
.home-blocks-wrapper {
    padding: 0;
    background: transparent;
}

/* SECTION BACKGROUNDS - AYRIŞTIRMA */
.section-block {
    padding: 5rem 0 !important;
    /* İç boşluk (ferahlık için) - Tüm bölümler eşit */
    margin: 0;
    /* Dış boşluk YOK - SIFIR */
    width: 100%;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.section-block:nth-child(odd) {
    background: #ffffff;
}

.section-block:nth-child(even) {
    background: #fdfdfd;
    /* Çok hafif gri ton */
}

/* Footer üzerindeki son bölüm her zaman beyaz olmalı */
.home-blocks-wrapper .section-block:last-child {
    background: #ffffff !important;
    border-bottom: none !important;
}

.block-header {
    border-bottom: 3px solid var(--ed-green-dark);
    margin-bottom: 25px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.block-title {
    background: var(--ed-green-dark);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    display: inline-block;
}

.block-title.blue {
    background: var(--ed-blue-dark);
    border-color: var(--ed-blue-dark);
}

.block-title.brown {
    background: var(--ed-brown-dark);
    border-color: var(--ed-brown-dark);
}

.block-title.red {
    background: var(--ed-red-dark);
    border-color: var(--ed-red-dark);
}

.block-header.blue {
    border-color: var(--ed-blue-dark);
}

.block-header.brown {
    border-color: var(--ed-brown-dark);
}

.block-header.red {
    border-color: var(--ed-red-dark);
}

.block-view-all {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #777;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.block-view-all:hover {
    color: var(--ed-green-dark);
    transform: translateX(3px);
}

.block-header.blue .block-view-all i {
    color: var(--ed-blue-dark) !important;
    --fa-primary-color: var(--ed-blue-dark) !important;
    --fa-secondary-color: var(--ed-blue-dark) !important;
}

.block-header.red .block-view-all i {
    color: #843534 !important;
    --fa-primary-color: #843534 !important;
    --fa-secondary-color: #843534 !important;
}

.block-header.blue .block-view-all:hover {
    color: var(--ed-blue-dark);
}

.block-header.red .block-view-all:hover {
    color: var(--ed-red-dark);
}

/* NEW BADGE */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e62117;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(230, 33, 23, 0.3);
    line-height: 1;
}

/* GRID KARTLARI (Most Downloaded Style - Standart) */
.block-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.grid-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: var(--ed-border-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

html.dark .grid-card {
    background: var(--color-bg-secondary);
    border-color: #333;
}

/* Grid card stays static on hover */
.grid-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #eee !important;
}

/* Görsel Alanı */
.grid-card-img {
    height: 150px;
    background: var(--ed-blue-light);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Kategori rengine göre dinamik arka planlar */
.grid-card-img.bg-green {
    background: var(--ed-green-light);
    color: var(--ed-green-dark);
}

.grid-card-img.bg-blue {
    background: var(--ed-blue-light);
    color: var(--ed-blue-dark);
}

.grid-card-img.bg-red {
    background: var(--ed-red-light);
    color: var(--ed-red-dark);
}

.grid-card-img.bg-yellow {
    background: var(--ed-yellow-light);
    color: var(--ed-brown-dark);
}

.grid-card-img i {
    font-size: 4rem;
    color: inherit;
    /* Inherit from bg-* parent */
    --fa-primary-color: currentColor;
    --fa-secondary-color: currentColor;
    --fa-secondary-opacity: 0.4;
    transition: transform 0.6s ease-in-out !important;
    display: inline-block;
}

.grid-card:hover .grid-card-img i {
    transform: rotate(360deg) !important;
}

.grid-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.grid-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    line-height: 1;
    /* Match badge line-height */
}

.grid-card-cat.green {
    background: var(--ed-green-dark);
    color: var(--ed-green-light);
}

.grid-card-cat.blue {
    background: var(--ed-blue-dark);
    color: var(--ed-blue-light);
}

.grid-card-cat.red {
    background: var(--ed-red-dark);
    color: var(--ed-red-light);
}

.grid-card-cat.yellow {
    background: var(--ed-brown-dark);
    color: var(--ed-yellow-light);
}

/* Colors handled above by class */

.grid-card-cat:hover {
    background: #fff;
    transform: translateY(-1px);
}

.grid-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--color-text);
}

.grid-card-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.grid-card-title a:hover {
    color: var(--ed-blue-dark);
}

.grid-card-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.grid-card-meta i {
    margin-right: 5px;
    color: inherit;
    --fa-primary-color: currentColor;
    --fa-secondary-color: currentColor;
}

/* Category Specific Meta Icon Colors */
.grid-card.green .grid-card-meta i {
    color: var(--ed-green-dark);
}

.grid-card.blue .grid-card-meta i {
    color: var(--ed-blue-dark);
}

.grid-card.red .grid-card-meta i {
    color: var(--ed-red-dark);
}

.grid-card.yellow .grid-card-meta i {
    color: var(--ed-brown-dark);
}

/* Adjust meta color per section if needed, or keep discrete */
.block-header.blue~.block-grid-4 .grid-card-meta i {
    color: var(--ed-blue-dark);
}

.block-header.red~.block-grid-4 .grid-card-meta i {
    color: var(--ed-red-dark);
}


/* YENİ KATEGORİ LİSTESİ (Grid Icon Box) */
.category-box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.cat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px 15px;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    height: 100%;
}

/* Category box stays static on hover */
.cat-box:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #e0e0e0 !important;
}

.cat-box-icon {
    width: 60px;
    height: 60px;
    background: var(--ed-green-light);
    /* Varsayılan */
    color: var(--ed-green-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 15px;
    transition: transform 0.6s ease-in-out !important;
}

.cat-box:hover .cat-box-icon {
    transform: rotate(360deg) !important;
}

.cat-box.blue .cat-box-icon {
    background: var(--ed-blue-light);
    color: var(--ed-blue-dark);
}

.cat-box.red .cat-box-icon {
    background: var(--ed-red-light);
    color: var(--ed-red-dark);
}

.cat-box.yellow .cat-box-icon {
    background: var(--ed-yellow-light);
    color: var(--ed-brown-dark);
}

/* Removed conflicting transform */

.cat-box-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

/* Liste Kartları (Sidebar Tipi) */
.list-card-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.list-card-item:last-child {
    border-bottom: none;
}

.list-card-img {
    width: 80px;
    height: 60px;
    background: #f4f4f4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    flex-shrink: 0;
}

.list-card-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.4;
}

.list-card-content h4 a {
    color: #333;
    text-decoration: none;
}

.list-card-content h4 a:hover {
    color: var(--ed-green-dark);
}

.list-card-date {
    font-size: 0.75rem;
    color: #999;
}