/* FOUC (Flash of Untranslated Content) Önleyici */
body {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.loaded {
    opacity: 1;
}
/* KÖK DEĞİŞKENLER: TEMA RENKLERİ */
:root {
    --bg-color: #ffffff;
    --text-color: #333;
    --secondary-text-color: #6c757d;
    --card-bg-color: #f8f9fa;
    --border-color: #eaeaea;
    --primary-accent: #003366;
    --primary-accent-hover: #007bff;
    --shadow-color: rgba(0,0,0,0.1);
    --green-accent: #28a745;
    --green-accent-hover: #218838;
}

html[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --card-bg-color: #1e1e1e;
    --border-color: #2e2e2e;
    --primary-accent: #58a6ff;
    --primary-accent-hover: #80bfff;
    --shadow-color: rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0; padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

header {
    background-color: var(--bg-color);
    padding: 10px 2rem;
    position: sticky; top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}
.logo-light { display: block !important; }
.logo-dark { display: none !important; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-dark { display: block !important; }

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
.desktop-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}
.desktop-nav a:hover { color: var(--primary-accent-hover); }

.lang-switcher {
    margin-left: 15px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
    transition: border-color 0.3s;
}
.lang-switcher a { font-weight: bold; color: var(--secondary-text-color); }
.lang-switcher a.active { color: var(--primary-accent-hover); }

.theme-switcher { display: flex; align-items: center; gap: 8px; margin-left: 20px; }
.theme-icon { color: var(--secondary-text-color); }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-accent); }
input:checked + .slider:before { transform: translateX(24px); }

.mobile-menu-icon { display: none; font-size: 1.8rem; cursor: pointer; color: var(--text-color); }
.mobile-nav {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100%;
    background-color: var(--bg-color); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1001; transition: right 0.4s ease-in-out; padding-top: 60px;
    border-left: 1px solid var(--border-color);
}
.mobile-nav.open { right: 0; }
.mobile-nav .close-btn { position: absolute; top: 20px; right: 25px; font-size: 2.5rem; color: var(--secondary-text-color); text-decoration: none; }
.mobile-nav-link {
    display: block; padding: 15px 30px; font-size: 1.2rem;
    color: var(--text-color); text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}
.mobile-nav-link:hover { background-color: var(--card-bg-color); }

main { display: block; }
section {
    padding: 120px 2rem; max-width: 1100px; margin: 0 auto;
    text-align: center; border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s;
}
section:last-of-type { border-bottom: none; }
section h2 { font-size: 2.8rem; margin-bottom: 1rem; color: var(--text-color); }
.section-subtitle {
    font-size: 1.2rem; color: var(--secondary-text-color); margin-top: 0;
    margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto;
    line-height: 1.6;
}

.hero {
    color: white; min-height: 80vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; background-image: url('dalga.jpg');
    background-attachment: fixed; background-position: center; background-repeat: no-repeat;
    background-size: cover; position: relative; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    max-width: none; padding: 100px 2rem; border-bottom: none;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 40, 85, 0.6); z-index: 1;
}
.hero-content { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; text-align: center; }
.hero h1 { font-size: 4.2rem; line-height: 1.2; }
.hero p { font-size: 1.4rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-button {
    display: inline-block; padding: 15px 35px; text-decoration: none; font-weight: bold;
    border-radius: 5px; margin-top: 20px; transition: all 0.3s;
    border: none; cursor: pointer; font-size: 1.1rem;
}
.cta-button:hover { transform: translateY(-2px); }
.hero .cta-button { background-color: var(--green-accent); color: white; text-shadow: none; }
.hero .cta-button:hover { background-color: var(--green-accent-hover); color: white; }

.about-container { display: flex; flex-wrap: wrap; align-items: center; gap: 3rem; text-align: left; }
.about-text { flex: 1; min-width: 300px; display: flex; flex-direction: column; justify-content: center; }
.about-text h2 { margin-top: 0; }
.about-image { flex: 1; min-width: 300px; }
.about-image img { width: 100%; border-radius: 8px; box-shadow: 0 4px 15px var(--shadow-color); }

#misyonumuz {
    position: relative; background-image: url('volunteer.jpg'); background-size: cover;
    background-position: center center; background-attachment: fixed;
    color: #ffffff; text-shadow: 0 2px 5px rgba(0,0,0,0.7);
}
#misyonumuz::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background-color: rgba(0, 20, 40, 0.7); z-index: 1;
}
#misyonumuz .content-wrapper { position: relative; z-index: 2; }
#misyonumuz h2, #misyonumuz .section-subtitle { color: #ffffff; }

#blog, #danismanlar { background-color: var(--bg-color); }
#danismanlar .mentor-card { background-color: var(--card-bg-color); }

.search-container { margin-bottom: 40px; }
.search-input {
    padding: 12px 15px; width: 50%; max-width: 400px; border: 1px solid var(--border-color);
    border-radius: 5px; font-size: 1rem; font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color); color: var(--text-color); transition: all 0.3s;
}
.search-input:focus {
    outline: none; border-color: var(--primary-accent-hover);
    box-shadow: 0 0 0 2px var(--primary-accent-hover-transparent, rgba(88, 166, 255, 0.25));
}

.carousel-viewport {
    width: 100%; overflow: hidden;
}
.blog-container, .mentors-container { display: flex; gap: 2rem; width: max-content; }
.blog-container.animated, .mentors-container.animated { animation: scroll 60s linear infinite; }
.blog-container:hover, .mentors-container:hover { animation-play-state: paused; }
.blog-container.paused, .mentors-container.paused { animation-play-state: paused; justify-content: center; width: 100%; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.blog-card, .mentor-card { flex: 0 0 350px; transition: all 0.3s; }
.blog-card {
    min-width: 280px;
    max-width: 320px;
    width: 90vw;
    box-sizing: border-box;
    flex: 0 0 auto;
    background: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 20px;
    margin: 0;
    transition: box-shadow 0.2s;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px var(--shadow-color); }
.blog-card h3 { margin-top: 0; font-size: 1.5rem; }
.blog-card h3 a { text-decoration: none; color: var(--text-color); }
.blog-card h3 a:hover { color: var(--primary-accent-hover); }
.blog-excerpt { color: var(--secondary-text-color); line-height: 1.6; }
.blog-author { margin-top: 1rem; font-weight: bold; color: var(--secondary-text-color); font-size: 0.9rem; }

.mentor-card {
    background-color: var(--bg-color); padding: 2rem; border-radius: 8px;
    border: 1px solid var(--border-color); box-shadow: 0 4px 8px var(--shadow-color);
    max-width: 350px; text-align: center;
}
.mentor-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px var(--shadow-color); }
.mentor-photo {
    width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
    margin-bottom: 1.5rem; border: 4px solid var(--primary-accent);
}
.mentor-card h3 { margin-top: 0; color: var(--text-color); }
.mentor-card h4 { font-weight: 500; color: var(--secondary-text-color); margin-top: -10px; }
.mentor-links { margin-top: 1.5rem; display: flex; justify-content: center; gap: 1.5rem; }
.mentor-links a { text-decoration: none; color: var(--primary-accent); font-size: 1.8rem; transition: all 0.2s; }
.mentor-links a:hover { transform: scale(1.2); color: var(--primary-accent-hover); }
.booking-button {
    display: inline-block; width: auto; margin-top: 1.5rem;
    background-color: var(--green-accent); color: white !important;
    border: none; padding: 12px 28px; text-align: center; text-decoration: none;
    font-weight: bold; border-radius: 5px; transition: all 0.3s; font-size: 1rem;
}
.booking-button:hover { background-color: var(--green-accent-hover); color: white !important; transform: translateY(-2px); }

#iletisim { background-color: var(--bg-color); }
#contact-form-wrapper { max-width: 600px; margin: 30px auto; }
#contact-form { text-align: left; }
#success-message {
    text-align: center; padding: 40px; border: 1px solid var(--border-color);
    border-radius: 8px; background-color: var(--card-bg-color);
}
#success-message h3 { font-size: 2rem; color: var(--green-accent); margin-top: 0; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border-color);
    border-radius: 5px; box-sizing: border-box; font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color); color: var(--text-color); transition: all 0.3s;
}
select:invalid { color: var(--secondary-text-color); }
html[data-theme="dark"] select option { background: var(--card-bg-color); color: var(--text-color); }
#contact-form .cta-button { width: 100%; background-color: var(--primary-accent); color: white; font-size: 1.1rem; }
#contact-form .cta-button:hover { background-color: var(--primary-accent-hover); }

.social-title { margin-top: 60px; font-weight: 500; }
.social-links { display: flex; justify-content: center; align-items: center; gap: 2rem; }
.social-links a { text-decoration: none; }
.social-links i { font-size: 2.2rem; color: var(--primary-accent); transition: all 0.2s; }
.social-links i:hover { transform: scale(1.2); color: var(--primary-accent-hover); }

footer {
    text-align: center; padding: 30px 20px;
    background-color: #1c2128; color: #c9d1d9; border-top: 1px solid #30363d;
}
.lang-en { display: none; }

/* Blog kartları için sabit genişlik ve esnek yapı */
.blog-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 16px; /* kartlar arası boşluk */
    padding-bottom: 10px;
    /* mobilde taşma için */
    min-width: 0;
}

.blog-card {
    min-width: 280px;
    max-width: 320px;
    width: 90vw;
    box-sizing: border-box;
    flex: 0 0 auto;
    background: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 20px;
    margin: 0;
    transition: box-shadow 0.2s;
}

@media (max-width: 992px) {
    .desktop-nav { display: none; }
    .mobile-menu-icon { display: block; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .search-input {
        width: 90%;
        font-size: 0.95rem;
    }
    .search-input::placeholder {
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
    .carousel-viewport {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
        scroll-snap-type: x mandatory;
    }
    .blog-container, .mentors-container {
        animation: none;
        justify-content: flex-start;
        padding: 0 2rem; /* Kenar boşlukları */
    }
    .blog-card, .mentor-card {
        scroll-snap-align: start;
        flex: 0 0 80%;
    }
}

@media (max-width: 600px) {
    .blog-card {
        min-width: 90vw;
        max-width: 95vw;
        width: 95vw;
    }
}

.hidden {
  display: none !important;
}