/* =======================================================
   FERRY.CSS - SEYAHAT VE FERİBOT ROTALARI STİL DOSYASI
   (Final Sürüm: Editör Görünümüyle Birebir Uyumlu)
   ======================================================= */

:root {
    --ferry-primary: #006994;       /* Ana Marka Rengi (Mavi) */
    --ferry-secondary: #004e6e;     /* Koyu Ton */
    --ferry-accent: #e74c3c;        /* Vurgu Rengi (Kırmızı) */
    --ferry-heading: #1a202c;       /* Başlık Rengi */
    --ferry-text: #374151;          /* Metin Rengi (Daha koyu gri) */
    --ferry-meta: #718096;          /* Meta Bilgi Rengi */
    --ferry-bg: #f8fafc;            /* Sayfa Arka Planı */
    --ferry-card-bg: #ffffff;       /* Kart Arka Planı */
    --ferry-border: #e2e8f0;        /* Kenarlıklar */
    --radius: 10px;                 /* Köşe Yumuşaklığı */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.08);
}

/* Genel Sayfa Ayarları */
body {
    background-color: var(--ferry-bg);
    color: var(--ferry-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5; /* Satır yüksekliği biraz düşürüldü */
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--ferry-primary); }

/* =========================================
   1. LAYOUT (GENEL İSKELET)
   ========================================= */
.fd-wrapper {
    max-width: 1200px; /* Okunabilirlik için ideal genişlik */
    margin: 30px auto 60px;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* SOL KOLON (ANA İÇERİK) */
.fd-main {
    flex: 3;
    width: 100%;
    min-width: 0;
}

/* SAĞ KOLON (SIDEBAR) */
.fd-sidebar {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

/* Mobil Uyumluluk */
@media (max-width: 992px) {
    .fd-wrapper { flex-direction: column; }
    .fd-sidebar { width: 100%; min-width: auto; position: static; }
}

/* =========================================
   2. LİSTELEME SAYFASI (feribot-seferleri.php)
   ========================================= */

.ferry-list-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ferry-border);
}

.ferry-breadcrumb {
    font-size: 0.85rem;
    color: var(--ferry-meta);
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ferry-breadcrumb a:hover { color: var(--ferry-primary); }
.ferry-breadcrumb i { font-size: 0.7rem; opacity: 0.6; }

.ferry-page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ferry-heading);
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.ferry-page-desc {
    font-size: 1rem;
    color: var(--ferry-text);
    opacity: 0.9;
    max-width: 800px;
    margin-bottom: 20px;
}

/* Kategori Filtreleri */
.port-scroll-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
}
.port-scroll-wrapper::-webkit-scrollbar { height: 3px; }
.port-scroll-wrapper::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.port-btn {
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid var(--ferry-border);
    color: var(--ferry-meta);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.port-btn:hover, .port-btn.active {
    background: var(--ferry-primary);
    color: #fff;
    border-color: var(--ferry-primary);
    box-shadow: 0 3px 8px rgba(0, 105, 148, 0.2);
}

/* Rota Kartları Grid */
.ferry-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
@media (max-width: 768px) { .ferry-list-grid { grid-template-columns: 1fr; } }

/* Rota Kartı */
.f-card {
    background: var(--ferry-card-bg);
    border: 1px solid var(--ferry-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column; height: 100%;
    transition: all 0.2s ease;
}
.f-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--ferry-primary);
}

.f-thumb {
    position: relative; height: 200px; overflow: hidden;
    background: #e2e8f0;
}
.f-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.f-card:hover .f-thumb img { transform: scale(1.05); }

.f-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--ferry-heading);
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; padding: 4px 10px;
    border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 5px;
}

.f-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.f-meta-row {
    font-size: 0.8rem; color: var(--ferry-meta); margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}

.f-title {
    font-size: 1.2rem; font-weight: 700; color: var(--ferry-heading);
    margin-bottom: 10px; line-height: 1.3;
}
.f-title a:hover { color: var(--ferry-primary); }

.f-excerpt {
    font-size: 0.9rem; color: var(--ferry-text); margin-bottom: 15px;
    flex: 1; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.f-footer {
    padding-top: 15px; border-top: 1px solid var(--ferry-bg);
    display: flex; justify-content: space-between; align-items: center;
}

.btn-f-read {
    font-size: 0.85rem; font-weight: 600; color: var(--ferry-primary);
    display: flex; align-items: center; gap: 5px;
}
.btn-f-read:hover { gap: 8px; }

/* =========================================
   3. DETAY SAYFASI (ferry-detay.php)
   ========================================= */

/* Detay Başlığı */
.fd-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--ferry-heading);
    line-height: 1.2;
    margin-bottom: 15px;
}

/* Meta Bilgiler (Hizalı ve Sıkı) */
.fd-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ferry-border);
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: var(--ferry-meta);
}

.fd-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fd-meta-item i { color: var(--ferry-primary); font-size: 1rem; }
.fd-meta-item strong { color: var(--ferry-heading); font-weight: 600; }

/* Hero Slider */
.fd-hero-slider {
    position: relative;
    width: 100%;
    height: 400px; /* Yükseklik biraz daha kompakt yapıldı */
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
    background: #e2e8f0;
    box-shadow: var(--shadow-sm);
}
@media (max-width: 768px) { .fd-hero-slider { height: 250px; } }

.fd-slide {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
    opacity: 0; transition: opacity 0.4s ease-in-out;
    display: none;
}
.fd-slide.active { opacity: 1; display: block; z-index: 2; }

.fd-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
}

.fd-prev, .fd-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #333; font-size: 1rem; cursor: pointer;
    z-index: 10; transition: all 0.2s;
    border: none;
}
.fd-prev:hover, .fd-next:hover { background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.fd-prev { left: 15px; }
.fd-next { right: 15px; }

/* İçindekiler (TOC) - Daha Kompakt */
.fd-toc {
    background: #f1f5f9;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid var(--ferry-primary);
}
.fd-toc-title {
    font-size: 1rem; font-weight: 700; color: var(--ferry-heading);
    margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.fd-toc ul { list-style: none; padding: 0; margin: 0; }
.fd-toc li { margin-bottom: 5px; padding-left: 15px; position: relative; }
.fd-toc li::before {
    content: "•"; color: var(--ferry-primary);
    position: absolute; left: 0; top: 0; font-weight: bold; font-size: 1.2rem; line-height: 1;
}
.fd-toc a { font-weight: 500; font-size: 0.9rem; color: var(--ferry-text); }
.fd-toc a:hover { color: var(--ferry-primary); text-decoration: underline; }

/* =========================================
   İÇERİK ALANI TYPOGRAPHY (Editörle Uyumlu)
   ========================================= */
.fd-content {
    font-size: 1rem; /* 16px Standart */
    line-height: 1.6;
    color: #2d3748;
}

/* Başlıklar - Editördeki gibi Mavi ve Belirgin */
.fd-content h2, .fd-content h3, .fd-content h4 {
    color: var(--ferry-primary); /* Başlıklar Mavi */
    font-weight: 700;
    margin-top: 25px; /* Aşırı boşluklar alındı */
    margin-bottom: 15px;
    line-height: 1.3;
}

.fd-content h2 { font-size: 1.6rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.fd-content h3 { font-size: 1.4rem; }
.fd-content h4 { font-size: 1.2rem; color: var(--ferry-heading); } /* H4 daha koyu olabilir */

/* Paragraflar - Sıkı Aralık */
.fd-content p {
    margin-bottom: 15px; /* 25px yerine 15px */
}

/* Listeler - Editördeki gibi */
.fd-content ul, .fd-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}
.fd-content ul { list-style-type: disc; }
.fd-content ol { list-style-type: decimal; }
.fd-content li { margin-bottom: 5px; }

/* Kalın Yazılar */
.fd-content strong, .fd-content b {
    font-weight: 700;
    color: #000; /* Koyu siyah */
}

/* Resimler */
.fd-content img {
    max-width: 100%; height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
    display: block;
}

/* Tablolar */
.fd-content table {
    width: 100%; border-collapse: collapse; margin-bottom: 20px;
    font-size: 0.95rem;
}
.fd-content th, .fd-content td {
    border: 1px solid #e2e8f0; padding: 10px;
}
.fd-content th { background: #f8fafc; font-weight: 600; color: var(--ferry-primary); }

/* Etiketler */
.fd-tags {
    margin-top: 40px; padding-top: 20px;
    border-top: 1px solid var(--ferry-border);
    display: flex; gap: 8px; flex-wrap: wrap;
}
.fd-tag {
    background: #edf2f7; color: var(--ferry-text);
    padding: 5px 12px; border-radius: 4px;
    font-size: 0.85rem; font-weight: 500; transition: 0.2s;
}
.fd-tag:hover { background: var(--ferry-primary); color: #fff; }

/* =========================================
   4. SIDEBAR WIDGETS
   ========================================= */
.fd-widget {
    background: #fff;
    border: 1px solid var(--ferry-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
}

.fd-widget-title {
    font-size: 1.1rem; font-weight: 700; color: var(--ferry-heading);
    margin-bottom: 15px; padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}
.fd-widget-title::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 40px; height: 2px; background: var(--ferry-primary);
}

/* Bilet Alma Widget (Kırmızı Vurgulu) */
.booking-widget {
    border-top: 4px solid var(--ferry-accent);
}
.booking-widget .fd-widget-title { color: var(--ferry-accent); border-color: #fee2e2; }
.booking-widget .fd-widget-title::after { background: var(--ferry-accent); }

.bw-input {
    width: 100%; padding: 10px 12px;
    border: 1px solid #cbd5e1; border-radius: 6px;
    margin-bottom: 12px; font-size: 0.9rem;
    background: #fff; transition: 0.3s;
}
.bw-input:focus { border-color: var(--ferry-primary); outline: none; }
.bw-label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: var(--ferry-text); }

.btn-sidebar-book {
    width: 100%; padding: 12px;
    background: var(--ferry-accent); color: #fff;
    border: none; border-radius: 6px;
    font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-sidebar-book:hover {
    background: #c0392b; transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

/* Popüler Rotalar (Mini Liste) */
.mini-list { display: flex; flex-direction: column; gap: 15px; }
.mini-item { display: flex; gap: 12px; align-items: flex-start; }
.mini-thumb {
    width: 60px; height: 60px; border-radius: 6px;
    object-fit: cover; flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.mini-info h4 {
    font-size: 0.9rem; font-weight: 600; color: var(--ferry-heading);
    line-height: 1.3; margin: 0 0 4px; transition: 0.2s;
}
.mini-item:hover h4 { color: var(--ferry-primary); }
.mini-meta { font-size: 0.75rem; color: var(--ferry-meta); display: flex; align-items: center; gap: 4px; }

/* Lightbox */
#lightboxModal {
    display: none; position: fixed; z-index: 99999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center; justify-content: center;
}
#lightboxImg {
    max-width: 90%; max-height: 90vh;
    border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn { from {transform: scale(0.9); opacity: 0;} to {transform: scale(1); opacity: 1;} }