/* ========================================
   AIToolsValue - Brand Stylesheet
   Color Palette from brand guidelines
   ======================================== */

:root {
    --primary-900: #010147;
    --primary-800: #050798;
    --primary-700: #0D11F2;
    --primary-600: #2F63FB;
    --primary-500: #6390FC;
    --primary-400: #9CBBFD;
    --primary-300: #D5E2FE;
    --primary-100: #ECF5FF;

    --accent-900: #2B025C;
    --accent-800: #5106A4;
    --accent-700: #7B0DF2;
    --accent-600: #9666FD;
    --accent-500: #B299FE;
    --accent-400: #D5CAFE;
    --accent-100: #FAF9FF;

    --blue-900: #011E3F;
    --blue-800: #033E77;
    --blue-700: #0761B5;
    --blue-600: #0D84F2;
    --blue-500: #62A9FD;
    --blue-400: #AAD0FE;
    --blue-100: #ECF5FF;

    --neutral-900: #191B1C;
    --neutral-800: #383B3D;
    --neutral-700: #595F61;
    --neutral-600: #7B8285;
    --neutral-500: #9BA3A8;
    --neutral-400: #C2C9CC;
    --neutral-300: #EDEFF0;
    --neutral-100: #F8F9FA;
    --white: #FFFFFF;

    --gradient-primary: linear-gradient(135deg, #010147, #0D11F2);
    --gradient-accent: linear-gradient(135deg, #0D11F2, #7B0DF2);
    --gradient-blue: linear-gradient(135deg, #0D84F2, #2F63FB);
    --gradient-hero: linear-gradient(160deg, #010147 0%, #050798 40%, #0D11F2 100%);

    --shadow-sm: 0 1px 2px rgba(1, 1, 71, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(1, 1, 71, 0.07), 0 2px 4px -2px rgba(1, 1, 71, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(1, 1, 71, 0.08), 0 4px 6px -4px rgba(1, 1, 71, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(1, 1, 71, 0.1), 0 8px 10px -6px rgba(1, 1, 71, 0.05);
    --shadow-glow: 0 0 40px rgba(13, 17, 242, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    color: var(--neutral-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--neutral-300);
    box-shadow: var(--shadow-sm);
}

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

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

.logo-img {
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--neutral-700);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-700);
}

.nav-cta {
    background: var(--primary-700);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 600 !important;
    transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
    background: var(--primary-800) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--neutral-900);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    background-image: url('/assets/images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding-top: 72px;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(1, 1, 71, 0.75) 0%, rgba(5, 7, 152, 0.6) 50%, rgba(13, 17, 242, 0.5) 100%);
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-700);
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--blue-600);
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-500);
    top: 40%;
    left: 50%;
    animation: float 12s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-content {
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero h1 {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #9CBBFD, #D5CAFE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-search {
    margin-bottom: 40px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 6px;
    box-shadow: var(--shadow-xl);
    max-width: 520px;
}

.search-icon {
    width: 20px;
    height: 20px;
    margin-left: 16px;
    color: var(--neutral-500);
    flex-shrink: 0;
}

.search-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px;
    font-size: 0.938rem;
    font-family: var(--font-family);
    color: var(--neutral-900);
    background: transparent;
    min-width: 0;
}

.search-wrapper input::placeholder {
    color: var(--neutral-500);
}

.search-btn {
    background: var(--primary-700);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.938rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-800);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    text-align: center;
    min-width: 100px;
}

.stat-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.stat-label {
    display: block;
    font-size: 0.813rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* Hero Visual - Floating Cards */
.hero-visual {
    position: relative;
    height: 400px;
}

.hero-card {
    position: absolute;
    animation: cardFloat 6s ease-in-out infinite;
}

.hero-card-1 {
    top: 20px;
    right: 20px;
    animation-delay: 0s;
}

.hero-card-2 {
    top: 160px;
    left: 0;
    animation-delay: 2s;
}

.hero-card-3 {
    bottom: 20px;
    right: 60px;
    animation-delay: 4s;
}

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

.tool-card-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 240px;
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon svg {
    width: 24px;
    height: 24px;
}

.tool-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.tool-card-mini strong {
    display: block;
    font-size: 0.938rem;
    color: var(--neutral-900);
}

.stars {
    color: #f59e0b;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.badge {
    font-size: 0.688rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-top {
    background: #dcfce7;
    color: #166534;
}

.badge-new {
    background: #dbeafe;
    color: #1e40af;
}

.badge-deal {
    background: #fef3c7;
    color: #92400e;
}

/* ========================================
   Trusted By
   ======================================== */

.trusted-by {
    background: var(--neutral-100);
    padding: 20px 0;
    border-bottom: 1px solid var(--neutral-300);
    overflow: hidden;
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 60s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 0 24px;
}

.trusted-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.trusted-logo svg {
    flex-shrink: 0;
}

.trusted-logo span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   Section Common
   ======================================== */

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-tag {
    display: inline-block;
    font-size: 0.813rem;
    font-weight: 700;
    color: var(--primary-700);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--neutral-900);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.063rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

/* ========================================
   Categories
   ======================================== */

.categories {
    padding: 100px 0;
    position: relative;
    background-image: url('/assets/images/categories-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.categories::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(1, 1, 71, 0.88) 0%, rgba(5, 7, 152, 0.82) 50%, rgba(13, 17, 242, 0.85) 100%);
    pointer-events: none;
    z-index: 0;
}

.categories > .container {
    position: relative;
    z-index: 1;
}

.categories .section-header h2,
.categories .section-header p {
    color: var(--white);
}

.categories .section-tag {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

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

.category-card {
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-decoration: none;
}

.category-card:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(13, 17, 242, 0.3);
    transform: translateY(-6px);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(47, 99, 251, 0.4), rgba(123, 13, 242, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon svg {
    width: 28px;
    height: 28px;
    color: var(--white);
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, rgba(47, 99, 251, 0.7), rgba(123, 13, 242, 0.7));
    border-color: rgba(255, 255, 255, 0.4);
}

.category-card:hover .category-icon svg {
    color: var(--white);
}

.category-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
}

.category-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.category-count {
    font-size: 0.813rem;
    font-weight: 600;
    color: rgba(47, 99, 251, 1);
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    width: fit-content;
    margin-top: auto;
}

/* ========================================
   Top Tools
   ======================================== */

.top-tools {
    padding: 100px 0;
    background: var(--neutral-100);
}

.tools-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-full);
    background: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-400);
    color: var(--primary-700);
}

.filter-btn.active {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: var(--white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--neutral-300);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-400);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tool-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card-icon svg {
    width: 28px;
    height: 28px;
}

.tool-card-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.tool-rank {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--primary-700);
    background: var(--primary-100);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars-row {
    color: #f59e0b;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.tool-rating span {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--neutral-700);
}

.tool-pricing {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--blue-700);
    background: var(--blue-100);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.tool-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neutral-600);
    background: var(--neutral-300);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-700);
    margin-top: auto;
    transition: gap 0.2s;
}

.tool-link:hover {
    gap: 10px;
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.938rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-800);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: var(--primary-700);
    color: var(--white);
    transform: translateY(-1px);
}

/* ========================================
   Comparisons
   ======================================== */

.comparisons {
    padding: 100px 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.comparison-card {
    background: var(--white);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comparison-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-400);
}

.comparison-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.comparison-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.comp-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 800;
}

.comp-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    font-size: 1.25rem;
}

.comparison-tool span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-900);
}

.vs-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-700);
    background: var(--primary-100);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.comparison-card p {
    font-size: 0.875rem;
    color: var(--neutral-600);
    text-align: center;
    line-height: 1.5;
}

.comparison-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-700);
    text-align: center;
}

/* ========================================
   How It Works
   ======================================== */

.how-it-works {
    padding: 100px 0;
    background: var(--gradient-hero);
    color: var(--white);
}

.how-it-works .section-tag {
    color: var(--primary-400);
}

.how-it-works .section-header h2 {
    color: var(--white);
}

.how-it-works .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.process-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.process-step {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}

.process-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
    line-height: 1;
}

.process-step h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.process-step p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.process-connector {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 30px;
    flex-shrink: 0;
}

/* ========================================
   Blog
   ======================================== */

.blog {
    padding: 100px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.blog-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--neutral-300);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-400);
}

.blog-featured {
    grid-row: span 2;
}

.blog-img {
    height: 200px;
    position: relative;
}

.blog-featured .blog-img {
    height: 280px;
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.blog-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-700);
    background: var(--primary-100);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.blog-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    line-height: 1.4;
}

.blog-featured h3 {
    font-size: 1.375rem;
}

.blog-content p {
    font-size: 0.875rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    gap: 16px;
    margin-top: auto;
}

.blog-meta span {
    font-size: 0.813rem;
    color: var(--neutral-500);
}

/* ========================================
   Newsletter
   ======================================== */

.newsletter {
    padding: 100px 0;
    background: var(--neutral-100);
}

.newsletter-card {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(123, 13, 242, 0.15);
    top: -200px;
    right: -100px;
}

.newsletter-content {
    position: relative;
    z-index: 1;
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.newsletter-content > p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.063rem;
    margin-bottom: 24px;
    max-width: 480px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.938rem;
    font-family: var(--font-family);
    outline: none;
    min-width: 0;
}

.newsletter-form .btn-primary {
    white-space: nowrap;
    border-radius: var(--radius-md);
}

.newsletter-disclaimer {
    font-size: 0.813rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: 12px !important;
}

.newsletter-visual {
    position: relative;
    z-index: 1;
}

.newsletter-icon {
    color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--neutral-900);
    color: var(--neutral-400);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 32px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 300px;
}

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

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--neutral-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-400);
    transition: all 0.2s;
}

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

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--neutral-500);
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid var(--neutral-800);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    font-size: 0.813rem;
    color: var(--neutral-600);
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .process-grid {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .process-connector {
        width: 2px;
        height: 30px;
        margin-top: 0;
    }

    .newsletter-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 24px;
    }

    .newsletter-form {
        max-width: 100%;
    }

    .newsletter-visual {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--neutral-300);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding-left: 16px;
        padding-right: 16px;
        overflow-x: hidden;
    }

    .hero h1 {
        font-size: 1.75rem;
        word-wrap: break-word;
    }

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

    .hero-search {
        max-width: 100%;
    }

    .search-wrapper {
        flex-direction: column;
        padding: 12px;
        max-width: 100%;
    }

    .search-icon {
        display: none;
    }

    .search-wrapper input {
        width: 100%;
        text-align: center;
        font-size: 0.875rem;
    }

    .search-btn {
        width: 100%;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat {
        min-width: 70px;
    }

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

    .stat-suffix {
        font-size: 1.125rem;
    }

    .stat-divider {
        height: 30px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-featured {
        grid-row: span 1;
    }

    .tools-filter {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.813rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

}

/* ========================================
   Modal Popups
   ======================================== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(1, 1, 71, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(1, 1, 71, 0.25);
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px 20px;
    border-bottom: 1px solid var(--neutral-300);
    position: sticky;
    top: 0;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 1;
}

.modal-header h2 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--neutral-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-600);
    font-size: 1.25rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--neutral-300);
    color: var(--neutral-900);
}

.modal-body {
    padding: 28px 32px 36px;
    font-size: 0.938rem;
    color: var(--neutral-700);
    line-height: 1.7;
}

.modal-body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 28px 0 10px;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin: 10px 0;
}

.modal-body ul {
    padding-left: 20px;
    margin: 10px 0;
    list-style: disc;
}

.modal-body li {
    margin: 6px 0;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 12px;
    }
    .modal-header {
        padding: 20px;
    }
    .modal-body {
        padding: 20px;
    }
    .modal-header h2 {
        font-size: 1.125rem;
    }
}

/* ========================================
   Page Hero (subpages)
   ======================================== */

.page-hero {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 50%, var(--accent-800) 100%);
    padding: 140px 0 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(1, 1, 71, 0.75);
    z-index: 0;
}

.page-hero > .container {
    position: relative;
    z-index: 1;
}

.page-hero .section-tag {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.page-hero .section-header h1 {
    color: white;
}

.page-hero .section-header p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .page-hero {
        padding: 120px 0 40px;
    }
    .page-hero .section-header h1 {
        font-size: 1.75rem;
    }
}
