/* ===== CSS Variables ===== */
:root {
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    
    --color-secondary: #ec4899;
    --color-secondary-light: #f472b6;
    
    --color-accent: #14b8a6;
    --color-accent-light: #5eead4;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    
    --color-bg: #fafbfc;
    --color-bg-alt: #f1f5f9;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-border: #e2e8f0;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: var(--radius-md);
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu > li > a {
    display: block;
    padding: 10px 16px;
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
}

.nav-menu > li > a:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

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

.dropdown a {
    display: block;
    padding: 10px 14px;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.dropdown a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

/* Search Box */
.search-box form {
    display: flex;
    align-items: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 16px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-box form:focus-within {
    border-color: var(--color-primary-light);
    background: white;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 180px;
    padding: 8px 0;
    color: var(--color-text);
}

.search-box input::placeholder {
    color: var(--color-text-light);
}

.search-box button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
}

.search-box button:hover {
    transform: scale(1.05);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 80px 0;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container {
    position: relative;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-search {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.hero-search form {
    display: flex;
    background: white;
    border-radius: var(--radius-full);
    padding: 8px 8px 8px 16px;
    box-shadow: var(--shadow-xl);
}

.hero-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    padding: 14px 24px;
    font-size: 1.1rem;
}

.hero-search button {
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.hero-search button:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ===== Categories Section ===== */
.categories {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    padding: 28px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: var(--transition);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-gradient);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.category-count {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* Category Gradients */
.category-card[data-category="gunluk-hayat-ev"] { --card-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.category-card[data-category="kisisel-bakim-saglik"] { --card-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.category-card[data-category="araclar-malzemeler"] { --card-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.category-card[data-category="teknoloji-dijital"] { --card-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.category-card[data-category="maddeler-kimyasallar"] { --card-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.category-card[data-category="dogal-urunler-bitkiler"] { --card-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.category-card[data-category="kavramlar-terimler"] { --card-gradient: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%); }
.category-card[data-category="aliskanliklar-uygulamalar"] { --card-gradient: linear-gradient(135deg, #8360c3 0%, #2ebf91 100%); }

/* ===== Posts Section ===== */
.posts {
    padding: 60px 0;
    background: var(--color-bg-alt);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-content {
    padding: 24px;
}

.post-category {
    display: inline-block;
    padding: 6px 12px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.post-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card h3 a:hover {
    color: var(--color-primary);
}

.post-excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 500;
    margin-top: 12px;
}

.read-more:hover {
    gap: 10px;
}

/* ===== Single Post ===== */
.post-single {
    padding: 60px 0;
}

.post-single .container {
    max-width: 800px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-header .post-meta {
    justify-content: center;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.6rem;
    margin: 40px 0 20px;
    color: var(--color-text);
}

.post-content h3 {
    font-size: 1.3rem;
    margin: 32px 0 16px;
}

.post-content p {
    margin-bottom: 20px;
    color: var(--color-text-muted);
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.post-content ul li {
    list-style: disc;
}

.post-content ol li {
    list-style: decimal;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination .current {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-text);
    color: var(--color-text-light);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-icon {
    background: var(--gradient-primary);
}

.footer-brand .logo-text {
    color: white;
    -webkit-text-fill-color: white;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.7;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: white;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 20px;
    }
    
    .nav-toggle {
        display: flex;
        order: 3;
    }
    
    .nav {
        order: 4;
        width: 100%;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 16px 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li > a {
        padding: 12px 0;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 16px;
    }
    
    .search-box {
        order: 2;
        flex: 1;
        max-width: 200px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
}

/* ===== Search Autocomplete ===== */
.search-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

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

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--color-bg-alt);
}

.suggestion-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.suggestion-title mark {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.suggestion-category {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.suggestion-empty {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Hero Search Autocomplete */
.hero-search .search-autocomplete-wrapper {
    width: 100%;
}

.hero-search .search-suggestions {
    text-align: left;
}

