/**
 * HyperCreative AI - Main Stylesheet
 * Mobile-first responsive design
 */

/* ============================================
   CSS VARIABLES (Design System)
   ============================================ */
:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #8B5CF6;
    --accent: #EC4899;
    --text: #1F2937;
    --text-light: #6B7280;
    --bg: #F9FAFB;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 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: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-system);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.site-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.site-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.logo-text-only {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.logo-text-only:hover {
    background: linear-gradient(135deg, #c084fc 0%, #f472b6 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .nav-link .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 1000;
    list-style: none;
    
    /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--bg);
    color: var(--primary);
    padding-left: 1.5rem;
}

.dropdown-menu a span {
    margin-right: 0.5rem;
}

/* Header Search */
.header-search {
    min-width: 250px;
}

.search-form {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
}

.search-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-button:hover {
    background: var(--primary-dark);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-search-wrapper {
    margin-bottom: 2rem;
}

.hero-search-form {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-search-form:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.hero-search-input {
    flex: 1;
    padding: 1.25rem 1.75rem;
    border: none;
    font-size: 1.1rem;
    color: var(--text);
    background: transparent;
}

.hero-search-input:focus {
    outline: none;
}

.hero-search-input::placeholder {
    color: var(--text-light);
}

.hero-search-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-search-button:hover {
    background: var(--primary-dark);
}

.hero-search-button .search-icon {
    font-size: 1.3rem;
}

/* Hero CTAs */
.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-hero-primary,
.btn-hero-secondary {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero-primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: var(--primary);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: var(--white);
}

/* Hero Features */
.hero-features {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 1rem;
}

.hero-feature .feature-icon {
    font-size: 1.5rem;
}

.hero-feature .feature-text {
    font-weight: 500;
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}

.search-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.search-page-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.search-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.search-page-form {
    margin-bottom: 1.5rem;
}

.search-page-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-page-input-wrapper:focus-within {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-page-icon {
    font-size: 1.5rem;
    padding: 0 1.25rem;
    color: var(--text-light);
}

.search-page-input {
    flex: 1;
    padding: 1.25rem 0;
    border: none;
    font-size: 1.1rem;
    color: var(--text);
    background: transparent;
}

.search-page-input:focus {
    outline: none;
}

.search-page-input::placeholder {
    color: var(--text-light);
}

.search-page-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-page-button:hover {
    background: var(--primary-dark);
}

.search-results-meta {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
}

.search-results-meta .results-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.search-results-meta strong {
    color: var(--white);
}

/* Search Filter Tabs */
.search-filter-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
    font-weight: 700;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

.card-body {
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ============================================
   TOOL CARDS
   ============================================ */
.tool-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.tool-card:hover .tool-card-image {
    transform: scale(1.08);
}

.tool-card:hover .tool-logo {
    transform: scale(1.1) rotate(5deg);
}

.tool-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Tool Card Styles */
.modern-tool-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    padding: 0 !important;
}

.modern-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-tool-card:hover::before {
    opacity: 1;
}

.modern-tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

/* Pricing Badge Corner */
.pricing-badge-corner {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Premium & Sponsored Badges */
.premium-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.badge-sponsored {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    animation: badge-glow 2s ease-in-out infinite;
}

.badge-verified {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.badge-premium {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(251, 191, 36, 0.5);
    }
}

/* Sponsored Tool Card Highlight */
.tool-card.sponsored {
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    position: relative;
}

.tool-card.sponsored::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.1;
}

.tool-card.sponsored:hover {
    box-shadow: 0 20px 60px rgba(251, 191, 36, 0.25);
}

.pricing-badge-corner.free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.pricing-badge-corner.freemium {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

.pricing-badge-corner.paid {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Tool Logo Header */
.tool-logo-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tool-logo-header::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.tool-logo-container {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.modern-tool-card:hover .tool-logo-container {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.tool-logo-modern {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.logo-placeholder {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 0.625rem;
}

/* Tool Card Body */
.tool-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-name-modern {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin: 0;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-tagline-modern {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Categories */
.tool-categories-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.category-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.6875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.category-badge-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tool Stats */
.tool-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.6rem;
    border-top: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.stat-icon {
    font-size: 0.875rem;
}

.stat-text {
    font-weight: 600;
    color: #475569;
}

/* Action Button */
.tool-card-action {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-modern-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.btn-modern-primary .btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-modern-primary:hover .btn-icon {
    transform: translateX(4px);
}

/* Legacy Tool Card Styles */
.tool-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin: -1.5rem -1.5rem 1rem;
    background: linear-gradient(135deg, #f0f1f3 0%, #e8eaed 100%);
}

.tool-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-tagline {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.tool-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary);
}

.pricing-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.pricing-badge.free {
    background: #DCFCE7;
    color: #166534;
    border-color: #86EFAC;
}

.pricing-badge.paid {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FCD34D;
}

/* ============================================
   STAR RATING
   ============================================ */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.star {
    color: #FCD34D;
    font-size: 1rem;
}

.star.filled {
    color: #F59E0B;
}

.star.empty {
    color: #E5E7EB;
}

.rating-value {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
}

/* ============================================
   SEARCH PAGE HEADER STYLES
   ============================================ */
.search-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.search-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.05) 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.05) 70%, transparent 70%);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}

.search-page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.search-page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-align: center;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-page-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.95);
    text-align: center;
    margin: 0 0 2rem 0;
}

.search-page-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.search-page-input-wrapper:focus-within {
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.search-page-icon {
    font-size: 1.5rem;
    padding: 0 0.5rem;
    user-select: none;
}

.search-page-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    color: var(--text);
    background: transparent;
}

.search-page-input::placeholder {
    color: var(--text-light);
}

.search-page-button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-page-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.search-results-meta {
    text-align: center;
    margin-top: 1.5rem;
}

.search-results-meta p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin: 0;
}

/* ============================================
   PAGE SEARCH HEADER STYLES (Reusable)
   ============================================ */
.page-search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-search-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.05) 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.05) 70%, transparent 70%);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}

.page-search-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* Full width variant for comparison page */
.page-search-content.full-width {
    max-width: 100%;
}

.page-search-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-align: center;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-search-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.95);
    text-align: center;
    margin: 0 0 2rem 0;
}

.page-search-form {
    margin-bottom: 1.5rem;
}

.page-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.page-search-input-wrapper:focus-within {
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.page-search-icon {
    font-size: 1.5rem;
    padding: 0 0.5rem;
    user-select: none;
}

.page-search-input {
    flex: 1;
    min-width: 200px;
    border: none;
    outline: none;
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    color: var(--text);
    background: transparent;
}

.page-search-input::placeholder {
    color: var(--text-light);
}

.page-search-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.page-search-select:hover {
    border-color: var(--primary);
}

.page-search-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.page-search-button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.page-search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs-container {
    background: var(--bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text);
    font-weight: 600;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-separator {
    color: var(--text-light);
    user-select: none;
}

/* ============================================
   CATEGORY GRID
   ============================================ */
.category-item {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.category-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.category-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ============================================
   COMPARISON CARDS
   ============================================ */
.comparison-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin: -1rem -1rem 1rem -1rem;
}

.comparison-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .comparison-thumbnail {
    transform: scale(1.1);
}

.comparison-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.comparison-image-placeholder .placeholder-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.4;
}

.comparison-card {
    overflow: hidden;
    padding: 0 !important;
}

/* ============================================
   SEARCH RESULT CARDS
   ============================================ */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.clickable-card {
    cursor: pointer;
    height: 100%;
}

.clickable-card h2,
.clickable-card h3 {
    color: var(--text);
    transition: color 0.3s ease;
}

.card-link:hover .clickable-card h2,
.card-link:hover .clickable-card h3 {
    color: var(--primary);
}

.search-result-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.search-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.btn-card-action {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-card-action:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ============================================
   BLOG CARDS
   ============================================ */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid var(--border);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
    border-color: var(--success);
}

.blog-card:hover .blog-featured-image img {
    transform: scale(1.1);
}

.blog-featured-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f1f3 0%, #e8eaed 100%);
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-title {
    color: var(--success) !important;
}

.blog-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Modern Blog Card Styles */
.modern-blog-card {
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0 !important;
    border-radius: 1rem;
}

.modern-blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-blog-card:hover::before {
    opacity: 1;
}

.modern-blog-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.15);
}

/* Blog Image Container */
.blog-image-container {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.blog-featured-image-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.modern-blog-card:hover .blog-featured-image-modern {
    transform: scale(1.1);
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.placeholder-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.placeholder-icon {
    font-size: 4rem;
    filter: brightness(1.2);
}

/* Reading Time Badge */
.blog-read-time-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog Card Body */
.blog-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Meta Information */
.blog-meta-modern {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: #64748b;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-icon {
    font-size: 0.8125rem;
}

.meta-divider {
    color: #cbd5e1;
    font-weight: bold;
}

/* Blog Title */
.blog-title-modern {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.blog-title-modern a {
    color: #1e293b;
    text-decoration: none;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.2s ease;
}

.blog-title-modern a:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Blog Excerpt */
.blog-excerpt-modern {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Tags */
.blog-tags-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-modern {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid #fcd34d;
    transition: all 0.2s ease;
}

.tag-modern:hover {
    background: #fcd34d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(252, 211, 77, 0.3);
}

/* Blog Card Action */
.blog-card-action {
    padding: 1.25rem 1.5rem;
    background: #fef3c7;
    border-top: 1px solid #fcd34d;
}

.btn-modern-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-modern-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-modern-secondary .btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-modern-secondary:hover .btn-icon {
    transform: translateX(4px);
}

/* Legacy Blog Styles */
.blog-featured-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin: -1.5rem -1.5rem 1rem;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text);
    transition: color 0.2s ease;
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Blog Article Sidebar Styles */
.blog-article-layout {
    align-items: flex-start;
}

.blog-sidebar .sidebar-widget a:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transform: translateX(5px);
}

/* ============================================
   SOCIAL SHARE BUTTONS
   ============================================ */
.social-share-section {
    animation: fadeInUp 0.5s ease;
}

.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.share-twitter {
    background: #1DA1F2;
    color: white;
}

.share-twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

.share-facebook {
    background: #1877F2;
    color: white;
}

.share-facebook:hover {
    background: #1564c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.share-linkedin {
    background: #0A66C2;
    color: white;
}

.share-linkedin:hover {
    background: #084f96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4);
}

.share-copy {
    background: var(--text-dark);
    color: white;
}

.share-copy:hover {
    background: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-copy.copied {
    background: var(--success);
}

@media (max-width: 768px) {
    .social-share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   FILTERS & SORTING
   ============================================ */
.filters-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-checkbox input {
    cursor: pointer;
}

.sort-select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--white);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--text);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-tagline {
    margin-top: 0.5rem;
}

/* ============================================
   ADSENSE BLOCKS
   ============================================ */
.adsense-block {
    margin: 2rem 0;
    text-align: center;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .header-search {
        display: none;
    }
    
    /* Hero Section Responsive */
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-search-form {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }
    
    .hero-search-input {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .hero-search-button {
        padding: 1rem 1.5rem;
        justify-content: center;
    }
    
    .hero-ctas {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Search Page Responsive */
    .search-page-header {
        padding: 2rem 0 3rem 0;
    }
    
    .search-page-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .search-page-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-page-icon {
        display: none;
    }
    
    .search-page-input {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        text-align: center;
    }
    
    .search-page-button {
        padding: 1rem 1.5rem;
        width: 100%;
    }
    
    .search-results-meta {
        font-size: 1rem;
    }
    
    .search-results-meta .results-count {
        font-size: 1.25rem;
    }
    
    /* Page Search Header Responsive */
    .page-search-header {
        padding: 2rem 0 3rem 0;
    }
    
    .page-search-title {
        font-size: 1.75rem;
    }
    
    .page-search-subtitle {
        font-size: 1rem;
    }
    
    .page-search-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .page-search-icon {
        display: none;
    }
    
    .page-search-input {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        text-align: center;
        min-width: unset;
    }
    
    .page-search-select {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .page-search-button {
        padding: 1rem 1.5rem;
        width: 100%;
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-xl);
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-item.has-dropdown .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        margin: 0;
        padding-left: 1rem;
        background: var(--bg);
        border-radius: 0;
    }
    
    .nav-item.has-dropdown.mobile-open .dropdown-menu {
        display: block;
        opacity: 1;
        transform: none;
    }
    
    .nav-link {
        display: flex;
        justify-content: space-between;
        padding: 1rem 0;
        width: 100%;
    }
    
    .nav-link .dropdown-arrow {
        transition: transform 0.3s ease;
    }
    
    .nav-item.mobile-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-menu a {
        padding: 0.75rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Directory Page - Sidebar Filters */
    .directory-layout {
        grid-template-columns: 1fr !important;
    }
    
    .filters-section {
        margin-bottom: 1.5rem;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Tool Detail Page - Two Column Layout */
    .tool-detail-layout {
        grid-template-columns: 1fr !important;
    }
    
    .tool-sidebar {
        order: 2;
    }
    
    .tool-main-content {
        order: 1;
    }
    
    /* Tool Header - Mobile Adjustments */
    .tool-header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .tool-header-flex img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .tool-cta-buttons {
        flex-direction: column !important;
        width: 100%;
    }
    
    .tool-cta-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Filter Tabs Mobile */
    .search-filter-tabs {
        gap: 0.5rem;
    }
    
    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Blog Article Detail - Meta Info */
    .article-meta-flex {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: flex-start !important;
    }

    /* Blog Article Layout - Single Column on Mobile */
    .blog-article-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .blog-sidebar {
        order: 2;
    }

    .blog-main-content {
        order: 1;
    }
    
    /* Comparison Detail - Two Column Grid */
    .comparison-tools-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .comparison-proscons-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Comparison Table - Horizontal Scroll */
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Container Narrow - Full Width on Mobile */
    .container-narrow {
        max-width: 100% !important;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Tool Detail - Smaller Screens */
    .tool-header-flex h1 {
        font-size: 1.5rem !important;
    }
    
    .tool-header-flex p {
        font-size: 1rem !important;
    }
    
    .tool-header-flex img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Page Search Form - Smaller */
    .page-search-title {
        font-size: 1.5rem !important;
    }
    
    .page-search-subtitle {
        font-size: 0.875rem !important;
    }
    
    /* Search Filter Tabs - Smaller */
    .filter-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Grid - Full Width Cards */
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    /* Blog Article - Mobile Adjustments */
    .article-meta-flex span {
        font-size: 0.875rem;
    }
    
    article header h1 {
        font-size: 1.75rem !important;
    }
    
    .article-content-box {
        padding: 1.5rem !important;
    }
    
    .article-content {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
    
    /* Comparison Tools Grid - Smaller Padding */
    .comparison-tools-grid > div {
        padding: 1.5rem !important;
    }
    
    .comparison-tools-grid h3 {
        font-size: 1.25rem !important;
    }
    
    /* Category Items - Better Touch Targets */
    .category-item {
        padding: 1.5rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
    
    /* Blog Cards - Compact on Mobile */
    .blog-card {
        padding: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .blog-meta span {
        font-size: 0.75rem;
    }
    
    /* Container Padding Adjustments */
    .container-narrow {
        padding: 0 1rem !important;
    }
    
    /* Breadcrumbs - Smaller Text */
    .breadcrumbs {
        font-size: 0.875rem;
    }
    
    .breadcrumb-item,
    .breadcrumb-separator {
        font-size: 0.875rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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.05'%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");
    opacity: 0.1;
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.newsletter-text {
    flex: 1;
    color: white;
    max-width: 500px;
}

.newsletter-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.newsletter-text h3 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    font-weight: 700;
    line-height: 1.2;
}

.newsletter-text p {
    font-size: 1.125rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
}

.newsletter-form-wrapper {
    flex: 1;
    max-width: 500px;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Override Substack iframe styling */
.newsletter-form-wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 280px !important;
    height: auto !important;
    border: none !important;
    background: transparent !important;
    display: block;
}

/* Style custom forms */
.newsletter-form-wrapper .substack-form,
.newsletter-form-wrapper form {
    width: 100%;
}

.newsletter-form-wrapper input[type="email"] {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.newsletter-form-wrapper input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.newsletter-form-wrapper button[type="submit"],
.newsletter-form-wrapper input[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.newsletter-form-wrapper button[type="submit"]:hover,
.newsletter-form-wrapper input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 968px) {
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .newsletter-text {
        max-width: 100%;
    }
    
    .newsletter-text h3 {
        font-size: 2rem;
    }
    
    .newsletter-form-wrapper {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .newsletter-section {
        padding: 3rem 0;
        margin-top: 3rem;
    }
    
    .newsletter-content {
        gap: 2rem;
    }
    
    .newsletter-icon {
        font-size: 3rem;
    }
    
    .newsletter-text h3 {
        font-size: 1.75rem;
    }
    
    .newsletter-text p {
        font-size: 1rem;
    }
    
    .newsletter-form-wrapper {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }

/* ============================================
   FORM STYLES
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark, var(--text));
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background-color: var(--white);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

select.form-input,
.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    appearance: none;
}

.form-help-text,
.form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.4;
}

.form-error {
    border-color: var(--error);
}

.form-error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-success {
    border-color: var(--success);
}

/* File input styling */
input[type="file"].form-input {
    border-style: dashed;
}

input[type="file"].form-input:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.02);
}

/* Disabled state */
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: var(--bg);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   AD CONTAINERS
   ============================================ */
.ad-container {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
}

.ad-position-header {
    margin: 1rem auto 2rem;
}

.ad-position-sidebar {
    margin: 1rem 0;
    position: sticky;
    top: 100px;
}

.ad-position-content-top {
    margin: 2rem auto 3rem;
}

.ad-position-content-mid {
    margin: 3rem auto;
}

.ad-position-content-bottom {
    margin: 3rem auto 2rem;
}

.ad-position-between-tools {
    margin: 2rem auto;
}

.ad-position-footer {
    margin: 2rem auto 1rem;
}

.custom-ad-banner {
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.custom-ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.custom-ad-banner img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ============================================
   TOAST ANIMATIONS
   ============================================ */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

