/* CSS Değişkenleri (Tema) */
:root {
    --primary-color: #0ea5e9; /* Cyan / Blue */
    --primary-dark: #0284c7;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --card-border: 1px solid rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --section-padding: 8vh 5%;
}

:root[data-theme="dark"] {
    --primary-color: #38bdf8;
    --primary-dark: #0c4a6e; /* Daha tok bir lacivert (İletişim kutusu için) */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1; /* Daha okunabilir gri */
    --bg-light: #020617; /* Gece mavisi / Çok koyu arka plan */
    --bg-white: #0f172a; /* Kartlar için biraz daha açık lacivert */
    --navbar-bg: rgba(2, 6, 23, 0.75); /* Daha şeffaf glass efekti */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.8);
    --shadow-hover: 0 0 30px rgba(56, 189, 248, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.8); /* Kartlara mavi parlama efekti */
    --card-border: 1px solid rgba(255, 255, 255, 0.05); /* Premium ince kenarlık */
}

/* Genel Sıfırlama */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--text-main);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 4rem;
    height: 0.3rem;
    background: var(--primary-color);
    margin: 0.6rem auto 0;
    border-radius: 0.15rem;
}

/* Buton */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

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

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#navbar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.site-logo {
    max-height: 8vh;
    max-width: 60vw;
    width: auto;
    height: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    position: relative; /* For .nav-slider positioning */
}

.nav-slider {
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease, width 0.3s ease;
    pointer-events: none;
    border-radius: 2px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 1.8rem;
    height: 0.2rem;
    margin: 0.3rem auto;
    transition: var(--transition);
    background-color: var(--text-main);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('img/hero_bg.webp') center/cover no-repeat;
    color: white;
    padding: 0 5%;
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1.5s ease;
}

.hero-content h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    color: #e2e8f0;
}

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

/* Hizmetlerimiz */
#services {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: var(--card-border);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    overflow: hidden;
}

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

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 2rem;
    flex-grow: 1;
}

.card-body h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.card-body p {
    color: var(--text-muted);
}

/* Projelerimiz */
#projects {
    padding: var(--section-padding);
    background-color: var(--bg-white);
}

.slider-container {
    position: relative;
    max-width: 90%;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}

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

.prev-btn { left: 1rem; }
.next-btn { right: 1rem; }

.slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.dot {
    width: 0.8rem;
    height: 0.8rem;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* İletişim */
#contact {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

.contact-content {
    background-color: var(--primary-dark);
    border-radius: 16px;
    padding: 3rem;
    color: white;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-around;
}

.info-item {
    flex: 1;
    min-width: 250px;
}

.info-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #bae6fd;
}

.info-item p {
    font-size: 1rem;
    line-height: 1.8;
}

/* Footer */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem 5%;
    margin-top: auto;
    width: 100%;
}

.footer-logo {
    height: 32px;
    width: auto;
    opacity: 0.6;
}

/* Scroll Offset — fixed navbar yüksekliği kadar */
/* Masaüstü */
.section {
    scroll-margin-top: 90px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: -100%;
        top: 100%;
        flex-direction: column;
        background-color: var(--navbar-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 2rem 0;
        gap: 1.5rem;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-slider {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.toggle .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.toggle .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .slide img {
        height: 40vh;
    }
    
    .contact-content {
        padding: 2rem 1rem;
    }

    /* Tablet & mobil için navbar biraz daha kısa */
    .section {
        scroll-margin-top: 72px;
    }
}

/* Küçük telefon */
@media (max-width: 480px) {
    .section {
        scroll-margin-top: 65px;
    }
}

/* Tema Değiştirici (Theme Toggle) */
.theme-toggle-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1500;
}
.theme-toggle-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}
.theme-toggle-btn:hover {
    background-color: var(--primary-dark);
}
.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.theme-dropdown {
    position: absolute;
    bottom: 55px;
    right: 0;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    flex-direction: column;
    min-width: 140px;
    border: var(--card-border);
}
.theme-dropdown.show {
    display: flex;
}
.theme-dropdown button {
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition);
}
.theme-dropdown button:hover {
    background-color: var(--bg-light);
}
.theme-dropdown button.active {
    color: var(--primary-color);
    font-weight: 600;
}
.theme-dropdown button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.7;
}
.theme-dropdown button.active svg {
    opacity: 1;
}
.theme-dropdown .check-icon {
    margin-left: auto;
    display: none;
}
.theme-dropdown button.active .check-icon {
    display: block;
}
