/* --- GENEL STİLLER --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --dark: #111827;
    --light: #f3f4f6;
}

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background: #fff;
}

/* Ana sayfa için scroll snap */
.snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
}

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

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a.nav-item {
    font-weight: 500;
    color: #555;
}

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

/* Dropdown Menü Stilleri */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 12px;
    padding: 10px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid #eee;
    margin-top: 10px;
}

/* Dropdown oku */
.dropdown-content::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

/* Dropdown Kapanma Sorunu Çözümü (Görünmez Köprü) */
.dropdown-content::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown-content a {
    color: var(--dark);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: 0.2s;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--primary);
    padding-left: 25px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Hiyerarşik Dropdown Submenu Stilleri */
.dropdown-item-wrapper {
    position: relative;
}

.dropdown-main-item {
    color: var(--dark);
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    transition: 0.2s;
    font-weight: 500;
}

.dropdown-main-item:hover {
    background-color: #f8fafc;
    color: var(--primary);
    padding-left: 25px;
}

.dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -10px;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 10px 0;
    margin-left: -5px;
    border: 1px solid #eee;
    z-index: 1002;
}

.dropdown-item-wrapper:hover .dropdown-submenu {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.dropdown-submenu a {
    color: var(--dark);
    padding: 8px 18px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: 0.2s;
    font-weight: 500;
}

.dropdown-submenu a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
    padding-left: 23px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Form Stilleri */
.dropbtn {
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown:hover .dropbtn {
    color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Arama Kutusu */
.search-box {
    background: #fff;
    border-radius: 40px;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: 0.4s;
    border: 1px solid transparent;
}

.search-box.active {
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-txt {
    border: none;
    background: none;
    outline: none;
    padding: 0;
    color: var(--dark);
    font-size: 0.9rem;
    transition: 0.4s;
    width: 0px;
    opacity: 0;
}

.search-box.active .search-txt {
    width: 200px;
    padding: 0 10px;
    opacity: 1;
}

.search-btn {
    color: var(--primary);
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.search-btn:hover {
    background: #eff6ff;
}

/* --- Navbar Refactor (New Styles) --- */
.nav-divider {
    width: 1px;
    height: 24px;
    background-color: #e5e7eb;
    margin: 0 0.5rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transition: 0.3s;
    text-decoration: none;
}

.btn-login:hover {
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary);
}

.btn-register {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    transition: 0.3s;
    text-decoration: none;
}

.btn-register:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
}

/* User Profile */
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.user-profile-link:hover {
    color: var(--primary);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.logout-btn {
    color: #ef4444;
    font-size: 1.1rem;
    padding: 5px;
    transition: 0.3s;
}

.logout-btn:hover {
    color: #b91c1c;
    transform: scale(1.1);
}

/* --- ANA SAYFA BÖLÜMLERİ --- */
.hero-section,
.blog-section,
.pagination-container,
.search-header {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}


.hero-section {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 20px;
    width: 100%;
    height: 520px;
}

.hero-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.hero-card:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.hero-card:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.hero-card:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

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

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-card:not(:nth-child(1)) .hero-title {
    font-size: 1.2rem;
}

.blog-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.blog-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.blog-section:nth-of-type(even) .blog-inner {
    flex-direction: row-reverse;
}

.blog-img {
    flex: 1;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    flex: 1;
    padding: 2rem;
}

.cat-badge {
    background: #e0e7ff;
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.post-excerpt {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--dark);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
}

.read-more:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.pagination-container {
    padding: 4rem 0;
    min-height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.page-btn {
    padding: 10px 25px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-weight: 600;
    color: #555;
    background: white;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.search-header {
    padding-top: 150px;
    padding-bottom: 50px;
    text-align: center;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- DETAY SAYFASI STİLLERİ --- */
.article-header {
    margin-top: 120px;
    text-align: center;
    padding-bottom: 3rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #111827;
}

.article-meta {
    color: #6b7280;
    font-size: 0.95rem;
}

.featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.article-summary {
    font-size: 1.25rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    font-style: italic;
    background-color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-content {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 4rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #111827;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #111827;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4rem;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    background: #eff6ff;
    transition: 0.3s;
}

.back-btn:hover {
    background: #dbeafe;
}

/* --- FOOTER STİLLERİ --- */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /*margin-top: 4rem;*/
}

/* Footer Snap Özelliği (index.php'den eklendi) */
footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    width: 100%;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col p {
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-col ul {
    padding: 0;
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #9ca3af;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px 15px;
    outline: none;
}

.newsletter-form input::placeholder {
    color: #9ca3af;
}

.newsletter-form button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-form button:hover {
    background: white;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: #1f2937;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: 0.3s;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.rss-link:hover {
    background: #f97316;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    width: 100%;
}

.alert-box {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hero Kategorileri (index.php'den ve header.php'den) */
.hero-categories {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.hero-cat-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-cat-item:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px rgba(37, 99, 235, 0.2);
}

.hero-cat-item i {
    margin-right: 5px;
}

/* Mesaj Kutuları */
.msg-box {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msg-success {
    background: #dcfce7;
    color: #166534;
}

.msg-error {
    background: #fee2e2;
    color: #991b1b;
}

.msg-warning {
    background: #fef9c3;
    color: #854d0e;
}

/* Form Stilleri (Global) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    transition: all 0.3s;
}

.form-input:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Auth Sayfaları (Giriş/Kayıt) */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f3f4f6;
    padding-top: 100px;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-desc {
    color: #6b7280;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
}

.btn-full {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

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

.btn-primary-full:hover {
    background: #1d4ed8;
}

/* --- MOBİL UYUMLULUK (RESPONSIVE CSS) --- */
@media (max-width: 900px) {

    /* Hero Grid Mobilde Tek Sütun Olsun */
    .hero-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        /* Otomatik yükseklik */
        height: auto !important;
        gap: 20px;
    }

    /* İlk kartın (büyük olan) grid ayarını sıfırla */
    .hero-card:nth-child(1) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .hero-card {
        height: 300px;
        /* Mobilde kart yüksekliği */
        min-height: 300px;
    }

    /* Blog Akışı Mobilde Alt Alta Olsun */
    .blog-inner {
        flex-direction: column !important;
        gap: 2rem;
        text-align: center;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    /* Zig-Zag yapısını mobilde iptal et (hep aynı düzen: resim üstte, yazı altta) */
    .blog-section:nth-of-type(even) .blog-inner {
        flex-direction: column !important;
    }

    .blog-img {
        width: 100%;
        height: 250px;
        /* header.php'de 300, index.php'de 250 var. 250 seçildi */
    }

    /* Kategoriler Mobilde Daha Kompakt */
    .hero-cat-item {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .post-title {
        font-size: 1.8rem;
        /* header.php'de 2rem, index.php'de 1.8rem */
    }

    /* Section boşluklarını mobilde azalt */
    .hero-section,
    .blog-section {
        padding: 80px 0;
        min-height: auto;
    }

    .footer-grid {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}