<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

include("code/yonlendirme.php");
include("code/baglan.php");
include("code/fonksiyonlar.php");
?>
<!DOCTYPE html>
<html lang="tr">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $title; ?></title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    
    <style>
        body {
            background-color: #f8f6f4;
            color: #4e342e;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        .bg-coffee {
            background-color: #3d251e !important;
        }
        .text-coffee-gold {
            color: #d4af37 !important;
        }
        .text-coffee {
            color: #3d251e !important;
        }
        .btn-coffee {
            background-color: #795548;
            color: white;
            border: none;
            transition: all 0.3s ease;
        }
        .btn-coffee:hover {
            background-color: #5d4037;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        .btn-outline-coffee {
            border: 2px solid #795548;
            color: #795548;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .btn-outline-coffee:hover {
            background-color: #795548;
            color: white;
        }
        .hover-coffee:hover {
            color: #795548 !important;
        }
        .hover-coffee-item {
            transition: all 0.2s ease;
            border-radius: 8px;
            margin-bottom: 4px;
        }
        .hover-coffee-item:hover {
            background-color: #f5ebe0 !important;
            color: #3d251e !important;
            padding-left: 10px !important;
        }
        .dropdown-menu {
            background-color: #3d251e !important;
            border: 1px solid #795548;
            padding: 8px 0;
        }
        .dropdown-item {
            color: #f8f6f4 !important;
            font-weight: 500;
            padding: 8px 20px;
            transition: all 0.2s ease;
        }
        .dropdown-item:hover {
            background-color: #795548 !important;
            color: white !important;
            padding-left: 24px;
        }
    </style>
</head>

<body>
    <?php
    include("code/links.php");
    ?>

    <div id="ilanSlider" class="carousel slide shadow-sm" data-bs-ride="carousel">
        <div class="carousel-indicators">
            <button type="button" data-bs-target="#ilanSlider" data-bs-slide-to="0" class="active"></button>
            <button type="button" data-bs-target="#ilanSlider" data-bs-slide-to="1"></button>
            <button type="button" data-bs-target="#ilanSlider" data-bs-slide-to="2"></button>
        </div>
        <div class="carousel-inner">
            <div class="carousel-item active" style="height:380px; position:relative;">
                <img src="images/slider1.png" class="d-block w-100 h-100" style="object-fit:cover; filter: brightness(45%);" alt="Slider 1">
                <div class="carousel-caption" style="position: absolute; top: 50%; transform: translateY(-50%); bottom: unset; left: 10%; right: 10%;">
                    <h2 class="display-5 fw-bold text-white"><i class="bi bi-cup-hot text-coffee-gold me-2"></i> Barista's Choice Blog</h2>
                    <p class="lead text-white-50">Kahve dünyasından en son haberler, demleme teknikleri ve çekirdek incelemeleri.</p>
                </div>
            </div>
            <div class="carousel-item" style="height:380px; position:relative;">
                <img src="images/slider2.png" class="d-block w-100 h-100" style="object-fit:cover; filter: brightness(45%);" alt="Slider 2">
                <div class="carousel-caption" style="position: absolute; top: 50%; transform: translateY(-50%); bottom: unset; left: 10%; right: 10%;">
                    <h2 class="display-5 fw-bold text-white"><i class="bi bi-book text-coffee-gold me-2"></i> Kahve Kültürü</h2>
                    <p class="lead text-white-50">Nitelikli kahve çekirdekleri, kökenleri ve lezzet profilleri hakkında her şey.</p>
                </div>
            </div>
            <div class="carousel-item" style="height:380px; position:relative;">
                <img src="images/slider3.png" class="d-block w-100 h-100" style="object-fit:cover; filter: brightness(45%);" alt="Slider 3">
                <div class="carousel-caption" style="position: absolute; top: 50%; transform: translateY(-50%); bottom: unset; left: 10%; right: 10%;">
                    <h2 class="display-5 fw-bold text-white"><i class="bi bi-gear text-coffee-gold me-2"></i> Demleme İpuçları</h2>
                    <p class="lead text-white-50">Evde profesyonel V60, Chemex ve Aeropress demleme rehberleri.</p>
                </div>
            </div>
        </div>
        <button class="carousel-control-prev" type="button" data-bs-target="#ilanSlider" data-bs-slide="prev">
            <span class="carousel-control-prev-icon"></span>
        </button>
        <button class="carousel-control-next" type="button" data-bs-target="#ilanSlider" data-bs-slide="next">
            <span class="carousel-control-next-icon"></span>
        </button>
    </div>

    <div class="container mt-4">
    <?php
    include("code/$dosya");
    ?>
    </div>

    <footer class="text-center text-muted bg-coffee py-3 mt-5">
        <div class="container">
            <p class="text-white mb-0">Barista's Choice &copy; 2026 - Kahve ve Kültür Günlüğü</p>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>

    <?php
    mysqli_close($conn);
    ?>
</body>

</html>
