/* Frontend Styles */
:root {
    --primary: #1a73e8;
    --secondary: #34a853;
    --accent: #fbbc04;
    --header-bg: #ffffff;
    --footer-bg: #f8f9fa;
    --text: #202124;
    --link: #1a73e8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #f9f9f9;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

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

/* Header */
.site-header {
    background: var(--header-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

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

/* Dropdown Menu - İlanlar */
.main-nav .dropdown {
    position: relative;
}

.main-nav .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.main-nav .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.main-nav .dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.main-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 220px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    margin-top: 10px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.main-nav .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .dropdown-menu li {
    margin: 0;
}

.main-nav .dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border-left: 3px solid transparent;
    min-height: auto;
}

.main-nav .dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(26,115,232,0.1), transparent);
    border-left-color: var(--primary);
    color: var(--primary);
    padding-left: 25px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Ad Banner */
.ad-banner {
    margin: 20px 0;
    text-align: center;
}

.ad-banner a {
    display: block;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Slider */
.slider-section {
    margin: 30px 0;
    position: relative;
}

.slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.slider-item.active {
    opacity: 1;
}

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

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* Search Bar */
.search-section {
    margin: 30px 0;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--text);
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Category Menu */
.category-menu {
    margin: 40px 0;
}

.category-menu h2 {
    text-align: center;
    margin-bottom: 20px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-btn {
    padding: 10px 24px;
    border: 2px solid #ddd;
    border-radius: 50px;
    background: white;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.category-btn:hover,
.category-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Blog Cards */
.section-title {
    font-size: 28px;
    margin: 60px 0 30px;
    text-align: center;
}

/* Sections spacing */
section {
    margin-bottom: 40px;
}

section:last-child {
    margin-bottom: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.empty-state .btn {
    min-height: 44px;
}

.blog-card-content {
    padding: 20px;
}

.blog-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.blog-card-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 15px;
}

/* Load More */
.load-more {
    text-align: center;
    margin: 40px 0;
}

.btn {
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    transition: background 0.3s;
}

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

/* Footer */
.site-footer {
    background: var(--footer-bg);
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--link);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #666;
}

/* Responsive */

/* Mobile First - Small Phones (320px-480px) */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 99;
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 15px 0;
        gap: 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 20px;
        font-size: 16px;
    }
    
    /* Mobil Dropdown */
    .main-nav .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        margin: 0;
        padding: 0;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .main-nav .dropdown-arrow {
        margin-left: auto;
    }
    
    .main-nav .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .main-nav .dropdown-menu a {
        padding-left: 40px;
        font-size: 14px;
        background: #f8f9fa;
    }
    
    .main-nav .dropdown-menu a:hover {
        padding-left: 45px;
        background: #e9ecef;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-inner {
        padding: 10px 10px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .main-nav a {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    /* Slider */
    .slider {
        height: 200px;
        border-radius: 8px;
    }
    
    .slider-section {
        margin: 20px 0;
    }
    
    /* Ad Banner */
    .ad-banner {
        margin: 15px 0;
    }
    
    /* Search */
    .search-section {
        margin: 20px 0;
    }
    
    .search-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Category Menu */
    .category-menu {
        margin: 30px 0;
    }
    
    .category-menu h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .category-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .category-buttons::-webkit-scrollbar {
        height: 6px;
    }
    
    .category-buttons::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .category-buttons::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Blog Grid */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .blog-card-title {
        font-size: 16px;
    }
    
    .blog-card-content {
        padding: 15px;
    }
    
    .blog-card-meta {
        font-size: 12px;
        gap: 10px;
    }
    
    /* Section Title */
    .section-title {
        font-size: 22px;
        margin: 30px 0 15px;
    }
    
    /* Load More */
    .load-more {
        margin: 30px 0;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    /* Footer */
    .site-footer {
        padding: 30px 0 15px;
        margin-top: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 20px;
    }
    
    .footer-section h3 {
        font-size: 16px;
    }
    
    .footer-section a {
        font-size: 14px;
    }
}

/* Tablets (481px-768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .slider {
        height: 300px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 24px;
        margin: 40px 0 20px;
    }
}

/* Desktop (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Large Desktop (1025px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
