/**
 * Modern Ana Sayfa Stilleri - Güncellenmiş
 */

/* Container */
.testcoz-homepage .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1ca933 0%, #158725 100%);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.hero-emoji {
    font-size: 2.2rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin: 0 0 25px 0;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 40px 0;
    color: #333;
}

.title-icon {
    font-size: 2.5rem;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

/* Ana Kategoriler */
.main-categories {
    padding: 20px 0;
}

.category-wrapper {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 5px solid;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.ilkokul-card { border-top-color: #FF9800; }
.ortaokul-card { border-top-color: #2196F3; }
.ehliyet-card { border-top-color: #4CAF50; }

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    text-align: center;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    text-align: center;
}

.card-desc {
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    text-align: center;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex: 1;
}

.card-list li {
    margin: 8px 0;
}

.card-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.card-list a:hover {
    background: #f5f5f5;
    color: #1ca933;
}

.card-list .count {
    color: #666;
    font-size: 0.9rem;
}

.card-btn {
    display: inline-block;
    background: #1ca933;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: auto;
}

.card-btn:hover {
    background: #158725;
}

/* En Yeni İçerik (Arka Plan Sadece İçerik) */
.latest-content {
    padding: 20px 0;
}

.latest-posts-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.latest-posts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.latest-post-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
    text-decoration: none;
}

.latest-post-item:hover {
    border-color: #1ca933;
    box-shadow: 0 2px 8px rgba(28, 169, 51, 0.1);
    transform: translateX(3px);
}

.latest-post-thumb {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-post-thumb .no-thumb {
    font-size: 3rem;
    color: #767676;
}

.latest-post-content {
    flex: 1;
    min-width: 0;
}

.latest-post-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.latest-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.latest-post-title a:hover {
    color: #1ca933;
}

.latest-post-excerpt {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination (Yeşil Oklar) */
.latest-pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pagination-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #1ca933;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(28, 169, 51, 0.3);
}

.pagination-arrow:hover {
    background: #158725;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 169, 51, 0.4);
}

.next-arrow {
    padding-right: 20px;
}

.prev-arrow {
    padding-left: 20px;
}

/* Popüler Testler (Buton Yok, Başlık Ortalı) */
.popular-tests {
    padding: 28px 0 20px 0;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.test-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.test-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.test-card-link {
    display: block;
    text-decoration: none;
}

.test-thumb {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.test-thumb img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s;
    max-width: 100%;
    max-height: 100%;
}

.test-card:hover .test-thumb img {
    transform: translate(-50%, -50%) scale(1.05);
}

.test-content {
    padding: 20px;
    text-align: center;
}

.test-title {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    color: #333;
    transition: color 0.2s;
}

.test-card-link:hover .test-title {
    color: #1ca933;
}

/* Matematik Oyunları (8 Oyun - 4 sütun) */
.math-games {
    padding: 28px 0 20px 0;
}

.games-wrapper {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}

.game-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.game-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.game-name {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Neden Test Çöz */
.why-testcoz {
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.feature-item {
    text-align: center;
    padding: 20px 15px;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.feature-item h3 {
    font-size: 1.15rem;
    margin: 0 0 8px 0;
    color: #333;
}

.feature-item p {
    color: #666;
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
    text-align: center;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        gap: 25px;
    }
    
    .hero-section {
        padding: 30px 15px;
    }
    
    .latest-post-thumb {
        width: 100px;
        height: 100px;
    }
    
    .latest-post-item {
        gap: 15px;
        padding: 10px;
    }
    
    .latest-post-title {
        font-size: 1rem;
    }
    
    .latest-post-excerpt {
        font-size: 0.9rem;
    }
    
    .latest-posts-wrapper {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 25px 15px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .latest-post-item {
        flex-direction: column;
        text-align: center;
    }
    
    .latest-post-thumb {
        width: 120px;
        height: 120px;
    }
    
    .pagination-arrow {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Performance */
.test-thumb img,
.game-icon {
    will-change: transform;
}

/* Accessibility */
.card-btn:focus,
.game-card:focus,
.pagination-arrow:focus {
    outline: 3px solid #1ca933;
    outline-offset: 2px;
}

/* ================================
   CATEGORY PAGE STYLES
   ================================ */

/* Subcategory Grid */
.subcategories-section {
    padding: 40px 20px;
    background: transparent;
}

.subcategories-section-old {
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.subcategory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.subcat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.subcat-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    text-align: center;
}

.subcat-count {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 500;
    background: #f0f3ff;
    padding: 4px 12px;
    border-radius: 20px;
}

/* All Tests Section */
.all-tests-section {
    padding: 50px 0;
}

.category-tests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.no-thumb-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-thumb-placeholder span {
    font-size: 3rem;
}

/* Category Pagination */
.category-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.category-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-pagination .page-numbers:hover {
    border-color: #667eea;
    color: #667eea;
}

.category-pagination .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.category-pagination .prev,
.category-pagination .next {
    padding: 0 20px;
}

/* Category Hero variant */
.category-hero .hero-subtitle {
    margin: 0 auto 25px auto;
    text-align: center;
    max-width: 600px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .subcategory-card {
        padding: 20px 10px;
    }
    
    .subcat-icon {
        font-size: 2rem;
    }
    
    .subcat-title {
        font-size: 0.9rem;
    }
    
    .category-tests {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .category-pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .subcategory-card {
        padding: 15px 8px;
    }
    
    .subcat-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .subcat-title {
        font-size: 0.85rem;
    }
    
    .subcat-count {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* Category hero subtitle center fix */
.category-hero .hero-subtitle {
    margin: 0 auto 25px auto;
    text-align: center;
    text-align: center;
}

/* Force center hero subtitle */
.testcoz-homepage .hero-section .hero-subtitle,
#testcoz-category-page .hero-section .hero-subtitle {
    text-align: center !important;
    display: block;
    width: 100%;
}

/* SEO Content Section */
.seo-content-section {
    padding: 0 20px 30px 20px;
    background: transparent;
}
.seo-content-section .container {
    max-width: 900px;
    margin: 0 auto;
}

/* Ana sayfa SEO bölümü - desktop'ta daha geniş */
.homepage-seo .container {
    max-width: 1200px;
}
.seo-content-box {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.seo-content-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
}
.seo-content-box strong {
    color: #2d3748;
}

.seo-content-box h2 {
    font-size: 1.4rem;
    color: #2d3748;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.seo-content-box h3 {
    font-size: 1.15rem;
    color: #333;
    margin: 20px 0 10px 0;
    line-height: 1.3;
}

.seo-content-box p {
    margin: 0 0 12px 0;
}

.seo-content-box ul {
    margin: 10px 0 15px 0;
    padding-left: 20px;
}

.seo-content-box li {
    margin: 6px 0;
    line-height: 1.6;
    color: #495057;
}

/* ================================
   ENHANCED MOBILE STYLES
   ================================ */

@media (max-width: 768px) {
    /* CRITICAL: Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .testcoz-homepage,
    #testcoz-category-page {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* Genel ayarlar */
    body {
        font-size: 15px;
    }

    .testcoz-homepage .container,
    #testcoz-category-page .container {
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* Section title center fix */
    .section-title {
        text-align: center !important;
        width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* Category cards center fix */
    .category-wrapper {
        width: 100% !important;
        box-sizing: border-box;
    }

    .category-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .category-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        text-align: center;
    }

    .card-icon {
        text-align: center;
        width: 100%;
    }

    .card-list {
        text-align: left;
    }

    .card-list a {
        justify-content: space-between;
    }

    /* SEO Content Mobile */
    .seo-content-section {
        padding: 0 10px 20px 10px;
    }

    .seo-content-box {
        padding: 18px 15px;
        border-radius: 8px;
    }

    .seo-content-box h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .seo-content-box h3 {
        font-size: 1.05rem;
        margin: 15px 0 8px 0;
    }

    .seo-content-box p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .seo-content-box ul {
        padding-left: 15px;
    }

    .seo-content-box li {
        font-size: 0.9rem;
    }

    /* Hero mobile improvements */
    .hero-section {
        padding: 25px 12px;
    }

    .hero-emoji {
        font-size: 1.8rem;
    }

    /* Section titles mobile */
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .title-icon {
        font-size: 1.8rem;
        margin-right: 8px;
    }

    /* Category wrapper mobile */
    .category-wrapper,
    .games-wrapper,
    .latest-posts-wrapper {
        padding: 15px;
        border-radius: 10px;
    }

    /* Card improvements */
    .category-card {
        padding: 18px 15px;
    }

    .card-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-desc {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .card-list a {
        padding: 8px;
        font-size: 0.95rem;
    }

    .card-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
        display: block;
        text-align: center;
    }

    /* Tests grid mobile */
    .tests-grid,
    .category-tests {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .test-content {
        padding: 15px;
    }

    .test-title {
        font-size: 0.95rem;
    }

    /* All tests section */
    .all-tests-section {
        padding: 30px 0;
    }

    /* Features grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .feature-item {
        padding: 15px 10px;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .feature-item h3 {
        font-size: 1rem;
    }

    .feature-item p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .hero-title {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.15rem;
    }

    .title-icon {
        font-size: 1.5rem;
    }

    /* Features 2x2 on very small */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .feature-item {
        padding: 12px 8px;
    }

    .feature-icon {
        font-size: 1.8rem;
    }

    .feature-item h3 {
        font-size: 0.9rem;
    }

    .feature-item p {
        font-size: 0.8rem;
    }

    /* Game cards smaller */
    .game-card {
        padding: 15px;
    }

    .game-icon {
        font-size: 1.6rem;
    }

    .game-name {
        font-size: 1rem;
    }

    /* SEO content extra small */
    .seo-content-box {
        padding: 15px 12px;
    }

    .seo-content-box h2 {
        font-size: 1.1rem;
    }

    .seo-content-box h3 {
        font-size: 1rem;
    }

    .seo-content-box p,
    .seo-content-box li {
        font-size: 0.88rem;
    }
}
