/**
 * İyi Sözler — modern yüzey, tipografi ve mobil footer
 * assets/css/style.css sonrası yüklenir
 */

:root,
html {
    --primary-color: #6d28d9;
    --primary-hover: #5b21b6;
    --primary-color-rgb: 109, 40, 217;
    --primary-color-soft: rgba(109, 40, 217, 0.11);
    --secondary-color: #f3f0fa;
    --text-color: #1e1b24;
    --text-color-light: #5c5666;
    --border-color: rgba(109, 40, 217, 0.14);
    --background-color: #ffffff;
    --background-color-light: #f8f6fc;
    --font-ui: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-quote: "Literata", Georgia, "Times New Roman", serif;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(30, 27, 36, 0.06);
    --shadow-md: 0 8px 24px rgba(30, 27, 36, 0.08);
    --shadow-card: 0 4px 20px rgba(109, 40, 217, 0.07);
    --header-blur: saturate(1.2) blur(12px);
}

html[data-theme="dark"] {
    --primary-color-soft: rgba(196, 181, 253, 0.12);
    --text-color: #ece8f4;
    --text-color-light: #a8a0b8;
    --secondary-color: #1c1824;
    --border-color: rgba(196, 181, 253, 0.15);
    --background-color: #16131d;
    --background-color-light: #1f1b28;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui);
    background: linear-gradient(165deg, #faf8ff 0%, #f3edfc 40%, #f6f4fb 100%);
    background-attachment: fixed;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    /* assets/style.css flex sütun ile uyum; içerik kısayken #site-content şişmesin */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html[data-theme="dark"] body {
    background: linear-gradient(165deg, #121016 0%, #1a1622 50%, #16131d 100%);
    background-attachment: fixed;
}

/* Erişilebilirlik: klavye odağı */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.search-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius-sm) 0;
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    left: 0;
}

#site-content {
    scroll-margin-top: 1rem;
}

/* Az söz: içerik alanı gereksiz büyümesin; min-height:0 footer’ı kesip kaybettirebiliyordu */
#site-content.site-content {
    flex: 0 0 auto;
    width: 100%;
}

.site-footer,
footer.site-footer {
    flex-shrink: 0;
    display: block;
    visibility: visible;
}

/* Header — arka plan yok; sayfa gradient’i doğal devam eder */
.site-header {
    width: 100%;
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
    min-height: clamp(200px, 26vh, 320px);
    padding: clamp(2.25rem, 4.5vw, 3.5rem) 0 clamp(2.75rem, 5.5vw, 4.25rem);
    box-sizing: border-box;
}

html[data-theme="dark"] .site-header {
    background: transparent !important;
}

.header-container {
    max-width: min(1320px, 100%);
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-branding {
    gap: clamp(0.85rem, 2vw, 1.35rem);
}

.site-branding .site-title-text {
    margin: 0;
    padding: 0;
    line-height: 1.15;
}

.site-branding .site-title-text a {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: clamp(1.9rem, 4.8vw, 2.85rem);
    letter-spacing: -0.03em;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-branding .site-title-text a:hover {
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.site-branding .site-title-text a i {
    font-size: 0.85em;
    opacity: 0.9;
}

.quote-count {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-color-light);
    background: var(--primary-color-soft);
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.15rem;
}

.count-number {
    color: var(--primary-color);
    font-weight: 700;
}

/* Ana sarmalayıcı */
.site-wrapper {
    max-width: 1280px;
}

/* Yan sütunlar: beyaz kutu yok, sayfa arka planıyla bütün
   Not: display:flex yalnızca 769px+ — aksi halde mobildeki display:none eziliyordu */
.left-sidebar,
.right-sidebar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0.25rem 0 1rem;
    height: auto;
    max-height: calc(100vh - 2rem);
    top: 1rem;
}

@media (min-width: 769px) {
    .left-sidebar,
    .right-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.15rem;
    }
}

/* Mobilde yan sütunlar kesin gizli (tema + modern çakışmasına karşı) */
@media (max-width: 768px) {
    .site-wrapper .left-sidebar,
    .site-wrapper .right-sidebar {
        display: none !important;
    }
}

/* Masaüstü: sol/sağ sütunları 200px yukarı (grid görünümü) */
@media (min-width: 992px) {
    .site-wrapper .left-sidebar,
    .site-wrapper .right-sidebar {
        margin-top: -200px;
        align-self: start;
    }
}

.sidebar-login,
.sidebar-profile .profile-header {
    background: transparent !important;
    border-radius: var(--radius-md);
    border: none !important;
    box-shadow: none !important;
}

.left-sidebar .profile-header {
    background: transparent !important;
}

.left-sidebar .sidebar-profile {
    margin: 0 !important;
}

.sidebar-login .login-form input {
    background: rgba(255, 255, 255, 0.35);
    border-color: var(--border-color);
}

html[data-theme="dark"] .sidebar-login .login-form input {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
}

/* Sol sidebar: giriş/profil altı rastgele kategoriler */
.sidebar-random-categories__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 1rem 0.45rem;
    flex-wrap: wrap;
}

.sidebar-random-categories__title {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-color-light);
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-random-categories__all {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-random-categories__all:hover {
    text-decoration: underline;
}

.category-tags {
    padding: 0 1rem;
}

.category-tag {
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--primary-color-soft);
    font-weight: 500;
}

.category-tag:hover {
    border-color: var(--primary-color);
}

/* Sağ sidebar arama + trend */
.right-sidebar .search-input {
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.35);
    border-color: var(--border-color);
}

.right-sidebar .search-input:focus {
    background: rgba(255, 255, 255, 0.55);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

html[data-theme="dark"] .right-sidebar .search-input {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .right-sidebar .search-input:focus {
    background: rgba(255, 255, 255, 0.1);
}

.trending-toggle {
    width: 100%;
    font-family: var(--font-ui);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.28) !important;
    color: var(--text-color);
    padding: 0.65rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background 0.2s, border-color 0.2s;
}

.trending-toggle:hover {
    border-color: var(--primary-color);
    background: var(--primary-color-soft) !important;
}

html[data-theme="dark"] .trending-toggle {
    background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .trending-toggle:hover {
    background: var(--primary-color-soft) !important;
}

/* Trend listesi paneli — beyaz kutu kaldır */
.right-sidebar .trending-categories ul {
    background: transparent !important;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.right-sidebar .trending-categories a:hover {
    background: var(--primary-color-soft);
}

.quote-of-the-day {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    /* overflow:hidden alt kalp / like-count gölgesini kesiyordu */
    overflow: visible;
    box-shadow: none;
    background: transparent !important;
    padding: 0.75rem 1rem 1.15rem;
}

.sidebar-login,
.search-form,
.trending-categories,
.sidebar-random-categories,
.category-tags,
.quote-of-the-day {
    margin: 0 !important;
}

.right-sidebar .trending-toggle {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (max-width: 768px) {
    .site-header {
        min-height: clamp(168px, 32vh, 260px);
        padding: clamp(1.75rem, 5vw, 2.5rem) 0 clamp(2.25rem, 6vw, 3.25rem);
    }

    .site-branding .site-title-text a {
        font-size: clamp(calc(1.55rem + 16px), calc(5vw + 16px), calc(2.1rem + 16px));
    }
}

.quote-of-the-day .quote-header h3 {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

.quote-of-the-day blockquote {
    font-family: var(--font-quote);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-color);
}

.right-sidebar .quote-of-the-day .quote-footer {
    margin-top: 0.85rem;
    margin-bottom: 0.15rem;
    padding-bottom: 0.1rem;
}

/* Alıntı kartları (feed) */
.quotes-grid {
    gap: 1.35rem;
}

.quote-card {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.quote-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-color-rgb), 0.35);
}

.soz-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--background-color-light) 0%, transparent 100%);
}

.soz-author-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.soz-category {
    font-weight: 500;
    padding: 0.15rem 0;
}

.soz-action-button {
    border-radius: var(--radius-sm);
}

.soz-content-footer {
    font-family: var(--font-quote);
    font-size: 1.15rem;
    line-height: 1.75;
    padding: 1.25rem 1.35rem 1.5rem;
    color: var(--text-color);
}

.soz-social-share {
    padding: 0.65rem 1.25rem;
    background: var(--background-color-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.soz-social-share .share-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-color-light);
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, var(--background-color-light) 0%, var(--background-color) 100%);
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
}

.footer-column h3 {
    color: var(--primary-color);
    font-family: var(--font-ui);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-column h3::after {
    background: linear-gradient(90deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.35));
    width: 40px;
    height: 3px;
    border-radius: 2px;
}

.footer-bottom-wrapper {
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.footer-links a:hover,
.footer-categories a:hover {
    color: var(--primary-color);
}

/* Mobilde tam footer yerine kompakt: ağır grid gizli, yasal şerit görünsün */
@media screen and (max-width: 768px) {
    .site-footer {
        display: block !important;
        padding: 0;
        margin-bottom: 76px;
    }

    .site-footer .footer-grid {
        display: none;
    }

    .site-footer .footer-bottom-wrapper {
        background: var(--background-color);
        border-top: 1px solid var(--border-color);
    }

    .site-footer .footer-bottom {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem 1rem 0.5rem;
        gap: 0.75rem;
    }

    .site-footer .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.65rem 1rem;
        font-size: 0.82rem;
    }

    .site-footer .footer-copyright {
        font-size: 0.78rem;
        color: var(--text-color-light);
        padding-bottom: 0.5rem;
    }

    .site-content {
        padding-bottom: 88px !important;
    }

    .quote-card {
        border-radius: var(--radius-md);
    }
}

/* Mobil alt menü */
.mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 24px rgba(30, 27, 36, 0.08);
}

.mobile-nav-item {
    font-family: var(--font-ui);
    font-weight: 500;
}

html[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(22, 19, 29, 0.94);
}

.share-quote-btn {
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.35);
}

/* Daha fazla yükle */
.load-more-button {
    border-radius: 999px;
    font-family: var(--font-ui);
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    box-shadow: 0 4px 14px rgba(var(--primary-color-rgb), 0.25);
}

.load-more-button:hover {
    transform: translateY(-2px);
}

/* Ana içerik alanı */
.main-content {
    min-width: 0;
    padding-bottom: clamp(1rem, 3vw, 1.75rem);
}
