﻿/* --- TEMEL AYARLAR VE RENKLER --- */
:root {
    --primary-color: #003366; /* Kurumsal lacivert */
    --secondary-color: #00a8ff; /* Açık mavi detaylar */
    --text-color: #333;
    --bg-light: #f4f4f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* --- ÜST MENÜ (HEADER) --- */
header {
    background-color: #003366;
    padding: 15px 0;
    color: white;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto; /* Sayfayı ortalar ama içindekileri değil */
    display: flex;
    justify-content: space-between; /* Logo sola, Menü sağa */
    align-items: center;
    padding: 0 20px;
}

/* Logo Alanı */
.logo-text {
    text-align: left;
    font-weight: bold;
    font-size: 22px;
    line-height: 1.1;
}

.logo-text span {
    color: #00a8ff;
    display: block;
    font-size: 16px;
    letter-spacing: 1px;
}

/* Menü Linkleri */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px; /* Butonlar arası boşluk */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    padding: 5px 10px;
    transition: 0.3s ease;
}

nav ul li a:hover {
    color: #00a8ff;
}
/* --- YENİ DİNAMİK SLIDER BÖLÜMÜ --- */
.slider-container {
    position: relative;
    height: 80vh;
    overflow: hidden;
    background: var(--primary-color);
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Yumuşak geçiş efekti */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    z-index: 1;
}

/* Resimlerin üzerine siyah/lacivert bir karartma */
.slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 51, 102, 0.6); 
    z-index: 2;
}

.slide.active {
    opacity: 1;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 4;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #007bb5;
}

/* Slider Yön Okları */
.slider-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: rgba(0,0,0,0.3);
    border: none;
    z-index: 10;
}
.slider-btn.next { right: 0; border-radius: 3px 0 0 3px; }
.slider-btn.prev { left: 0; }
.slider-btn:hover { background-color: rgba(0,0,0,0.8); }

/* --- HİZMETLER VE DİĞER KISIMLAR --- */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* --- HİZMET KARTLARI VE DALGA ANİMASYONU (BÜYÜK DALGA) --- */
.card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
    border-bottom: none; 
}

.card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    transition: all 0.4s ease;
}

.card:hover::after {
    height: 26px; /* Dalganın yüksekliğini 12px'den 26px'e çıkardık */
    width: 200%; 
    background-color: transparent;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 120 28" xmlns="http://www.w3.org/2000/svg"><path d="M0,28 C15,28 15,0 30,0 C45,0 45,28 60,28 C75,28 75,0 90,0 C105,0 105,28 120,28 L120,28 L0,28 Z" fill="%2300a8ff"/></svg>');
    background-size: 120px 26px; /* Dalgalar daha geniş, yayvan ve dolgun oldu */
    animation: waveAnimation 1.5s linear infinite; /* Hareketi biraz daha ağırlaştırdık, daha zarif akacak */
}

.card:hover {
    transform: translateY(-5px);
}

/* Kusursuz döngü için translateX değeri background-size genişliği ile aynı olmalı (-120px) */
@keyframes waveAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-120px); } 
}
footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

/* --- YAZI ANİMASYONLARI --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px); /* 40 piksel aşağıdan başlar */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* Normal konumuna gelir */
    }
}

/* Slayt aktif olmadığında yazıları gizle */
.slide .hero-content h2,
.slide .hero-content p,
.slide .hero-content .btn {
    opacity: 0; 
}

/* Slayt aktif olduğunda yazıları sırayla canlandır */
.slide.active .hero-content h2 {
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide.active .hero-content p {
    animation: fadeInUp 0.8s ease-out 0.3s forwards; /* 0.3 sn gecikmeli başlar */
}

.slide.active .hero-content .btn {
    animation: fadeInUp 0.8s ease-out 0.6s forwards; /* 0.6 sn gecikmeli başlar */
}

/* --- HAMBURGER MENÜ VE MOBİL TASARIM --- */

/* Masaüstünde ikonu gizle */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Mobilde göster */
        z-index: 1001;
    }

    /* Menü açıldığında X işareti yapma animasyonu */
    #mobile-menu.is-active .bar:nth-child(2) { opacity: 0; }
    #mobile-menu.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #mobile-menu.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    header nav {
        position: fixed;
        top: 0;
        right: -100%; /* Menü başlangıçta sağda gizli */
        width: 100%;
        height: 100vh;
        background: var(--primary-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s;
        z-index: 1000;
    }

    header nav.active {
        right: 0; /* Menü açıldığında ekrana gelir */
    }

    header nav ul {
        flex-direction: column;
    }

    header nav ul li {
        margin: 20px 0;
    }

    header nav ul li a {
        font-size: 1.5rem;
    }

    /* Slider Yazılarını Mobilde Sığdırma */
    .hero-content h2 { font-size: 1.8rem; padding: 0 15px; }
    .hero-content p { font-size: 0.9rem; padding: 0 15px; }
}
/* --- YENİ DETAY BUTONU TASARIMI --- */
.btn-detay {
    display: inline-block;
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-detay:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: scale(1.05);
}
/* --- GEMİ TAKİBİ HARİTA AYARLARI --- */
.map-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    line-height: 0; /* İframe altındaki boşluğu siler */
}

@media (max-width: 768px) {
    #vesselfinder {
        height: 400px; /* Mobilde harita yüksekliğini biraz azaltıyoruz */
    }
}
document.getElementById('f_yakit').value = v.yakit_ton;
document.getElementById('f_cop').value = v.cop_m3;
document.getElementById('f_cop_turu').value = v.cop_turu;
function exportToExcel() {
    // Tabloyu seçiyoruz
    var table = document.getElementById("opTable");
    var html = table.outerHTML;

    // Excel dosya formatı ve Türkçe karakter desteği (UTF-8) için gerekli meta etiketleri
    var url = 'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(
        '<html><head><meta charset="utf-8"></head><body>' + html + '</body></html>'
    );

    // Dosya indirme işlemi
    var downloadLink = document.createElement("a");
    document.body.appendChild(downloadLink);
    downloadLink.href = url;
    
    // Dosya adını tarihli yapalım (Örn: BAF_Operasyon_2026-04-17.xls)
    var date = new Date().toISOString().slice(0, 10);
    downloadLink.download = 'BAF_Operasyon_' + date + '.xls';
    
    downloadLink.click();
    document.body.removeChild(downloadLink);
}
/* Menü Stilleri */
nav { background: #003366; padding: 15px 0; text-align: center; width: 100%; position: sticky; top: 0; z-index: 1000; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 30px; }
nav ul li a { color: white; text-decoration: none; font-weight: bold; font-size: 15px; transition: 0.3s; }
nav ul li a:hover { color: #00a8ff; }

