﻿:root {
    --yellow: #FFD700;
    --dark: #000000;
    --gray: #1a1a1a;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #fff;
    overflow-x: hidden;
}



.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sayfanın en üstünde oluşan beyaz boşluğu kaldırır */
body {
    margin: 0;
    padding: 0;
    padding-top: 0; /* Eğer burada bir değer varsa mutlaka 0 yapın */
    overflow-x: hidden;
    width: 100%;
}

/* Header sabitlendikten sonra altındaki elemanla çakışmaması için 
   pozisyon ayarlarını netleştirelim */
.main-header {
    background: var(--dark);
    padding: 15px 0;
    border-bottom: 2px solid var(--yellow);
    position: sticky; /* fixed yerine sticky kullanmak beyaz boşluk riskini azaltır */
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Üst barın (Sarı bar) yerleşimi */
.top-emergency-bar {
    background: var(--yellow);
    padding: 8px 0;
    text-align: center;
    font-weight: 800;
    position: relative; /* Hero ile yapışık olması için */
    z-index: 1001;
}

/* Hero Section'ın üst barla sıfıra sıfır birleşmesi için */
.hero-section {
    margin-top: 0;
    position: relative;
}
/* Header sabitlendiği için hero kısmının altında kalmaması için boşluk ekle */

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    color: var(--white);
    font-size: 1.5rem;
}

    .logo-text span {
        color: var(--yellow);
    }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-whatsapp {
    background: #25D366;
    padding: 8px 15px;
    border-radius: 5px;
    color: #fff !important;
}

/* Hero */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/hero.jpg');
    background-size: cover;
    height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
}

    .hero-section h2 {
        font-size: 3rem;
        color: var(--yellow);
        margin-bottom: 15px;
    }

/* Hizmetler */
.section-padding {
    padding: 80px 0;
}

.section-main-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-box {
    background: #fff;
    padding: 30px;
    text-align: center;
    border-bottom: 5px solid var(--yellow);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

    .service-box i {
        font-size: 3rem;
        color: var(--yellow);
        margin-bottom: 15px;
    }

/* Galeri */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: #fff;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.yellow {
    color: var(--yellow);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.8rem;
}

/* Mobil Menü */
.menu-toggle {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark);
        z-index: 1000;
    }

        .main-nav.active {
            display: block;
        }

        .main-nav ul {
            flex-direction: column;
            padding: 20px;
        }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

    .hero-btns .btn {
        padding: 15px 35px;
        border-radius: 5px;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 10px; /* İkon ile metin arasındaki boşluk */
        transition: all 0.3s ease;
        text-decoration: none;
    }

/* Hemen Ara Butonu - Kartvizit Sarısı */
.btn-call {
    background-color: #FFD700;
    color: #000;
    border: 2px solid #FFD700;
}

    .btn-call:hover {
        background-color: #000;
        color: #FFD700;
    }

/* Hizmetlerimiz Butonu - Şeffaf / Beyaz Çerçeve */
.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

    .btn-outline:hover {
        background-color: #fff;
        color: #000;
    }

/* İkonların boyutu */
.hero-btns i {
    font-size: 1.1rem;
}
.hero-section {
    position: relative;
    height: 70vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Yumuşak geçiş süresi */
}

    .slide.active {
        opacity: 1;
    }

.hero-content {
    position: relative;
    z-index: 10; /* Yazıların slider üzerinde kalması için */
    text-align: center;
    color: #fff;
}
.hero-section {
    margin-top: 0 !important;
    top: 0 !important;
}
/* Önceki CSS'ine ek olarak şunları güncelle: */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hero-section {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.hero-slider, .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

    .slide.active {
        opacity: 1;
    }

.main-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s;
}

    .main-gallery img:hover {
        transform: scale(1.02);
    }

/* Logo Kapsayıcısı */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 5px; /* Logo ile yazı arasındaki boşluk */
}

/* Şeffaf Logo Görseli */
.logo img {
    height: 100px; /* PC için ideal yükseklik */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Yanındaki "Yılmaz Elektrik" Yazısı */
.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

    .logo-text span {
        color: #FFD700; /* Sarı renk */
        display: block; /* Alt alta durması için (isteğe bağlı) */
        font-size: 1.2rem;
    }

/* --- MOBİL UYUMLULUK (Responsive) --- */

@media (max-width: 768px) {
    .header-flex {
        flex-direction: row; /* Logo ve menü butonu yan yana kalsın */
        justify-content: space-between;
        padding: 10px 0;
    }

    .logo img {
        height: 60px; /* Mobilde logoyu biraz küçültüyoruz */
    }

    .logo-text {
        font-size: 1.1rem; /* Mobilde yazı boyutunu küçültüyoruz */
    }

        .logo-text span {
            font-size: 0.9rem;
            display: inline; /* Mobilde yan yana dursun yer kaplamasın */
            margin-left: 5px;
        }
}
.slide {
    background-size: cover; /* Alanı doldurur */
    background-position: center center; /* Tam merkezi baz alır */
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    /* Resmin netliğini artırmak için tarayıcı filtresi (isteğe bağlı) */
    filter: contrast(1.1) brightness(0.9);
}

/* Eğer resimleriniz çok dikeyse ve PC'de kötü duruyorsa bunu deneyin: */
@media (min-width: 1024px) {
    .slide {
        background-attachment: fixed; /* Parallaks efekti vererek netlik hissi sağlar */
    }
}
/* Logo Kapsayıcı Ayarları */
.logo a {
    display: flex;
    align-items: center; /* Logo ve yazıyı dikeyde ortalar */
    gap: 12px; /* Logo ile yazı arasındaki mesafe */
    text-decoration: none;
}

/* Logo Görseli */
.logo img {
    height:100px; /* PC için yükseklik */
    width: auto;
    border-radius: 4px; /* Hafif yumuşatma */
}

/* Yazı Grubu */
.logo-text-group {
    display: flex;
    flex-direction: column; /* Yazıları alt alta dizer */
    line-height: 1.1;
}

/* BODRUM YILMAZ Kısmı (Beyaz) */
.logo-title {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 1px;
}

/* ELEKTRİK Kısmı (Sarı) */
.logo-subtitle {
    color: #FFD700; /* Kartvizitteki Sarı */
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 3px;
}

/* --- MOBİL UYUMLULUK --- */
@media (max-width: 768px) {
    .logo img {
        height: 45px; /* Mobilde logoyu küçült */
    }

    .logo-title {
        font-size: 1.1rem; /* Mobilde ana başlığı küçült */
    }

    .logo-subtitle {
        font-size: 0.9rem; /* Mobilde alt başlığı küçült */
        letter-spacing: 2px;
    }
}