/* =================================================================
   Finance Calculators India - Global Stylesheet
   Mobile-First, SEO & Performance Optimized
   ================================================================= */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - Microsoft Azure Theme */
    --primary-color: #0078D4;
    --primary-dark: #005BA1;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    
    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Fade-in animation for content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-card,
.content-section,
.calculator-wrapper {
    animation: fadeInUp 0.6s ease-out forwards;
}

.calculator-card:nth-child(1) {
    animation-delay: 0.1s;
}

.calculator-card:nth-child(2) {
    animation-delay: 0.2s;
}

.calculator-card:nth-child(3) {
    animation-delay: 0.3s;
}

body {
    font-family: var(--font-base);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow-x: hidden;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #0078D4;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.03em;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

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

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    z-index: 1001;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(11px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-11px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

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

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

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.65rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

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

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 0.5rem;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Main Content */
.main-content {
    padding: var(--spacing-xl) 0;
}

/* Calculator Cards Grid */
.calculators-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.calculator-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 120, 212, 0.03), transparent);
    transition: left 0.5s ease;
}

.calculator-card:hover::before {
    left: 100%;
}

.calculator-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px -6px rgba(0, 120, 212, 0.2), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.calculator-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    letter-spacing: -0.01em;
}

.calculator-card p {
    flex-grow: 1;
    text-align: center;
    line-height: 1.6;
    color: var(--text-secondary);
}

.calculator-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.calculator-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.calculator-card .btn {
    margin-top: auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.2);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 44px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-secondary:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Calculator Form Styles */
.calculator-container {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-wrapper {
    background: var(--bg-white);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
    transition: box-shadow 0.3s ease;
}

.calculator-wrapper:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--bg-white);
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.form-input:hover {
    border-color: #a0c4e8;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1), 0 1px 3px rgba(0, 120, 212, 0.2);
    transform: translateY(-1px);
}

/* Mobile keyboard optimization */
@supports (-webkit-touch-callout: none) {
    .form-input, select {
        font-size: 16px;
    }
}

/* Select dropdown styling */
select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230078D4' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-input:disabled {
    background-color: var(--bg-light);
    cursor: not-allowed;
}

.input-group {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 600;
}

.input-group .form-input {
    padding-left: 2.5rem;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group-suffix .form-input {
    padding-right: 3rem;
}

/* Results Display */
.results-container {
    background: linear-gradient(135deg, #0078D4 0%, #005BA1 100%);
    border-radius: 16px;
    padding: var(--spacing-lg);
    color: white;
    margin-top: var(--spacing-lg);
    box-shadow: 0 8px 24px rgba(0, 120, 212, 0.25);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
}

.results-container h3 {
    color: white;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: padding-left 0.3s ease;
}

.result-item:hover {
    padding-left: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

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

.result-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.result-primary {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.result-primary .result-label {
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
}

.result-primary .result-value {
    font-size: 2.5rem;
    font-weight: 800;
}

/* Tax Comparison Table */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.comparison-card {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-md);
    border-radius: 8px;
}

.comparison-card h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.comparison-card .result-value {
    font-size: 2rem;
}

.recommended-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: var(--spacing-xs);
}

/* Content Sections */
.content-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.content-section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.content-section h3 {
    color: var(--text-primary);
    margin-top: var(--spacing-md);
}

.content-section ul {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.content-section li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border-color);
}

.faq-question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Ad Placeholders */
.ad-slot {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-lg);
    text-align: center;
    margin: var(--spacing-lg) 0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.ad-slot::after {
    content: 'Advertisement';
    font-size: 0.875rem;
}

/* CTA Sections */
.cta-section {
    background: linear-gradient(135deg, #0078D4 0%, #005BA1 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: 16px;
    text-align: center;
    margin: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 120, 212, 0.25);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-section h3 {
    color: white;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.cta-section .btn {
    background: white;
    color: #0078D4;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-section .btn:hover {
    background: var(--bg-light);
    color: #0078D4;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Disclaimer */
.disclaimer {
    background: #fef3c7;
    border-left: 4px solid var(--accent-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin: var(--spacing-lg) 0;
}

.disclaimer strong {
    color: var(--accent-color);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-md);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-xs);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
}

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

.breadcrumb-separator {
    margin: 0 var(--spacing-xs);
    color: var(--text-secondary);
}

.breadcrumb-item:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive Design - Tablet */
/* Responsive Design - Mobile */
@media (max-width: 767px) {
    /* Base adjustments */
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        padding: 0.75rem 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 85%;
        max-width: 320px;
        background: var(--bg-white);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        gap: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        justify-content: flex-start;
        font-size: 1rem;
    }
    
    /* Mobile dropdown styles */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--bg-light);
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px;
    }
    
    .dropdown-toggle::after {
        margin-left: auto;
    }
    
    .dropdown-menu a {
        padding-left: 2rem;
        margin: 0;
    }
    
    .dropdown-menu li {
        border-bottom: none;
    }
    
    /* Mobile overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Larger touch targets for mobile */
    .btn {
        min-height: 48px;
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
    }
    
    /* Optimize form inputs for mobile */
    .form-input,
    .form-input:focus {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
    }
    
    /* Better spacing for mobile */
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .hero p {
        font-size: 1rem;
        line-height: 1.6;
        padding: 0 0.5rem;
    }
    
    /* Main content spacing */
    .main-content {
        padding: 1.5rem 0;
    }
    
    /* Stack calculator cards on mobile */
    .calculators-grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    
    .calculator-card {
        padding: 1.5rem;
        margin-bottom: 0;
    }
    
    .calculator-card .icon {
        font-size: 2rem;
    }
    
    /* Content sections */
    .content-section {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .content-section h3 {
        font-size: 1.15rem;
        margin-top: 1rem;
    }
    
    .content-section ul,
    .content-section ol {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }
    
    .content-section li {
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }
    
    /* Calculator wrapper */
    .calculator-wrapper {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .calculator-container {
        padding: 0;
    }
    
    /* Form elements */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .form-input {
        padding: 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
        border-radius: 6px;
    }
    
    .form-input:focus {
        font-size: 16px;
    }
    
    select.form-input {
        padding-right: 2.5rem;
    }
    
    /* Results display */
    .results-container {
        padding: 1.25rem;
        margin-top: 1.25rem;
        border-radius: 12px;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
    
    .results-container h3 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .result-primary {
        padding: 1rem;
        margin-bottom: 1rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .result-primary .result-label {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .result-primary .result-value {
        font-size: 2rem;
        word-wrap: break-word;
        text-align: center;
    }
    
    .result-item {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 0;
        gap: 0.25rem;
        text-align: center;
    }
    
    .result-label {
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
    }
    
    .result-value {
        font-size: 1.25rem;
        text-align: center;
        white-space: normal;
        width: 100%;
    }
    
    /* Comparison grid */
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .comparison-card {
        padding: 1rem;
        text-align: center;
    }
    
    .comparison-card h4 {
        text-align: center;
    }
    
    .comparison-card .result-value {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .comparison-card .result-item {
        text-align: center;
    }
    
    /* CTA sections */
    .cta-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
        border-radius: 12px;
    }
    
    .cta-section h3 {
        font-size: 1.35rem;
        margin-bottom: 0.75rem;
    }
    
    .cta-section p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        min-height: 48px;
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .calculator-card .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Disclaimer */
    .disclaimer {
        padding: 1rem;
        margin: 1rem 0;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    /* Ad slots */
    .ad-slot {
        padding: 1rem;
        margin: 1rem 0;
        min-height: 200px;
        font-size: 0.85rem;
    }
    
    /* FAQ */
    .faq-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .faq-question {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .faq-answer {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-links {
        font-size: 0.95rem;
    }
    
    .footer-bottom {
        padding-top: 1rem;
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
    }
    
    /* Tables - ensure they're scrollable */
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 0.5rem !important;
        font-size: 0.85rem;
    }
    
    /* Optimize tables for mobile */
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.85rem;
    }
    
    .hero h1 {
        font-size: 2.75rem;
    }
    
    .hero p {
        font-size: 1.15rem;
    }
    
    .calculators-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }
    
    .container {
        padding: 0 2rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.25rem;
    }
    
    .calculators-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none;
}

/* Accessibility */
.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;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print Styles */
@media print {
    .header, .footer, .ad-slot, .cta-section, .nav {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .calculator-wrapper, .content-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
