@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   1. GLOBAL DEĞİŞKENLER (THEME VARIABLES)
   ========================================================================== */
:root {
    --bg-body: #f8fafc;         
    --bg-card: rgba(255, 255, 255, 0.75); 
    --text-main: #1e293b;       
    --text-muted: #5a6a82; 
    --accent: #ff7675;          
    --accent-hover: #d63031;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08); 
    --border: rgba(15, 23, 42, 0.1); 
    --radius: 24px;             
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-body: #0f172a;         
    --bg-card: rgba(30, 41, 59, 0.75); 
    --text-main: #f8fafc;       
    --text-muted: #cbd5e1; 
    --accent: #ff9f43;          
    --accent-hover: #ff7675;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
    --border: rgba(255, 255, 255, 0.12); 
}

/* ==========================================================================
   2. GENEL AYARLAR (RESET & BODY)
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 10; }

/* ==========================================================================
   3. ANİMASYONLAR VE EFEKTLER
   ========================================================================== */
#theme-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--bg-body); z-index: 9999; 
    pointer-events: none; border-radius: 50%; 
    transform: scale(0); transform-origin: center center;
}

.bg-glow {
    position: fixed; border-radius: 50%; filter: blur(80px);
    z-index: -1; pointer-events: none; opacity: 0.6;
    animation: floatGlow 10s infinite alternate ease-in-out;
}
.glow-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(255,118,117,0.15) 0%, transparent 70%); }
.glow-2 { top: 30%; right: -10%; width: 40vw; height: 40vw; background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, transparent 70%); }

@keyframes floatGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(20px, 30px); }
}

.fade-element { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-element.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   4. BUTONLAR VE HEADER
   ========================================================================== */
.btn { display: inline-block; padding: 16px 36px; border-radius: 50px; font-weight: 600; text-decoration: none; transition: var(--transition); border: none; cursor: pointer; min-height: 48px; } 
.btn-primary { background-color: var(--accent); color: #fff; box-shadow: 0 10px 20px rgba(255, 118, 117, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(255, 118, 117, 0.4); background-color: var(--accent-hover); }

.header { padding: 25px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--text-main); text-decoration: none; letter-spacing: -0.5px; z-index: 1001; }
.logo span { color: var(--accent); }

/* --- HAMBURGER İKONU (Sadece Mobilde Görünür) --- */
.hamburger { display: none; flex-direction: column; gap: 6px; cursor: pointer; background: transparent; border: none; z-index: 1002; padding: 5px; }
.hamburger span { width: 30px; height: 3px; background-color: var(--text-main); border-radius: 5px; transition: 0.3s ease-in-out; }

.main-nav { display: flex; gap: 30px; align-items: center; }
.main-nav a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 1rem; transition: var(--transition); min-height: 48px; display: flex; align-items: center; } 
.main-nav a:hover { color: var(--accent); }

/* Tema Değiştirici Anahtar (Switch) */
.theme-switch-wrapper { display: flex; align-items: center; z-index: 1001;}
.theme-switch { display: inline-block; height: 34px; position: relative; width: 60px; }
.theme-switch input { display: none; }
.slider { background-color: #cbd5e1; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px; border: 1px solid var(--border); }
.slider:before { background-color: #fff; bottom: 3px; content: ""; height: 26px; left: 4px; position: absolute; transition: .4s; width: 26px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: var(--accent); border-color: var(--accent); }
input:checked + .slider:before { transform: translateX(25px); background-color: #fff; }

/* ==========================================================================
   5. BÖLÜM AYARLARI VE KARTLAR
   ========================================================================== */
section { padding: 100px 0; border-top: 1px solid var(--border); }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 50px; font-weight: 700; }
.section-title span { color: var(--accent); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }

/* Buzlu Cam Kart (Glassmorphism) */
.soft-card { background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition); border: 1px solid var(--border); height: 100%; position: relative; overflow: hidden; }
.soft-card:hover { transform: translateY(-8px); border-color: rgba(255, 118, 117, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
[data-theme="dark"] .soft-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.icon-box { width: 60px; height: 60px; background: rgba(255, 118, 117, 0.1); color: var(--accent); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 25px; }

/* ==========================================================================
   6. YENİ NESİL PROJE (PORTFOLYO) TASARIMI
   ========================================================================== */
.project-grid-compact { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; transition: height 0.4s ease-in-out;}
.project-compact-card { height: 350px; position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--border); background: var(--bg-card); }
.project-compact-img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s cubic-bezier(0.33, 1, 0.68, 1); }
.project-compact-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.4) 50%, transparent 100%); padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; transition: 0.4s; }
.project-compact-card:hover .project-compact-img { transform: scale(1.1); }
.project-compact-card:hover .project-compact-overlay { background: linear-gradient(to top, rgba(255, 118, 117, 0.8) 0%, rgba(15,23,42,0.6) 100%); }

/* Referans Logoları (Slider) */
.logo-slider { overflow: hidden; padding: 50px 0; background: rgba(255,255,255,0.02); margin: 60px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.logo-track { display: flex; width: calc(250px * 14); animation: scroll 30s linear infinite; align-items: center; }
.logo-track img { width: 160px; height: 60px; object-fit: contain; margin: 0 50px; filter: grayscale(1) opacity(0.4); transition: 0.4s ease; }
.logo-track img:hover { filter: grayscale(0) opacity(1); transform: scale(1.1); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-250px * 7)); } }

/* Blog Kartları */
.blog-date { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; display: block; letter-spacing: 1px; }
.blog-title { color: var(--text-main); font-size: 1.3rem; text-decoration: none; font-weight: 600; transition: color 0.3s; display: block; margin-bottom: 15px; }
.blog-title:hover { color: var(--accent); }

/* ==========================================================================
   7. PROJE DETAY SAYFASI ÖZEL (proje-detay.php)
   ========================================================================== */
.project-header { padding: 160px 0 80px 0; background: radial-gradient(circle at top right, rgba(255,118,117,0.08), transparent); }
.project-meta-card { position: sticky; top: 100px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); padding: 35px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); z-index: 10; }
.tech-pill { display: inline-block; padding: 6px 14px; background: rgba(15, 23, 42, 0.05); border: 1px solid var(--border); border-radius: 50px; font-size: 0.85rem; color: var(--accent); margin: 0 6px 10px 0; font-weight: 600; transition: var(--transition); }
[data-theme="dark"] .tech-pill { background: rgba(255, 255, 255, 0.05); }
.tech-pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }
.project-main-img-detail { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.15); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); object-fit: cover; display: block; aspect-ratio: 16/9; } 
[data-theme="dark"] .project-main-img-detail { box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6); }
.content-area h3 { font-size: 1.6rem; margin: 40px 0 20px 0; color: var(--text-main); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.content-area p { font-size: 1.1rem; line-height: 1.9; color: var(--text-muted); margin-bottom: 25px; }
.breadcrumb { margin-bottom: 30px; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.5px; font-weight: 500; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent); }

/* ==========================================================================
   8. İLETİŞİM FORMU
   ========================================================================== */
.form-control { width: 100%; padding: 18px 20px; background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border); border-radius: 15px; font-size: 1rem; outline: none; transition: var(--transition); min-height: 48px; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 118, 117, 0.1); background: var(--bg-card); }
textarea.form-control { resize: none; height: 150px; }
.alert-success { color: #00ff88; background: rgba(0, 255, 136, 0.1); padding: 15px 20px; border-radius: 12px; margin-bottom: 25px; border: 1px solid rgba(0, 255, 136, 0.3); font-weight: 500; backdrop-filter: blur(10px); }

/* ==========================================================================
   9. MOBİL UYUM (RESPONSIVE) - AŞAĞI AÇILIR MENÜ
   ========================================================================== */
@media (max-width: 992px) {
    .project-detail-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
    .project-meta-card { position: static; margin-top: 30px; }
    .project-header { padding: 130px 0 50px 0; }
}

@media (max-width: 768px) {
    .header { padding: 15px 20px; flex-wrap: wrap; position: relative; } /* Relative yapıldı ki menü altından çıksın */
    
    .logo { font-size: 1.4rem; z-index: 1002; }
    .hamburger { display: flex; order: 3; z-index: 1002; } 
    .theme-switch-wrapper { order: 2; margin-left: auto; margin-right: 15px; z-index: 1002; } 

    /* YENİ: Aşağı Açılır Dropdown Menü */
    .main-nav { 
        position: absolute; top: 100%; left: 0; width: 100%; 
        background: var(--bg-card); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
        border-top: 1px solid var(--border); border-radius: 0 0 20px 20px;
        flex-direction: column; justify-content: flex-start; align-items: center; 
        padding: 20px; gap: 15px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: all 0.3s ease-in-out; z-index: 999;
    }
    
    .main-nav.active { opacity: 1; visibility: visible; transform: translateY(0); }

    .main-nav a { font-size: 1.1rem; padding: 10px; width: 100%; text-align: center; } 
    .nav-contact-btn { width: auto !important; margin: 0 auto; }
    
    .lang-switcher { justify-content: center; width: 100%; border-left: none !important; border-top: 1px solid var(--border); padding-top: 15px; margin-top: 5px; }
    
    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    .section-title { font-size: 2rem; }
    .logo-track { width: calc(250px * 7); }
    section { padding: 60px 0; }
}

img { height: auto; max-width: 100%; }