/* --- GENEL AYARLAR & DEĞİŞKENLER --- */
:root {
    --primary: #1a252f;      /* Koyu Lacivert/Gri Tonu */
    --accent: #d35400;       /* Mobilya/Ahşap Turuncusu */
    --light: #f4f7f6;        /* Ferah Arka Plan */
    --white: #ffffff;
    --text: #2c3e50;
    --shadow: 0 12px 30px rgba(0,0,0,0.08); /* Yumuşak Modern Gölge */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Akıcı Geçiş */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background: var(--light); 
    color: var(--text); 
    line-height: 1.6; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    width: 100%;
}

/* --- HERO SECTION --- */
@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    height: 85vh;
    position: relative;
    overflow: hidden;
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center; 
    color: var(--white);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.3)), 
                url('https://images.unsplash.com/photo-1556911220-bff31c812dba?q=80&w=2536&auto=format&fit=crop') center/cover;
    animation: kenBurns 20s infinite alternate ease-in-out;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
    padding: 0 20px;
    animation: fadeInUp 1.2s ease-out;
}

.hero h2 { 
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px; 
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.hero h2 span { color: var(--accent); }

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 300;
}

.main-btn, .secondary-btn { 
    padding: 16px 38px; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: 600; 
    transition: var(--transition);
    display: inline-block;
    letter-spacing: 0.5px;
}

.main-btn { 
    background: var(--accent); 
    color: var(--white); 
    margin-right: 15px;
    box-shadow: 0 10px 25px rgba(211, 84, 0, 0.4);
}

.secondary-btn { 
    border: 2px solid rgba(255,255,255,0.8); 
    color: var(--white); 
}

.main-btn:hover { 
    transform: translateY(-3px) scale(1.02); 
    background: #e67e22; 
    box-shadow: 0 15px 35px rgba(211, 84, 0, 0.5);
}

.secondary-btn:hover { background: white; color: var(--primary); }

/* --- STATS BAR --- */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--white);
    padding: 35px;
    width: 90%;
    max-width: 1100px;
    margin: -70px auto 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    gap: 25px;
}

.stat-item { text-align: center; flex: 1; min-width: 150px; }
.stat-item strong { display: block; font-size: 2.5rem; color: var(--accent); margin-bottom: 5px; }
.stat-item span { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 1.5px; }

/* --- SERVICES --- */
.services { max-width: 1200px; margin: 80px auto; text-align: center; padding: 0 20px; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 50px; font-weight: 800; position: relative; display: inline-block; }
.section-title h2::after { content: ""; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--accent); border-radius: 2px; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-box { background: var(--white); padding: 45px 35px; border-radius: 24px; transition: var(--transition); border: 1px solid rgba(0,0,0,0.03); }
.service-box:hover { transform: translateY(-10px); box-shadow: var(--shadow); }
.service-box .icon { font-size: 3.5rem; margin-bottom: 20px; display: block; }

/* --- GALLERY HEADER & FILTERS --- */
header { background: var(--white); padding: 60px 0; border-bottom: 1px solid #f0f0f0; text-align: center; }
header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 25px; color: var(--primary); }

.filter-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.filter-btn { 
    padding: 12px 28px; border: 2px solid #eee; background: var(--white); cursor: pointer; 
    border-radius: 50px; font-weight: 600; color: var(--text); transition: var(--transition); 
}
.filter-btn.active, .filter-btn:hover { 
    background: var(--accent); 
    color: var(--white); 
    border-color: var(--accent); 
    box-shadow: 0 8px 20px rgba(211, 84, 0, 0.3);
}

/* --- GALLERY GRID & MODERN CARDS --- */
.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 40px; 
    padding: 60px 0; 
}

.project-card { 
    background: var(--white); 
    border-radius: 28px; /* Daha yumuşak köşeler */
    overflow: hidden; 
    cursor: pointer; 
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.project-card:hover { 
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f0f0f0; /* Skeleton yükleme efekti için arka plan */
}

.card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.8s ease;
}

.project-card:hover .card-image img { transform: scale(1.1); }

.card-content { 
    padding: 30px; /* İstediğin ferah padding */
    flex-grow: 1;
}

.tag { 
    display: inline-block;
    background: rgba(211, 84, 0, 0.1); 
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.card-content h3 { 
    font-size: 1.45rem; 
    color: var(--primary); 
    font-weight: 700;
    line-height: 1.3;
}

/* --- MODAL (LIGHTBOX) --- */
.modal { 
    display: none; position: fixed; z-index: 9999; top: 0; left: 0; 
    width: 100%; height: 100%; background: rgba(0,0,0,0.95); overflow-y: auto;
    backdrop-filter: blur(10px); /* Arkayı bulanıklaştırır */
}

.modal-content { 
    max-width: 1000px; 
    margin: 40px auto; 
    background: var(--white); 
    border-radius: 32px; 
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* --- MODAL SLIDER (YAN YANA DÜZEN) --- */
.modal-slider { 
    display: flex;              
    overflow-x: auto;            
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;   
    gap: 0;                     
    -webkit-overflow-scrolling: touch;
}

/* Kaydırma çubuğunu gizlemek isterseniz (opsiyonel) */
.modal-slider::-webkit-scrollbar {
    height: 8px;
}
.modal-slider::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.modal-slider img { 
    flex: 0 0 100%;            
    width: 100%; 
    max-height: 75vh; 
    object-fit: contain;      
    background: #000;           
    scroll-snap-align: start;    
}

.modal-info { padding: 40px; text-align: left; }
.modal-info h2 { font-size: 2rem; margin-bottom: 10px; color: var(--primary); }
.modal-info p { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

.close-modal { 
    position: fixed; top: 30px; right: 40px; color: white; 
    font-size: 50px; cursor: pointer; transition: var(--transition);
    z-index: 10000;
}
.close-modal:hover { transform: rotate(90deg); color: var(--accent); }

/* --- FOOTER --- */
.main-footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 50px 0; text-align: center; margin-top: 80px; }
.footer-bottom p { font-size: 0.95rem; letter-spacing: 0.5px; }

/* --- MOBİL UYUMLULUK --- */
@media (max-width: 768px) {
    .hero h2 { font-size: 2.8rem; }
    .stats-bar { margin-top: -40px; padding: 25px; width: 95%; }
    .gallery-grid { grid-template-columns: 1fr; padding: 30px 15px; }
    .modal-content { margin: 20px; border-radius: 20px; }
    .close-modal { right: 20px; top: 20px; font-size: 40px; }
}

/* Tüm ekranı kaplayan esnek kutu */
    .login-box { 
        height: 100vh; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        background: var(--light); 
        padding: 20px; /* Mobilde kartın kenarlara yapışmasını engeller */
    }

    /* Giriş Kartı */
    .login-card { 
        background: white; 
        padding: 40px 30px; 
        border-radius: 28px; 
        box-shadow: var(--shadow); 
        text-align: center; 
        max-width: 400px; 
        width: 100%; /* Mobilde tam genişlik kullanır */
    }

    /* Giriş Başlığı */
    .login-card h2 { 
        font-size: 1.6rem; 
        color: var(--primary); 
        margin-bottom: 10px; 
    }

    /* Input Alanı - Mobilde kolay yazım için optimize edildi */
    .login-card input { 
        width: 100%; 
        padding: 16px; /* Daha geniş dokunma alanı */
        margin: 25px 0 15px; 
        border: 2px solid #eee; 
        border-radius: 15px; 
        text-align: center; 
        font-size: 1.2rem; /* Mobilde klavye açıldığında zoom yapmaması için ideal boy */
        outline: none;
        transition: border-color 0.3s ease;
    }

    .login-card input:focus {
        border-color: var(--accent);
    }

    /* Giriş Butonu */
    .login-card button { 
        width: 100%; 
        background: var(--accent); 
        color: white; 
        border: none; 
        padding: 16px; 
        border-radius: 15px; 
        cursor: pointer; 
        font-weight: 700; 
        font-size: 1.1rem;
        box-shadow: 0 8px 20px rgba(211, 84, 0, 0.2);
        transition: transform 0.2s ease;
    }

    .login-card button:active {
        transform: scale(0.98); /* Dokunma hissi verir */
    }

    /* Küçük Ekranlar İçin Özel Ayar */
    @media (max-width: 480px) {
        .login-card {
            padding: 30px 20px;
        }
        .login-card h2 {
            font-size: 1.4rem;
        }
    }
    
    /* --- BAŞA DÖN BUTONU --- */
#backToTop {
    /* Başlangıçta gizli ve şeffaf */
    opacity: 0;
    visibility: hidden;
    
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(211, 84, 0, 0.3);
    
    /* Akıcı belirme efekti */
    transition: all 0.4s ease;
}

/* JavaScript bu sınıfı eklediğinde buton görünür olacak */
#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Hafif yükselme efekti ile birleşebilir */
}

#backToTop:hover {
    background: var(--primary); /* Üzerine gelince lacivert olur */
    transform: translateY(-5px); /* Hafifçe yukarı zıplar */
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

/* Mobilde parmakla basmayı kolaylaştırmak için biraz daha yukarı alabiliriz */
@media (max-width: 768px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}