/* ================= VARIABLES & RESET ================= */
:root {
    --bg-main: #111111;
    --bg-card: #1A1A1A;
    --bg-darker: #0A0A0A;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --accent: #D60000;
    --accent-hover: #FF2A2A;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 20px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ================= TYPOGRAPHY & UTILITIES ================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); text-transform: uppercase; letter-spacing: -1px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
p { color: var(--text-muted); margin-bottom: 1rem; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: 100px 0; }
.bg-darker { background-color: var(--bg-darker); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: var(--radius);
    font-weight: 600; font-family: var(--font-body);
    cursor: pointer; transition: all 0.3s ease; border: none;
}
.btn-primary { background-color: var(--accent); color: #fff; }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(214,0,0,0.3); }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: #fff; }
.btn-outline:hover { border-color: var(--text-main); background: rgba(255,255,255,0.05); }
.btn-large { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ================= NAVBAR ================= */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 20px 0; transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); padding: 15px 0;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-main { font-family: var(--font-heading); font-size: 1.8rem; letter-spacing: 2px; }
.logo-sub { font-size: 0.7rem; letter-spacing: 4px; color: var(--accent); font-weight: 600; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: 0.95rem; font-weight: 500; position: relative; }
.nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px;
    background: var(--accent); transition: 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; gap: 1rem; }
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; cursor: pointer; }

/* ================= HERO SECTION ================= */
.hero {
    height: 100vh; min-height: 600px; display: flex; align-items: center;
    position: relative; background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(17,17,17,0.95) 0%, rgba(17,17,17,0.7) 100%);
}
.hero-container { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-buttons { display: flex; gap: 1rem; margin-top: 2rem; }
.hero-stats { display: flex; flex-direction: column; gap: 1.5rem; }
.stat-card {
    background: rgba(26, 26, 26, 0.6); backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; text-align: center; transform: translateX(50px); opacity: 0; animation: slideInRight 1s forwards 0.5s;
}
.stat-number { font-family: var(--font-heading); font-size: 3rem; color: var(--accent); }
.stat-plus { font-family: var(--font-heading); font-size: 2rem; color: var(--accent); }
.stat-text { display: block; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }

/* ================= ABOUT SECTION ================= */
.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image { position: relative; border-radius: var(--radius); overflow: hidden; }
.about-image img { width: 100%; height: auto; display: block; transition: transform 0.5s; }
.about-image:hover img { transform: scale(1.05); }
.experience-badge {
    position: absolute; bottom: 20px; right: 20px;
    background: var(--accent); padding: 15px 25px;
    border-radius: var(--radius); font-weight: bold; font-family: var(--font-heading);
}
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.feature-card {
    background: var(--bg-card); padding: 20px; border-radius: var(--radius);
    border: 1px solid var(--border); transition: 0.3s; display: flex; align-items: center; gap: 15px;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.feature-icon { font-size: 1.5rem; }

/* ================= SERVICES SECTION ================= */
.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem auto; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.service-card {
    background: var(--bg-card); padding: 40px 30px; border-radius: var(--radius);
    border: 1px solid var(--border); text-align: center; transition: all 0.4s ease;
}
.service-card:hover {
    transform: translateY(-10px); border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(214,0,0,0.1); background: #1f1f1f;
}
.service-icon { font-size: 3rem; margin-bottom: 20px; display: inline-block; transition: 0.3s; }
.service-card:hover .service-icon { transform: scale(1.2); }

/* ================= PROJECTS GALLERY ================= */
.project-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid var(--border); color: #fff;
    padding: 8px 20px; border-radius: 30px; cursor: pointer; transition: 0.3s;
}
.filter-btn.active, .filter-btn:hover { background: var(--accent); border-color: var(--accent); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }
.project-card { position: relative; border-radius: var(--radius); overflow: hidden; height: 300px; cursor: pointer; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project-overlay {
    position: absolute; bottom: -100%; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(214,0,0,0.9) 0%, rgba(17,17,17,0.2) 100%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 30px;
    transition: bottom 0.4s ease;
}
.project-card:hover img { transform: scale(1.1); }
.project-card:hover .project-overlay { bottom: 0; }
.project-overlay h4 { margin-bottom: 5px; font-size: 1.2rem; }
.project-overlay p { color: #fff; margin: 0; font-size: 0.9rem; }

/* ================= TIMELINE ================= */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after {
    content: ''; position: absolute; width: 2px; background: var(--border);
    top: 0; bottom: 0; left: 50%; margin-left: -1px;
}
.timeline-item { padding: 10px 40px; position: relative; width: 50%; box-sizing: border-box; margin-bottom: 30px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot {
    position: absolute; top: 15px; width: 40px; height: 40px; background: var(--accent);
    border-radius: 50%; z-index: 1; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: bold;
}
.timeline-item:nth-child(odd) .timeline-dot { right: -20px; }
.timeline-item:nth-child(even) .timeline-dot { left: -20px; }
.timeline-content {
    background: var(--bg-card); padding: 25px; border-radius: var(--radius);
    border: 1px solid var(--border); transition: 0.3s;
}
.timeline-content:hover { border-color: var(--accent); transform: translateY(-5px); }

/* ================= FAQ ================= */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-card); margin-bottom: 15px; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.faq-question {
    width: 100%; text-align: left; padding: 20px; background: none; border: none;
    color: #fff; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between;
}
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer p { margin-bottom: 20px; }

/* ================= CONTACT ================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }
.info-card { background: var(--bg-card); padding: 25px; border-radius: 15px; border: 1px solid var(--border); margin-bottom: 1rem; }
.contact-form { background: var(--bg-card); padding: 40px; border-radius: var(--radius); border: 1px solid var(--border); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 15px; background: var(--bg-main); border: 1px solid var(--border);
    color: #fff; border-radius: 10px; font-family: var(--font-body); transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-success-msg { background: rgba(0, 200, 80, 0.1); color: #00e676; padding: 15px; border-radius: 10px; margin-top: 15px; text-align: center; border: 1px solid #00e676; }

/* ================= FOOTER ================= */
.footer { background: #050505; padding: 80px 0 0 0; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 50px; }
.footer h4 { margin-bottom: 20px; font-size: 1.2rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: var(--text-muted); }
.footer ul li a:hover { color: var(--accent); padding-left: 5px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { display: inline-flex; width: 40px; height: 40px; background: var(--bg-card); align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); }
.social-icons a:hover { background: var(--accent); border-color: var(--accent); }
.social-icons svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ================= ANIMATIONS & UTILS (PERFORMANS OPTİMİZELİ) ================= */
.reveal { 
    opacity: 0; 
    /* 3D Transform kullanarak GPU'yu (Ekran Kartı) devreye sokuyoruz */
    transform: translate3d(0, 30px, 0); 
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    /* Tarayıcıya animasyon olacağını önceden haber veriyoruz */
    will-change: opacity, transform; 
}
.reveal.active { 
    opacity: 1; 
    transform: translate3d(0, 0, 0); 
}
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* Görsellerde hover kasmasını önlemek için */
.project-card img, .about-image img {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0); 
}

/* Loading Animasyonu */
#loader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--bg-main); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.4s ease; will-change: opacity; }
.loader-logo { font-family: var(--font-heading); font-size: 2rem; letter-spacing: 5px; margin-bottom: 20px; animation: pulse 1.5s infinite; }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.05); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.5; } }
@keyframes slideInRight { to { transform: translate3d(0, 0, 0); opacity: 1; } }

/* ================= RESPONSIVE & MOBILE MENU ================= */
@media (max-width: 992px) {
    .hero-container, .about-container, .contact-grid { grid-template-columns: 1fr; }
    .hero { text-align: center; padding-top: 100px; }
    .hero-stats { flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .stat-card { transform: translateY(30px); animation: none; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 80px; padding-right: 0; text-align: left !important; }
    .timeline-item:nth-child(even), .timeline-item:nth-child(odd) { left: 0; }
    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 11px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Üst Menü Düzenlemesi */
    .nav-actions { display: none; }
    .mobile-menu-btn { display: block; z-index: 1002; position: relative; margin-left: auto; }
    .nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .navbar { padding: 15px 0; background: var(--bg-main); border-bottom: 1px solid var(--border); }
    
    /* Genel Ortalama */
    body { text-align: center; overflow-x: hidden; width: 100vw; }
    .container { width: 100%; padding: 0 20px; overflow-x: hidden; }
    .about-content, .section-header, .contact-info, .footer-brand, .footer-links, .footer-social { text-align: center; margin-left: auto; margin-right: auto; }
    .about-features { display: flex; flex-direction: column; align-items: center; }
    .feature-card { width: 100%; justify-content: center; }
    
    /* === HERO (BANNER) KESİN ÇÖZÜMÜ - TAM MERKEZ === */
    .hero { 
        background-attachment: scroll !important; 
        background-position: center !important;
        /* Mobil tarayıcı barı sorunlarını çözer */
        height: 100vh;
        min-height: -webkit-fill-available; 
        padding-top: 60px; /* Sadece navbar kadar boşluk */
        display: flex;
        align-items: center; /* Dikeyde kusursuz ortalama */
        justify-content: center;
        overflow: hidden;
    }
    
    .hero-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: auto; /* İçeriği zorla merkeze iter */
        z-index: 2;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    
    .hero h1 { 
        font-size: 2rem; 
        margin-bottom: 10px; 
        line-height: 1.2;
    }
    
    .hero p { 
        font-size: 1rem; 
        margin-bottom: 25px; 
        padding: 0 15px;
        max-width: 100%;
    }
    
    .hero-buttons { 
        display: flex; 
        flex-direction: column; 
        gap: 15px; 
        align-items: center; 
        width: 100%;
    }
    
    .hero-buttons .btn { 
        width: 100%; 
        max-width: 280px; 
    }
    
    /* Eğer aşağıdaki istatistikler (20+ yıl vb) mobilde ekrana sığmıyor ve yazıyı yukarı itiyorsa onları küçültüyoruz */
    .hero-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 30px;
    }
    .stat-card {
        padding: 10px;
        min-width: 100px;
    }
    .stat-number { font-size: 1.5rem; }
    .stat-plus { font-size: 1.2rem; }
    .stat-text { font-size: 0.7rem; }
    /* =================================== */

    /* Üstten İnen Performanslı Menü (GPU Hızlandırmalı) */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--bg-main);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 1001; /* Logoyu ve butonu ezmemesi için butonun altında */
        transform: translate3d(0, -100%, 0);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, visibility 0.5s;
        will-change: transform, opacity;
    }
    
    .nav-links.active {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-main);
    }

    /* === MOBİLDE KAYDIRMA (SCROLL) VE ZIPLAMA HATASINI KESİN ÇÖZME === */
    
    /* 1. Yazıların ve elementlerin kaydırırken yukarı doğru fırlamasını (Animasyonu) tamamen iptal et */
    .reveal {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
        animation: none !important;
    }

    /* 2. Tüm gecikmeleri sıfırla ki sen kaydırırken sonradan ekrana element düşmesin */
    .delay-1, .delay-2 {
        transition-delay: 0s !important;
    }
    
    /* 3. Mobilde arka plan sabitliği (parallax) kaydırma hissini bozar ve kesik kesik yapar, iptal ediyoruz */
    * {
        background-attachment: scroll !important;
    }
    
    /* 4. Tarayıcının kendi "lastik gibi sekme" (rubber-band) veya "bölüme yapışma" huylarını kapatıyoruz */
    html, body {
        scroll-snap-type: none !important;
        overscroll-behavior-y: none;
    }
    /* ================================================================= */
}


/* ================= LOGO DÜZENLEMESİ ================= */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 48px; /* Masaüstü için ideal yükseklik */
    width: auto;  /* Oranların bozulmasını önler */
    max-width: 180px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.03);
}

/* Mobilde logo boyutlandırması */
@media (max-width: 768px) {
    .logo-img {
        height: 38px; /* Mobilde menü alanına mükemmel oturur */
        max-width: 140px;
    }
}

/* ================= VİDEO VE SLIDER ALANI (YENİ) ================= */
.media-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.video-container {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.slider-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.slider-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Yumuşak fade animasyonu */
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobilde alt alta geçmesi için */
@media (max-width: 992px) {
    .media-showcase {
        grid-template-columns: 1fr;
    }
}