/* =============================================
   Sarakari Hub - Main Stylesheet
   Modern Government Jobs Portal
   ============================================= */

/* CSS Variables */
:root {
    --primary-color: #d946ef;
    --primary-dark: #c026d3;
    --primary-light: #e879f9;
    --secondary-color: #8b5cf6;
    --accent-color: #f472b6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: #fdf4ff;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;
    --transition: all 0.3s ease;
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bg-page: #f8f9fa;
}

/* Dark theme */
[data-theme="dark"] {
    --bg-white: #1f2937;
    --bg-light: #111827;
    --bg-page: #111827;
    --text-dark: #f3f4f6;
    --text-light: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .index2-body { background: var(--bg-page); }
[data-theme="dark"] .index2-sidebar-card,
[data-theme="dark"] .index2-main { background: var(--bg-white); }

/* Top header / dynamic component – dark mode */
[data-theme="dark"] .top-header-container { background: var(--bg-white); box-shadow: var(--shadow-md); }
[data-theme="dark"] .announcements-slider { background: var(--bg-light); }
[data-theme="dark"] .slide p { color: var(--text-dark); }
[data-theme="dark"] .additional-header-info { background: var(--bg-light); border-bottom-color: var(--border-color); }
[data-theme="dark"] .additional-header-info .main-heading { color: var(--text-dark); }
[data-theme="dark"] .additional-header-info .welcome-text { color: var(--primary-light); }
[data-theme="dark"] .additional-header-info .links-text { color: var(--text-light); }
[data-theme="dark"] .additional-header-info .links-text a { color: var(--primary-light); }
[data-theme="dark"] .additional-header-info .links-text a:hover { color: var(--primary-color); }
[data-theme="dark"] .static-posts-container.three-line-posts { background: var(--bg-white); border-color: var(--border-color); }
[data-theme="dark"] .three-line-posts .static-line { background: var(--bg-white); }
[data-theme="dark"] .three-line-posts .static-line.line-3 { background: var(--bg-white); }
[data-theme="dark"] .three-line-posts .posts-content { color: var(--text-dark); }
[data-theme="dark"] .three-line-posts .static-post-item { color: var(--primary-light); }
[data-theme="dark"] .three-line-posts .static-post-item:hover { color: var(--primary-color); }
[data-theme="dark"] .three-line-posts .post-separator { color: var(--primary-light); }
[data-theme="dark"] .three-line-posts .no-posts-message { color: var(--text-muted); }
[data-theme="dark"] .link-buttons-container { background: var(--bg-white); }

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(217, 70, 239, 0.45);
}
.theme-toggle .theme-icon {
    position: absolute;
    font-size: 1.25rem;
}
.theme-toggle .theme-icon-dark { display: none; }
.theme-toggle .theme-icon-light { display: inline-flex; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline-flex; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }

/* 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(--text-dark);
    background-color: var(--bg-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

ul, ol {
    list-style: none;
}

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

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

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

.main-content {
    flex: 1;
}

/* =============================================
   Header & Navigation
   ============================================= */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo img {
    height: 45px;
    width: auto;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    text-decoration: none;
}
.nav-brand:hover {
    color: var(--primary-color);
}
.nav-brand i {
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 18px;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-light);
}

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

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-toggle i {
    font-size: 10px;
    transition: var(--transition);
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

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

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
}

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

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

.search-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dark);
    transition: var(--transition);
}

.search-toggle:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

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

.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* Search Overlay – fixed at top, above all content */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: var(--bg-white);
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 16px;
    transition: var(--transition);
}

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

.search-form button {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--primary-dark);
}

.search-close {
    background: var(--text-light) !important;
}

/* =============================================
   Section Styles
   ============================================= */
.section {
    padding: 60px 0;
}

.section-title {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-full);
    margin-bottom: 0;
}

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

.section-header-with-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-more-posts {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-more-posts:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white !important;
    transform: translateY(-2px);
}

/* =============================================
   Tools Section (Best Valuable Tools – 2:3 ratio, 720×1080)
   ============================================= */
.tools-section {
    background: var(--bg-white);
    padding: 25px 0 15px;
}

/* Tool boxes ~30% smaller: 5 cols, less height */
.tools-grid-vertical {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-bottom: 0;
}

.tool-card-vertical {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.tool-card-vertical a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.tool-card-vertical:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Tool box image: use JPG/PNG/WebP. Recommended size – vertical cards ~400×420px (1:1.05); square cards ~400×280px. Min 400px width for sharpness. */
.tool-card-vertical .tool-image {
    position: relative;
    width: 100%;
    padding-top: 105%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.tool-card-vertical .tool-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.tool-card-vertical:hover .tool-image img {
    transform: scale(1.05);
}

.tool-card-vertical .placeholder-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tool-card-vertical .tool-content {
    padding: 12px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50px;
    background: var(--bg-white);
}

.tool-card-vertical .tool-title {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    width: 100%;
}

/* =============================================
   Shared grid & cards (Blog Posts, Medico News – square style unchanged)
   ============================================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 0;
}

.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.tool-image {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.placeholder-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
/* Hide placeholder when img is present; show on img onerror (placeholder-visible) */
.tool-image .placeholder-gradient {
    position: absolute;
    top: 0;
    left: 0;
}
.tool-image .placeholder-gradient:not(.placeholder-visible) {
    display: none;
}
.tool-card-vertical .tool-image .placeholder-gradient.placeholder-visible {
    display: block;
}

/* Posts Section (Blog Posts, Medico News) */
.posts-section {
    background: var(--bg-white);
    padding: 10px 0 15px;
}

.section-title:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tool-content {
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

/* =============================================
   Category Buttons Section
   ============================================= */
.category-section {
    padding: 10px 0;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.category-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-btn.large {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* Category Boxes – 3 per line, simple style, center-aligned text, 15–20 posts */
.category-boxes-section {
    padding: 30px 0 40px;
    background: var(--bg-light, #fdf4ff);
}

.category-boxes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-box {
    background: var(--bg-white);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.category-box-header {
    background: #7f1d1d;
    color: white;
    margin: 0;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.category-box-list {
    list-style: none;
    margin: 0;
    padding: 12px 14px;
    flex: 1;
    text-align: center;
}

.category-box-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.category-box-list li:last-child {
    border-bottom: none;
}

.category-box-list a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
}

.category-box-list a:hover {
    text-decoration: underline;
}

.category-box-date {
    font-size: 0.78rem;
    color: var(--text-muted, #6b7280);
}

.category-box-viewmore {
    display: block;
    text-align: center;
    padding: 10px 14px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.category-box-viewmore:hover {
    background: #1d4ed8;
    color: white;
}

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

@media (max-width: 600px) {
    .category-boxes-grid {
        grid-template-columns: 1fr;
    }
}

/* Category page: single box (same style, list without thumbnails) */
.category-page-list .container {
    max-width: 900px;
}

.category-single-box {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.category-single-box .category-box-header {
    font-size: 1.2rem;
    padding: 18px 20px;
}

.category-single-box .category-box-list {
    padding: 16px 20px;
}

.category-single-box .category-box-list li {
    padding: 12px 0;
}

.category-single-box .category-box-list a {
    font-size: 1rem;
}

/* Featured Buttons (Blog Posts, Medico News) */
.featured-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
}

.featured-btn {
    display: inline-block;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.featured-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* =============================================
   Posts Grid
   ============================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.post-image {
    height: 180px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Featured image: URL or HTML embed */
.post-featured-embed,
.tool-image .post-featured-embed,
.post-image .post-featured-embed {
    max-width: 100%;
    overflow: hidden;
}
.post-featured-embed img,
.post-featured-embed iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

.post-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--bg-light);
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

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

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

.post-meta i {
    margin-right: 5px;
}

/* =============================================
   Page Content
   ============================================= */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 0;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-content {
    padding: 60px 0;
}

.page-content .content-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.page-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-content p {
    margin-bottom: 15px;
    color: var(--text-light);
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-dark);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.copyright {
    color: var(--text-light);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

/* =============================================
   Alerts & Messages
   ============================================= */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* =============================================
   Forms
   ============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* =============================================
   Utilities
   ============================================= */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 40px; }
.mt-2 { margin-top: 20px; }
.mt-4 { margin-top: 40px; }

/* =============================================
   Responsive Styles
   ============================================= */
@media (max-width: 1024px) {
    .tools-grid-vertical {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tool-card-vertical .tool-image {
        padding-top: 105%;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .nav-link {
        display: block;
        padding: 12px 15px;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .tools-grid-vertical {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .tool-card-vertical .tool-image {
        padding-top: 105%;
    }
    
    .tool-card-vertical .tool-content {
        min-height: 46px;
        padding: 10px;
    }
    
    .tool-card-vertical .tool-title {
        font-size: 0.85rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .tool-image {
        height: 110px;
    }
    
    .section-title {
        font-size: 1.2rem;
        padding: 12px 25px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tools-grid-vertical {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tool-card-vertical .tool-image {
        padding-top: 100%;
    }
    
    .tool-card-vertical .tool-title {
        font-size: 0.9rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-image {
        height: 120px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .category-buttons {
        gap: 10px;
    }
    
    .category-btn {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

