/* ============================================
   MoneyCalcPro - Main Stylesheet
   Modern, Professional, SEO-Optimized
   ============================================ */

/* CSS Variables for Light/Dark Themes */
:root {
    /* Primary Colors */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --secondary: #10B981;
    --secondary-dark: #059669;
    
    /* Light Theme */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --card-bg: #FFFFFF;
    --header-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    
    /* Animation */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --card-bg: #1E293B;
    --header-bg: rgba(15, 23, 42, 0.95);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* ============================================
   Layout & Container
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 960px;
}

.container-wide {
    max-width: 1440px;
}

.section {
    padding: 5rem 0;
}

.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Flexbox */
.flex {
    display: flex;
}

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Spacing */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.header-scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.logo:hover img {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

/* Floating Logo Icon - Fixed Left Side */
.floating-logo {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.floating-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.floating-logo:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.25);
    border-color: var(--primary);
}

@media (max-width: 1200px) {
    .floating-logo {
        display: none;
    }
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(20deg);
}

.theme-toggle i {
    font-size: 1.1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    padding: 6rem 2rem 2rem;
    transition: right var(--transition-base);
    z-index: 999;
    box-shadow: var(--shadow-xl);
}

.nav-mobile.active {
    right: 0;
}

.nav-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 998;
}

.nav-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-mobile .nav-link {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Tool Card */
.tool-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.tool-card-image {
    height: 160px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.tool-card-content {
    padding: 1.5rem;
}

/* Blog Card */
.blog-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    height: 200px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 10rem 0 6rem;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::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.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: white;
    color: var(--primary);
}

.hero .btn-primary:hover {
    background: var(--bg-primary);
}

.hero .btn-outline {
    border-color: white;
    color: white;
}

.hero .btn-outline:hover {
    background: white;
    color: var(--primary);
}

/* Page Hero (smaller) */
.page-hero {
    padding: 8rem 0 4rem;
    background: var(--gradient-primary);
    text-align: center;
}

.page-hero-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.page-hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   Tool Interface Styles
   ============================================ */
.tool-container {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-tertiary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.drop-zone-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.drop-zone-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.drop-zone-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Slider */
.slider-container {
    margin: 1.5rem 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-item input,
.radio-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* Output Area */
.output-area {
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 100px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.footer-logo:hover img {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.6s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.6s ease forwards; }

/* Scroll Animation Classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ============================================
   Utility Classes
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden { display: none !important; }
.visible { display: block !important; }

.rounded { border-radius: 0.5rem; }
.rounded-lg { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }

.text-white { color: white; }
.text-center { text-align: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.toast-success { border-left-color: var(--secondary); }
.toast-error { border-left-color: #EF4444; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .section {
        padding: 3rem 0;
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .footer,
    .nav-mobile,
    .mobile-menu-btn,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        background: none;
        padding: 2rem 0;
    }
    
    .hero-title,
    .hero-subtitle {
        color: black;
    }
}

/* ============================================
   Smooth Animations & Scroll Effects
   Lightweight & Performance-Friendly
   BFCache-compatible (no unload events)
   ============================================ */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Page Load Animation - Fade In */
@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageFadeIn 0.4s ease-out;
}

/* Scroll Reveal Animation - Optimized */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for multiple elements */
.scroll-reveal.delay-100 { transition-delay: 0.1s; }
.scroll-reveal.delay-200 { transition-delay: 0.2s; }
.scroll-reveal.delay-300 { transition-delay: 0.3s; }
.scroll-reveal.delay-400 { transition-delay: 0.4s; }
.scroll-reveal.delay-500 { transition-delay: 0.5s; }

/* Navbar Scroll Effect */
.header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
    background-color: var(--header-bg);
}

/* Card Hover Effects - GPU Accelerated */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Button Hover Effects */
.btn,
button:not(.theme-toggle):not(.mobile-menu-btn) {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    will-change: transform;
}

.btn:hover,
button:not(.theme-toggle):not(.mobile-menu-btn):hover {
    transform: scale(1.03);
}

.btn:active,
button:not(.theme-toggle):not(.mobile-menu-btn):active {
    transform: scale(0.98);
}

/* Link Hover Effects */
.nav-link,
.footer-links a {
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.nav-link:hover,
.footer-links a:hover {
    transform: translateX(2px);
}

/* Tool Card Specific Hover */
.tool-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

/* Blog Card Hover */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-image img {
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Feature Card Hover */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
}

/* Icon Animation on Hover */
.feature-card:hover .feature-icon,
.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon,
.tool-icon {
    transition: transform 0.3s ease;
    will-change: transform;
}

/* Social Links Hover */
.social-links a {
    transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    will-change: transform;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Logo Hover Effect */
.logo {
    transition: transform 0.3s ease;
    will-change: transform;
}

.logo:hover {
    transform: scale(1.02);
}

/* Floating Logo Animation */
.floating-logo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.floating-logo:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

/* Form Input Focus Effects */
input:focus,
textarea:focus,
select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .scroll-reveal {
        transform: translateY(15px);
        transition-duration: 0.5s;
    }
    
    .card:hover,
    .tool-card:hover,
    .blog-card:hover {
        transform: translateY(-2px);
    }
    
    .btn:hover,
    button:not(.theme-toggle):not(.mobile-menu-btn):hover {
        transform: scale(1.02);
    }
}

/* Low-end Device Optimizations */
@media (prefers-reduced-motion: no-preference) and (update: fast) {
    .scroll-reveal {
        transition-duration: 0.6s;
    }
}

/* Print Styles - Disable Animations */
@media print {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Pause animations when tab is hidden - BFCache friendly */
/* Note: This is handled in main.js with visibilitychange event */
.animations-paused .scroll-reveal,
.animations-paused .card,
.animations-paused .tool-card,
.animations-paused .blog-card {
    animation-play-state: paused !important;
    transition: none !important;
}
