/*
Theme Name: Boğaziçi Teması
Theme URI: https://bogazi.ci/
Author: Sedat Bornovalı
Author URI: https://www.sedat.bornova.li/
Description: Boğaziçi'nin Tarih Atlası kitabı için özel olarak hazırlanmış uydu site teması. sedat-tema ve Ayasofya temasıyla akraba bir tasarım dili kullanır. Üç dilli (TR/EN/IT) yapıya hazırdır.
Version: 1.9.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bogazici-tema
*/

/* ============================================
   1. CSS DEĞİŞKENLERİ
   ============================================ */
:root {
    --primary-color: #003366;
    --primary-color-hover: #002244;
    --accent-color: #2c5f7c;
    --gold-line-color: #d1ad60;
    --gold-line-hover: #b8924d;
    --text-color: #2a2826;
    --text-soft: #555555;
    --text-muted: #888888;
    --bg-color: #f5f1e8;
    --bg-soft: #ffffff;
    --bg-dark: #080808;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-heading: 'Cardo', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-width: 1320px;
    --section-spacing: 80px;
    --header-height: 80px;
    --header-height-mobile: 64px;
}

/* ============================================
   2. RESET & TEMEL
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-line-color); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}
p { margin-bottom: 1em; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================
   3. ANA SAYFA — Tek ekran kompozisyon
   ============================================ */
body.home .site-footer {
    display: none;
}

@media (min-width: 1025px) {
    body.home {
        height: 100vh;
        overflow: hidden;
    }
}

/* ============================================
   4. SİTE HEADER — Transparan, panellerin üstünde
   ============================================ */
.site-header-inner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    padding: 0 32px;
    background: linear-gradient(
        to bottom,
        rgba(5, 5, 5, 0.92) 0%,
        rgba(5, 5, 5, 0.78) 45%,
        rgba(5, 5, 5, 0.45) 75%,
        rgba(5, 5, 5, 0.05) 100%
    );
    border-bottom: none;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 36px;
}

.header-group-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.book-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.book-logo:hover { color: var(--gold-line-color); }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #d6d6d6;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
}
.lang-switch span { opacity: 0.6; }
.lang-switch a { color: #d6d6d6; text-decoration: none; transition: var(--transition); }
.lang-switch a:hover { color: var(--gold-line-color); }
.lang-switch a.active { color: #ffffff; font-weight: 900; }

.header-group-center { justify-self: center; }

.social-icons-row {
    display: flex;
    align-items: center;
    gap: 22px;
}
.social-icons-row a {
    color: #ededed;
    font-size: 1.25rem;
    line-height: 1;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.social-icons-row a:hover { color: var(--gold-line-color); transform: translateY(-2px); }

.header-group-right { justify-self: end; }

.main-navigation {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0; padding: 0;
    align-items: center;
}
.main-navigation li { list-style: none; }
.main-navigation a {
    color: #eaeaea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition);
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--gold-line-color);
    border-bottom-color: var(--gold-line-color);
}

/* ============================================
   5. AKORDEON ANA SAYFA
   ============================================ */
.accordion-container {
    display: flex;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.panel {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    border-right: 8px solid #000;
}

.panel:last-child { border-right: none; }

/* Panel-spesifik görsel davranışı */
.panel.author-panel {
    background-position: center 20%;
}

.panel.book-panel {
    background-position: 55% 35%;
    background-size: cover;
}

.panel.blog-panel {
    /* Latince el yazması: sol-üstteki süslü "A" ve renkli illüstrasyonlar 
       odakta kalsın diye position sol-yukarıya kaydırıldı */
    background-position: 30% 25%;
}

/* Hover: sadece desktop'ta */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .panel:hover {
        flex: 3;
    }
    .panel.book-panel:hover {
        background-position: center 35%;
    }
}

/* Panel alt bandı — koyu gradient */
.panel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14vh;
    min-height: 130px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.55) 35%,
        rgba(0, 0, 0, 0.92) 100%
    );
    padding: 0 2rem;
    transition: opacity 0.4s ease;
    opacity: 0.95;
    z-index: 2;
    pointer-events: none;
}

.panel:hover .panel-overlay { opacity: 1; }

.panel-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background-color: var(--gold-line-color);
    z-index: 10;
}

.media-panel .panel-overlay::before {
    right: auto;
    width: calc(50% - 2rem);
}

.panel h1,
.panel h2,
.section-title,
.author-info h1 {
    position: absolute;
    bottom: 100%;
    left: 2rem;
    margin: 0 0 15px 0;
    padding: 0;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    text-transform: none;
    letter-spacing: normal;
    border: none;
    z-index: 20;
    max-width: calc(100% - 4rem);
}

/* ============================================
   6. MEDYA PANELİ — Alt-grid
   ============================================ */
.media-grid {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.media-cell {
    position: relative;
    height: 25%;
    flex: none;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
    border-bottom: 6px solid #000;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, background-position 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.media-cell:last-child { border-bottom: none; }
.media-cell:hover { box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.35); }

/* ============================================
   6a. DİJİTAL HÜCRE — Akıllı odaklama
   Sedat Bey (yatayda ~%78) ve Kız Kulesi (yatayda ~%48) 
   her aspect ratio'da görünür kalmalı.
   Görsel manzara ratio (1.71); cell aspect değişiyor:
   - Closed desktop cell: ~1.78 (manzara) → tam image yatayda fits
   - Hover-açık desktop cell: ~4 (çok geniş) → image dikey kırpılır, gökyüzü gider
   - Mobile cell: ~1 (kare) → image yatayda kırpılır, focus point kritik
   ============================================ */
.media-cell-digital {
    /* Default: yatayda %60 (Sedat tarafına biraz kayık), 
       dikeyde %62 (gökyüzünden uzak, özneler düzeyinde) */
    background-position: 60% 62%;
}

/* Hover'da panel genişlediğinde cell çok geniş olur (~4:1 oranında).
   Bu durumda image yatayda neredeyse tüm hâliyle görünür, dikey kırpılır.
   Odaklamayı biraz aşağıya kaydırıp özneler bandını yakaladığımıza emin olalım. */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .media-panel:hover .media-cell-digital {
        background-position: 55% 65%;
    }
}

/* Çok dar/kare aspect (mobil) — daha sağa kaydır,
   çünkü image yatayda kırpılırken Sedat'ı kaybetmeyelim */
@media (max-width: 1024px) {
    .media-cell-digital {
        background-position: 65% 60%;
    }
}

@media (max-width: 600px) {
    .media-cell-digital {
        /* Tam genişlikte dikey strip — ortayı tut */
        background-position: 55% 60%;
    }
}

/* ============================================
   6b. ORTAK MEDYA HÜCRE STİLLERİ
   ============================================ */
.media-cell .cell-overlay {
    position: relative;
    z-index: 5;
    pointer-events: none;
}

.cell-cat {
    display: block;
    color: var(--gold-line-color);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    font-family: var(--font-body);
}

.cell-overlay h4 {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1.1;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
    margin: 0;
}

.media-panel { cursor: default; }
.media-panel .panel-overlay { pointer-events: none; }
.media-panel .section-title { z-index: 15; }

/* ============================================
   7. SAYFA İÇERİK
   ============================================ */
.page-content {
    background: var(--bg-color);
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

.content-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--section-spacing) 30px;
}

/* ============================================
   8. FOOTER
   ============================================ */
.site-footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.85);
    padding: 50px 30px 24px;
    text-align: center;
    border-top: 3px solid var(--gold-line-color);
}

.footer-hub-link {
    display: inline-block;
    padding: 13px 32px;
    border: 1px solid var(--gold-line-color);
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--transition);
    margin-bottom: 28px;
}
.footer-hub-link:hover {
    background: var(--gold-line-color);
    color: var(--primary-color);
    border-color: var(--gold-line-color);
}
.footer-meta {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 16px;
    margin-bottom: 0;
}

/* ============================================
   9. MOBİL UYUMLULUK
   ============================================ */
@media (max-width: 1024px) {
    .site-header-inner {
        padding: 0 18px;
        height: var(--header-height-mobile);
    }

    .header-container {
        grid-template-columns: 1fr auto;
        column-gap: 14px;
    }

    .header-group-center,
    .lang-switch {
        display: none;
    }

    .book-logo { font-size: 1.1rem; }

    .main-navigation { gap: 16px; }
    .main-navigation a { font-size: 0.85rem; }

    .accordion-container {
        flex-direction: column;
        height: auto;
        min-height: 0;
        padding-top: var(--header-height-mobile);
    }

    .panel {
        flex: none;
        height: 280px;
        border-right: none;
        border-bottom: 6px solid #000;
    }

    .panel:last-child { border-bottom: none; }

    .panel.author-panel {
        background-position: 50% 25%;
    }

    .panel.book-panel {
        background-position: 55% 35%;
    }

    .panel.blog-panel {
        background-position: 30% 25%;
    }

    .panel-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 1rem 1.5rem 1.25rem;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.92) 0%,
            rgba(0, 0, 0, 0.55) 60%,
            rgba(0, 0, 0, 0) 100%
        );
        opacity: 1;
    }

    .panel-overlay::before {
        display: none;
    }

    .panel h1,
    .panel h2,
    .section-title,
    .author-info h1 {
        position: relative;
        bottom: auto;
        left: auto;
        margin: 0;
        padding-bottom: 8px;
        font-size: 1.7rem;
        font-weight: 400;
        color: #ffffff;
        line-height: 1;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
        border-bottom: 2px solid var(--gold-line-color);
        max-width: 60%;
        display: inline-block;
    }

    .media-panel {
        height: 480px;
    }

    .media-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .media-cell {
        flex: none;
        width: 50%;
        height: 50%;
        border-right: 4px solid #000;
        border-bottom: 4px solid #000;
        padding: 1rem;
    }

    .media-cell:nth-child(even) { border-right: none; }
    .media-cell:nth-last-child(-n+2) { border-bottom: none; }

    .cell-overlay h4 { font-size: 1.05rem; }
    .cell-cat { font-size: 0.65rem; }

    .media-panel .panel-overlay {
        display: none;
    }

    .page-content {
        padding-top: var(--header-height-mobile);
        min-height: calc(100vh - var(--header-height-mobile));
    }
}

@media (max-width: 600px) {
    .header-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header-group-right { display: none; }
    .header-group-left { justify-content: center; }

    .footer-hub-link {
        padding: 11px 22px;
        font-size: 0.82rem;
    }

    .panel { height: 240px; }

    .panel h1,
    .panel h2,
    .section-title,
    .author-info h1 {
        font-size: 1.4rem;
        max-width: 70%;
    }

    .media-cell {
        width: 100%;
        height: 25%;
        border-right: none;
    }

    .media-panel { height: 720px; }
}
