/* --- MODERN SIDEBAR TASARIMI BAŞLANGIÇ --- */
:root {
    --primary-color: #1D4ED8;
    --secondary-color: #047857;
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --text-color: #E5E7EB;
    --title-color: #FFFFFF;
    --light-bg-color: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
    /* Sidebar içerikleri için daha iyi kontrast: koyu overlay */
    --overlay-dark: rgba(0, 0, 0, 0.35);
}

/* WordPress standart kapsayıcılarına uyumluluk */
.sidebar .widget,
.widget-area .widget,
#secondary .widget {
    position: relative;
    /* Koyulaştırılmış zemin: gradient + dark overlay */
    background: linear-gradient(var(--overlay-dark), var(--overlay-dark)), var(--gradient);
    border-radius: 24px;
    padding: 25px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    overflow: hidden;
}

.sidebar .widget::before,
.widget-area .widget::before,
#secondary .widget::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    border-radius: 26px;
}

.sidebar .widget:hover,
.widget-area .widget:hover,
#secondary .widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.sidebar .widget-title,
.widget-area .widget-title,
#secondary .widget-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--title-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: none;
    position: relative;
}

.sidebar .widget-title::after,
.widget-area .widget-title::after,
#secondary .widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.sidebar .widget ul,
.widget-area .widget ul,
#secondary .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Son yazılar */
.sidebar .widget_recent_entries ul li a,
.widget-area .widget_recent_entries ul li a,
#secondary .widget_recent_entries ul li a {
    text-decoration: none;
    color: var(--title-color);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.sidebar .widget_recent_entries ul li a:hover,
.widget-area .widget_recent_entries ul li a:hover,
#secondary .widget_recent_entries ul li a:hover {
    color: var(--title-color);
    background-color: var(--light-bg-color);
    transform: translateX(5px);
}

.sidebar .widget_recent_entries ul li a::before,
.widget-area .widget_recent_entries ul li a::before,
#secondary .widget_recent_entries ul li a::before {
    content: '›';
    font-size: 20px;
    line-height: 1;
    margin-right: 8px;
    color: var(--title-color);
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.sidebar .widget_recent_entries ul li a:hover::before,
.widget-area .widget_recent_entries ul li a:hover::before,
#secondary .widget_recent_entries ul li a:hover::before {
    transform: scale(1.2);
}

/* Kategoriler */
.sidebar .widget_categories ul,
.widget-area .widget_categories ul,
#secondary .widget_categories ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar .widget_categories ul li a,
.widget-area .widget_categories ul li a,
#secondary .widget_categories ul li a {
    background-color: var(--light-bg-color);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar .widget_categories ul li a:hover,
.widget-area .widget_categories ul li a:hover,
#secondary .widget_categories ul li a:hover {
    border-color: var(--title-color);
    color: var(--title-color);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Arama */
.sidebar .widget_search .search-form,
.widget-area .widget_search .search-form,
#secondary .widget_search .search-form {
    position: relative;
    /* Üstten boşluk: widget içeriği kenara yapışmasın */
    margin-top: 16px;
}

/* Arama etiketini görsel olarak gizle (ekran okuyucular için erişilebilir kalır) */
.sidebar .widget_search .search-form label,
.widget-area .widget_search .search-form label,
#secondary .widget_search .search-form label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sidebar .widget_search .search-field,
.widget-area .widget_search .search-field,
#secondary .widget_search .search-field {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 45px 12px 15px;
    outline: none;
    width: 100%;
    /* Daha koyu input zemini */
    background: rgba(0,0,0,0.35);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--title-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.sidebar .widget_search .search-field::placeholder,
.widget-area .widget_search .search-field::placeholder,
#secondary .widget_search .search-field::placeholder {
    color: var(--text-color);
    opacity: 0.8;
}

.sidebar .widget_search .search-field:focus,
.widget-area .widget_search .search-field:focus,
#secondary .widget_search .search-field:focus {
    border-color: var(--title-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.sidebar .widget_search .search-submit,
.widget-area .widget_search .search-submit,
#secondary .widget_search .search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-bg-color);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Buton metnini gizle, sadece ikon göster */
    font-size: 0;
    line-height: 0;
}

/* input[type=submit] için metni gizle ve arka plana ikon yerleştir */
.sidebar .widget_search input.search-submit,
.widget-area .widget_search input.search-submit,
#secondary .widget_search input.search-submit {
    color: transparent;
    text-indent: -9999px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
}

.sidebar .widget_search .search-submit:hover,
.widget-area .widget_search .search-submit:hover,
#secondary .widget_search .search-submit:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Arama butonuna SVG büyüteç ikonu ekle (metin gizli) */
.sidebar .widget_search .search-submit::before,
.widget-area .widget_search .search-submit::before,
#secondary .widget_search .search-submit::before {
    content: '';
    width: 16px;
    height: 16px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
}

/* Erişilebilirlik: ekran okuyucu metnini görsel olarak gizle */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* --- Gutenberg blok arama için uyumluluk --- */
/* Kap: üst boşluk ve düzen */
.sidebar .widget .wp-block-search,
.widget-area .widget .wp-block-search,
#secondary .widget .wp-block-search {
    margin-top: 16px;
}

/* Etiketi gizle (ekran okuyucu için erişilebilir kalsın) */
.sidebar .widget .wp-block-search__label,
.widget-area .widget .wp-block-search__label,
#secondary .widget .wp-block-search__label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* İç sarmalayıcı: hizalama */
.sidebar .widget .wp-block-search__inside-wrapper,
.widget-area .widget .wp-block-search__inside-wrapper,
#secondary .widget .wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Girdi alanı: mevcut arama alanı stiliyle eşleştir */
.sidebar .widget .wp-block-search__input,
.widget-area .widget .wp-block-search__input,
#secondary .widget .wp-block-search__input {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 45px 12px 15px;
    outline: none;
    width: 100%;
    background: rgba(0,0,0,0.35);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--title-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.sidebar .widget .wp-block-search__input::placeholder,
.widget-area .widget .wp-block-search__input::placeholder,
#secondary .widget .wp-block-search__input::placeholder {
    color: var(--text-color);
    opacity: 0.8;
}

.sidebar .widget .wp-block-search__input:focus,
.widget-area .widget .wp-block-search__input:focus,
#secondary .widget .wp-block-search__input:focus {
    border-color: var(--title-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Buton: metni gizle, ikon göster */
.sidebar .widget .wp-block-search__button,
.widget-area .widget .wp-block-search__button,
#secondary .widget .wp-block-search__button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-bg-color);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0; /* metni gizle */
    line-height: 0;
}

.sidebar .widget .wp-block-search__button:hover,
.widget-area .widget .wp-block-search__button:hover,
#secondary .widget .wp-block-search__button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Buton için büyüteç ikonu */
.sidebar .widget .wp-block-search__button::before,
.widget-area .widget .wp-block-search__button::before,
#secondary .widget .wp-block-search__button::before {
    content: '';
    width: 16px;
    height: 16px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
}

/* --- İlgili Hesaplamalar listesini Son Yazılar ile uyumlu yap --- */
.sidebar .calculators-list li a,
.widget-area .calculators-list li a,
#secondary .calculators-list li a {
    text-decoration: none;
    color: var(--title-color);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.sidebar .calculators-list li a:hover,
.widget-area .calculators-list li a:hover,
#secondary .calculators-list li a:hover {
    color: var(--title-color);
    background-color: var(--light-bg-color);
    transform: translateX(5px);
}

/* İkon varsa aralığı ayarla */
.sidebar .calculators-list li a i,
.widget-area .calculators-list li a i,
#secondary .calculators-list li a i {
    margin-right: 8px;
    opacity: 0.85;
}
/* --- MODERN SIDEBAR TASARIMI BİTİŞ --- */