/* Base styles and variables */
:root {
    /* Colors */
    --primary-color: #0b6cc7;
    --primary-hover: #085299;
    --secondary-color: #10b981;
    --bg-color: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Icon Colors */
    --icon-blue: #3b82f6;
    --icon-green: #10b981;
    --icon-purple: #8b5cf6;
    --icon-orange: #f97316;
    --icon-gray: #94a3b8;
    
    /* Grid & Spacing */
    --container-width: 1100px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    /* Shadows & Radii */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.05);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Typography */
    --text-h1: clamp(1.75rem, 5vw + 1rem, 3.5rem);
    --text-h2: clamp(1.35rem, 4vw + 0.25rem, 2.25rem);
    --text-h3: clamp(1.1rem, 2vw + 0.25rem, 1.25rem);
    --text-lg: clamp(1rem, 1.5vw + 0.5rem, 1.15rem);
    --text-base: 1rem;
    --text-sm: 0.9rem;
    --text-xs: 0.75rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header */
.navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--primary-color);
}

.logo i {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: var(--text-sm);
    white-space: nowrap;
}

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

.nav-links a.nav-active {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
}

.nav-links a.nav-active::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.nav-divider {
    width: 1px;
    height: 18px;
    background: var(--border-color);
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 110;
}

.nav-backdrop.active {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

/* ── Right-side drawer ── */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 280px;
    background: var(--bg-white);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    z-index: 120;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

/* Drawer header */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.mobile-nav-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.mobile-nav-close:hover {
    background: var(--bg-color);
    color: var(--text-main);
}

/* Drawer body */
.mobile-nav-body {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.mobile-nav-section {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.25rem;
}

.mobile-nav-section + .mobile-nav-section {
    border-top: 1px solid var(--border-color);
}

.mobile-nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.25rem 0 0.6rem;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    margin: 0 -0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-main);
    font-size: var(--text-sm);
    transition: background 0.15s, color 0.15s;
}

.mobile-nav a svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.15s;
}

.mobile-nav a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.mobile-nav a:hover svg {
    color: var(--primary-color);
}

/* Drawer footer */
.mobile-nav-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Breadcrumb ── */
.breadcrumb {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}
.breadcrumb-container {
    display: flex;
    align-items: center;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}
.bc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.75rem 0.45rem 0.4rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.bc-back-btn:hover { background: var(--bg-light, #f3f4f6); color: var(--primary-dark, #1d4ed8); }
.bc-back-btn svg { flex-shrink: 0; }

/* ── Mobile nav active state ── */
.mobile-nav a.mobile-nav-active {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(11,108,199,0.06);
}
.mobile-nav a.mobile-nav-active svg {
    color: var(--primary-color);
}

/* ── Back to top ── */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(11,108,199,0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s, background 0.15s;
    pointer-events: none;
    z-index: 90;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--primary-hover);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    text-align: center;
    background: var(--bg-white);
    overflow-x: clip;
    overflow-y: visible;
    border-bottom: 1px solid var(--border-color);
}

.hero-bg-blur {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(11, 108, 199, 0.08) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: var(--text-h1);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.hero p {
    font-size: var(--text-lg);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-form:focus-within {
    box-shadow: 0 10px 30px rgba(11, 108, 199, 0.15);
    border-color: var(--primary-color);
}

.search-icon {
    color: var(--text-muted);
    margin-left: 1rem;
    width: 20px;
    height: 20px;
}

.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
}

.search-form input::placeholder {
    color: #94a3b8;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

/* =====================
   Search Results Dropdown
   ===================== */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    z-index: 200;
    overflow: hidden;
    max-height: 380px;
    overflow-y: auto;
}

.search-results-dropdown.open {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

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

.search-result-item:hover,
.search-result-item.active {
    background-color: #f8fafc;
}

.search-result-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.search-result-title {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-main);
}

.search-result-title mark {
    background: #fef9c3;
    color: #92400e;
    border-radius: 2px;
    padding: 0 1px;
}

.search-result-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.search-result-item:hover .search-result-arrow,
.search-result-item.active .search-result-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.search-no-results {
    padding: 1rem 1.5rem 0.25rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}
.search-did-you-mean {
    padding: 0.25rem 1.5rem 0.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

/* Category Sections */
.category-section {
    padding: var(--spacing-xl) 0;
}

.secondary-bg {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.category-section h2 {
    font-size: var(--text-h2);
    font-weight: 700;
    margin-bottom: 2rem;
    color: #0f172a;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin-bottom: 0;
}

.badge {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grids */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.upcoming-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.calc-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.calc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card-icon-wrapper i {
    width: 24px;
    height: 24px;
}

.card-icon-wrapper.blue { background-color: #eff6ff; color: var(--icon-blue); }
.card-icon-wrapper.green { background-color: #ecfdf5; color: var(--icon-green); }
.card-icon-wrapper.purple { background-color: #f5f3ff; color: var(--icon-purple); }
.card-icon-wrapper.orange { background-color: #fff7ed; color: var(--icon-orange); }
.card-icon-wrapper.gray { background-color: #f1f5f9; color: var(--icon-gray); }

.calc-card h3 {
    font-size: var(--text-h3);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.calc-card p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
}

/* Upcoming Cards */
.upcoming-card {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    pointer-events: none; /* Make them visually look like coming soon, not clickable */
}

.upcoming-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

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

.coming-soon-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    background-color: #e2e8f0;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

/* Trust Section */
.trust-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.trust-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

.trust-item {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trust-icon {
    width: 60px;
    height: 60px;
    background-color: #f1f5f9;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.trust-icon i {
    width: 28px;
    height: 28px;
}

.trust-item h3 {
    font-size: var(--text-h3);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.trust-item p {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: #0f172a;
    color: #cbd5e1;
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
    display: inline-flex;
}

.footer-brand p {
    font-size: var(--text-sm);
    color: #94a3b8;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1e293b;
    transition: all 0.2s ease;
}

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

.social-icons i {
    width: 18px;
    height: 18px;
}

.footer-links h3 {
    color: white;
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    font-size: var(--text-sm);
    margin-bottom: 0.75rem;
}

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

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 1.5rem 0;
    text-align: center;
    color: #64748b;
    font-size: var(--text-sm);
}

/* =====================
   Section header with icon
   ===================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-cat-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.view-all-link:hover {
    color: var(--primary-hover);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-color);
}

.card-icon-wrapper.red  { background-color: #fef2f2; color: #ef4444; }
.card-icon-wrapper.pink { background-color: #fdf2f8; color: #ec4899; }
.card-icon-wrapper.teal { background-color: #f0fdfa; color: #14b8a6; }

/* =====================
   Section description
   ===================== */
.section-desc {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin-top: -1.25rem;
    margin-bottom: 2rem;
}

/* =====================
   Platform Category Cards
   ===================== */
.platform-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.platform-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

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

.platform-card-icon.red  { background-color: #fef2f2; color: #ef4444; }
.platform-card-icon.pink { background-color: #fdf2f8; color: #ec4899; }
.platform-card-icon.teal { background-color: #f0fdfa; color: #14b8a6; }

.platform-card-body {
    flex: 1;
    min-width: 0;
}

.platform-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.platform-card-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.tool-count {
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.platform-card-body p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.platform-card-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.platform-card:hover .platform-card-arrow {
    transform: translateX(4px);
    color: var(--primary-color);
}

/* =====================
   Category Hero
   ===================== */
.category-hero {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 2.5rem 0 2rem;
}

.category-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.category-hero-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.category-hero-content h1 {
    font-size: var(--text-h2);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.category-hero-content p {
    font-size: var(--text-base);
    color: var(--text-muted);
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

/* =====================
   Calculator Page Hero
   ===================== */
.calc-page-hero {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 2.5rem 0 2.25rem;
}

.calc-page-title {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.calc-page-title h1 {
    font-size: clamp(1.4rem, 3vw + 0.5rem, 2rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.calc-page-title p {
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 600px;
}

/* =====================
   Calculator Tool Section
   ===================== */
.calc-tool-section {
    padding: var(--spacing-xl) 0;
}

.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.calc-form-card,
.calc-results-card,
.calc-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.calc-form-card h2,
.calc-results-card h2 {
    font-size: var(--text-h3);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.calc-info-card {
    grid-column: 1 / -1;
    background: #f8fafc;
}

.calc-info-card h3 {
    font-size: var(--text-h3);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.label-hint {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.input-with-icon {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-with-icon:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 108, 199, 0.1);
}

.input-with-icon.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Parse hint (shown below shorthand view inputs) */
.parse-hint {
    font-size: var(--text-xs);
    margin-top: 0.35rem;
    min-height: 1.2em;
    transition: color 0.15s ease;
}

.parse-hint--ok {
    color: #10b981;
    font-weight: 600;
}

.parse-hint--error {
    color: #ef4444;
    font-weight: 500;
}

.input-with-icon svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.input-with-icon input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    min-width: 0;
}

.input-with-icon input::placeholder {
    color: #94a3b8;
}

/* CPM Presets */
.cpm-presets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.preset-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.preset-btn {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

/* Calc Button */
.calc-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

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

.calc-btn:active {
    transform: scale(0.99);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 1.5rem;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.result-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-item.highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.result-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.result-item.highlight .result-value {
    color: var(--primary-color);
}

.result-range {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.result-note {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.5;
}

/* Engagement bar */
.engagement-bar-wrap {
    margin: 1rem 0;
}

.engagement-bar-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.engagement-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.engagement-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Progress bar */
.progress-bar-wrap {
    margin: 1rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
}

.progress-track {
    height: 12px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.ypp-message {
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-md);
}

.ypp-success {
    background: #ecfdf5;
    color: #065f46;
}

.ypp-pending {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Milestone rows */
.milestone-list {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.milestone-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: var(--text-sm);
}

.milestone-num {
    font-weight: 700;
    color: var(--primary-color);
}

.milestone-date {
    color: var(--text-muted);
}

.milestone-date em {
    font-style: normal;
    font-weight: 600;
    color: var(--text-main);
}

/* Info list */
.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-list li {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.55;
    padding-left: 1rem;
    border-left: 3px solid var(--border-color);
}

.info-list li strong {
    color: var(--text-main);
}

/* Rating badge */
.rating-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.rating-badge.low       { background: #fef2f2; color: #b91c1c; }
.rating-badge.avg       { background: #fff7ed; color: #c2410c; }
.rating-badge.good      { background: #ecfdf5; color: #065f46; }
.rating-badge.excellent { background: #f5f3ff; color: #6d28d9; }
.rating-badge.viral     { background: #eff6ff; color: #1d4ed8; }

/* Inline field error */
.field-error {
    font-size: var(--text-sm);
    color: #dc2626;
    margin-top: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    border-left: 3px solid #dc2626;
    display: none;
}
.field-error.visible { display: block; }

/* =====================
   Responsive
   ===================== */
@media (max-width: 768px) {
    /* --- Navigation --- */
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* --- Container --- */
    .container {
        padding: 0 1rem;
    }

    /* --- Hero --- */
    .hero {
        padding: 2.5rem 0 2.5rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    /* --- Search --- */
    .search-form {
        flex-direction: row;
        border-radius: var(--radius-full);
        padding: 0.3rem 0.3rem 0.3rem 0.75rem;
        gap: 0;
    }

    .search-icon {
        display: none;
    }

    .search-form input {
        flex: 1;
        width: 0;
        font-size: 0.9rem;
        padding: 0.55rem 0.5rem;
        text-align: left;
    }

    .search-btn {
        width: auto;
        flex-shrink: 0;
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
        border-radius: var(--radius-full);
    }

    .search-results-dropdown {
        border-radius: var(--radius-md);
    }

    .search-result-item {
        padding: 0.75rem 1rem;
    }

    .search-result-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.45rem;
    }

    /* --- Sections --- */
    .category-section, .trust-section {
        padding: 2.5rem 0;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* --- Grids --- */
    .grid-container {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

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

    /* --- Platform Cards (homepage) --- */
    .platform-card {
        padding: 1rem 1.1rem;
        gap: 1rem;
    }

    .platform-card-icon {
        width: 48px;
        height: 48px;
    }

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

    .platform-card-arrow {
        display: none;
    }

    /* --- Trust Section --- */
    .trust-item {
        min-width: 0;
        flex: 1 1 100%;
    }

    /* --- Footer --- */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* --- Category / Calculator page hero --- */
    .category-hero {
        padding: 1.75rem 0 1.5rem;
    }

    .category-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .calc-page-hero {
        padding: 1.75rem 0 1.5rem;
    }

    .calc-page-title {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .calc-page-title h1 {
        font-size: 1.35rem;
    }

    /* --- Calculator Tool Layout --- */
    .calc-tool-section {
        padding: 2rem 0;
    }

    .calc-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calc-info-card {
        grid-column: 1;
    }

    .calc-form-card,
    .calc-results-card,
    .calc-info-card {
        padding: 1.25rem;
    }

    /* --- Results Grid --- */
    .results-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .result-item {
        padding: 0.75rem 1rem;
    }

    .result-value {
        font-size: 1.15rem;
    }

    /* --- Milestone rows --- */
    .milestone-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        padding: 0.6rem 0;
    }

    .milestone-date {
        font-size: 0.8rem;
    }
}
