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

:root {
    --primary: #1a365d;
    --primary-dark: #0d1f3c;
    --primary-light: #e8eef7;
    --secondary: #10b981;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-hint: #9ca3af;
    --divider: #e5e7eb;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --elevation-1: 0 2px 8px rgba(26, 54, 93, 0.08);
    --elevation-2: 0 4px 16px rgba(26, 54, 93, 0.12);
    --elevation-3: 0 8px 24px rgba(26, 54, 93, 0.15);
    --elevation-4: 0 16px 32px rgba(26, 54, 93, 0.18);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    font-size: 14px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 16px 16px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px 12px 16px;
    }
}

/* ========== Navbar ========== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--elevation-2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-icon {
    font-size: 28px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 4px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ========== Footer ========== */
.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    margin-top: 80px;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-section a:hover {
    color: var(--secondary);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1000px;
    margin: 0 auto;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* ========== Header ========== */
.header {
    text-align: center;
    color: white;
    margin-bottom: 48px;
    animation: slideDown 0.6s ease-out;
    padding: 40px 20px;
}

.header-content {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
}

.tagline {
    font-size: 1.125rem;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* ========== Main Content ========== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ========== Card Base Styles ========== */
.card-base {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--elevation-2);
    animation: slideUp 0.6s ease-out;
    transition: var(--transition);
}

.calculator-card,
.results-card,
.comparison-card,
.faq-section,
.info-section {
    padding: 28px;
}

@media (max-width: 768px) {
    .calculator-card,
    .results-card,
    .comparison-card,
    .faq-section,
    .info-section {
        padding: 20px;
    }
}

.calculator-card,
.results-card {
    border-radius: 12px;
}

.card-base:hover {
    box-shadow: var(--elevation-3);
}

/* ========== Card Titles ========== */
.calculator-card h2,
.results-card h2,
.comparison-card h2,
.faq-section h2,
.info-section h2 {
    font-size: 1.9rem;
    margin-bottom: 28px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.4px;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 18px;
}

/* ========== Form Styling ========== */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
}

.form-group label .material-icons {
    font-size: 20px;
    margin-right: 8px;
    color: var(--primary);
}

.required {
    color: var(--danger);
    margin-left: 4px;
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid var(--divider);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-white);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.2px;
}

.form-group input::placeholder {
    color: var(--text-hint);
    font-weight: 400;
    opacity: 0.8;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.1);
    background: var(--bg-white);
    transform: translateY(-2px);
}

.form-group small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* ========== Button Styling ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--elevation-2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--divider);
}

.btn-secondary:hover {
    background: var(--divider);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
}

.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn .material-icons {
    font-size: 20px;
    vertical-align: middle;
}

/* ========== Error Box ========== */
.error-box {
    background: #ffebee;
    border-left: 4px solid var(--danger);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.error-box .material-icons {
    color: var(--danger);
    font-size: 24px;
    flex-shrink: 0;
}

.error-box ul {
    list-style-position: inside;
    color: #c62828;
    flex: 1;
}

.error-box li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.error-box strong {
    display: block;
    margin-bottom: 10px;
}

/* ========== Results Section ========== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.result-item {
    background: var(--bg-lighter);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--divider);
    transition: var(--transition);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.result-item span.result-icon {
    font-size: 2rem;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

.result-item.highlight {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0fdf4 100%);
    border-left-color: var(--primary);
    box-shadow: var(--elevation-1);
}

.result-item.highlight:hover {
    box-shadow: var(--elevation-3);
    transform: translateY(-2px);
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
    word-break: break-word;
}

.result-value.negative {
    color: var(--danger);
}

/* ========== Table ========== */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 8px;
    box-shadow: var(--elevation-1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: var(--bg-light);
}

.results-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--divider);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table td {
    padding: 16px;
    border-bottom: 1px solid var(--divider);
    font-size: 0.95rem;
}

.results-table tbody tr {
    transition: var(--transition);
}

.results-table tbody tr:hover {
    background: var(--bg-lighter);
}

.results-table tr.success {
    background: #f0fdf4;
}

.results-table tr.warning {
    background: #fef3c7;
}

.results-table tr.info {
    background: var(--primary-light);
}

/* ========== Info Box ========== */
.info-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.95rem;
    margin-top: 16px;
}

/* ========== FAQ Section ========== */
.faq-section {
    background: var(--bg-white);
    box-shadow: var(--elevation-2);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-item {
    padding: 24px;
    background: var(--bg-lighter);
    border-radius: 8px;
    border-top: 4px solid var(--primary);
    transition: var(--transition);
    cursor: pointer;
}

.faq-item:hover {
    box-shadow: var(--elevation-2);
    transform: translateY(-4px);
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 500;
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 500;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========== Info Section ========== */
.info-section {
    background: var(--bg-white);
    box-shadow: var(--elevation-2);
}

.info-content {
    color: var(--text-secondary);
}

.info-content h3 {
    color: var(--primary);
    margin-top: 28px;
    margin-bottom: 14px;
    font-size: 1.25rem;
    font-weight: 500;
}

.info-content h3:first-child {
    margin-top: 0;
}

.info-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.info-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

/* ========== Animations ========== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ========== Tax Regime Selector ========== */
.tax-regime-selector {
    background: var(--bg-lighter);
    padding: 24px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--secondary);
}

.tax-regime-selector h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.regime-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .regime-options {
        grid-template-columns: 1fr;
    }
}

.regime-label {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--bg-white);
    border: 2px solid var(--divider);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.regime-label:hover {
    border-color: var(--secondary);
    box-shadow: var(--elevation-1);
}

.regime-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-bottom: 8px;
    cursor: pointer;
    accent-color: var(--secondary);
}

.regime-label input[type="radio"]:checked ~ .regime-name {
    color: var(--secondary);
    font-weight: 600;
}

.regime-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.regime-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========== Tax Breakdown Section ========== */
.tax-breakdown-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0fdf4 100%);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
    border-left: 5px solid var(--secondary);
}

.tax-breakdown-section h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.tax-breakdown-table {
    background: var(--bg-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
    margin-bottom: 16px;
}

.tax-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--divider);
    align-items: center;
}

.tax-row:last-child {
    border-bottom: none;
}

.tax-row.total-tax {
    background: var(--primary-light);
    font-weight: 600;
    border-top: 2px solid var(--secondary);
}

.tax-row.note {
    background: #fafafa;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 10px 16px;
}

.tax-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.tax-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    min-width: 120px;
}

/* ========== Net Amount Box ========== */
.net-amount-box {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.net-calculation {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 6px;
}

.net-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 1rem;
}

.net-row.minus {
    color: #ffcccc;
}

.net-row.final-net {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    padding-top: 12px;
    margin-top: 12px;
    font-size: 1.15rem;
    font-weight: 600;
}

.net-row .amount {
    font-weight: 600;
    font-size: 1.1rem;
}

/* ========== Tax Info Box ========== */
.tax-info-box {
    background: #fffbf0;
    border-left: 4px solid var(--warning);
    padding: 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tax-info-box p {
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.tax-info-box ul {
    list-style-position: inside;
    margin-left: 12px;
}

.tax-info-box li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ========== Responsive Design ========== */
@media (max-width: 960px) {
    .container {
        padding: 20px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .calculator-card,
    .results-card,
    .faq-section,
    .info-section {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-content {
        padding: 24px;
    }

    .calculator-card h2,
    .results-card h2,
    .faq-section h2,
    .info-section h2 {
        font-size: 1.5rem;
    }

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

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

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

    .regime-options {
        grid-template-columns: 1fr;
    }

    .tax-breakdown-section {
        padding: 16px;
    }

    .tax-row {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .net-row {
        font-size: 0.95rem;
    }

    .net-row .amount {
        font-size: 1rem;
    }

    .tax-info-box {
        font-size: 0.9rem;
    }

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

    .results-table {
        font-size: 0.875rem;
    }

    .results-table th,
    .results-table td {
        padding: 12px;
    }

    .calculator-card,
    .results-card,
    .faq-section,
    .info-section {
        padding: 20px;
    }

    .header {
        margin-bottom: 32px;
        padding: 24px 16px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 20px 24px;
        box-shadow: var(--elevation-2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        max-height: 600px;
        overflow-y: auto;
    }
}

/* ========== Collapse Animation ========== */
.calculator-card.collapsed,
.calculator-section.collapsed {
    max-height: 60px;
    overflow: hidden;
    opacity: 0.8;
}

.calculator-card.collapsed .form-grid,
.calculator-card.collapsed .form-actions,
.calculator-card.collapsed .eligibility-info,
.calculator-section.collapsed .form-grid,
.calculator-section.collapsed .form-actions,
.calculator-section.collapsed .deductions-section {
    display: none;
}

.calculator-card.collapsed h2,
.calculator-section.collapsed h3 {
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0;
}

.calculator-card.collapsed h2:after,
.calculator-section.collapsed h3:first-of-type:after {
    content: '▼ Expand Form';
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: normal;
    margin-left: auto;
}

.collapse-toggle {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid var(--divider);
    }

    .nav-link:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .container {
        padding: 12px;
    }

    .calculator-card,
    .results-card,
    .faq-section,
    .info-section {
        padding: 16px;
        border-radius: 10px;
    }

    .form-grid {
        gap: 16px;
    }

    .form-group input {
        padding: 13px 15px;
        font-size: 16px;
        font-weight: 500;
    }

    .btn-primary,
    .btn-large {
        padding: 11px 24px;
        font-size: 0.9rem;
    }

    .result-item {
        padding: 16px;
    }

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

    .results-table th,
    .results-table td {
        padding: 10px;
        font-size: 0.8rem;
    }

    .main-content {
        gap: 24px;
    }

    .header {
        margin-bottom: 24px;
    }

    .footer-content {
        gap: 20px;
    }

    /* Add spacing for calculator section headings */
    .calculator-section h1 {
        margin-top: 12px;
        margin-bottom: 8px;
    }

    .calculator-intro {
        margin-bottom: 20px;
    }
}

/* ========== Hero Section ========== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
    padding: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--elevation-3);
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 40px;
        padding: 24px 16px;
    }
}

.hero-content h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-graphic {
    font-size: 8rem;
    animation: bounce 3s ease-in-out infinite;
}

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

/* ========== Tools Section ========== */
.tools-section {
    margin-bottom: 60px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--elevation-2);
}

.tools-section h2 {
    text-align: center;
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 44px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    min-height: 320px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-lighter) 100%);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--elevation-4);
}

.tool-icon {
    font-size: 2.5rem;
    text-align: center;
}

.tool-card h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    flex-grow: 1;
    line-height: 1.7;
    font-weight: 400;
}

.tool-features {
    list-style: none;
    margin: 12px 0;
    padding-left: 0;
}

.tool-features li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.6;
    font-weight: 500;
}

.tool-card .btn-small {
    align-self: flex-start;
    margin-top: auto;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.tool-card .btn-small:hover {
    transform: translateX(4px);
}

/* ========== Why Section ========== */
.why-section {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--elevation-2);
}

@media (max-width: 768px) {
    .why-section {
        padding: 24px;
    }
}

.why-section h2 {
    color: var(--primary);
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: 8px;
    border-top: 4px solid var(--secondary);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.feature-item h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ========== How It Works Section ========== */
.how-it-works {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--elevation-2);
}

@media (max-width: 768px) {
    .how-it-works {
        padding: 24px;
    }
}

.how-it-works h2 {
    color: var(--primary);
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 44px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

@media (max-width: 1024px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .steps {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.step {
    text-align: center;
    padding: 28px 24px;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-lighter) 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--divider);
}

.step:hover {
    transform: translateY(-6px);
    box-shadow: var(--elevation-3);
    border-color: var(--secondary);
}

.step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.step h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

/* ========== Blog Section ========== */
.blog-section {
    margin-bottom: 40px;
}

.blog-section h2 {
    color: var(--primary);
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--elevation-1);
    transition: var(--transition);
}

.blog-card:hover {
    box-shadow: var(--elevation-3);
    transform: translateY(-4px);
}

.blog-icon {
    font-size: 2rem;
}

.blog-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 0;
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    flex-grow: 1;
}

.blog-card a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
}

.blog-card a:hover {
    text-decoration: underline;
}

/* ========== Print Styles ========== */
@media print {
    body {
        background: white;
    }

    .header {
        page-break-after: avoid;
    }

    .calculator-card {
        display: none;
    }

    .results-card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* ========== AdSense Friendly Styling ========== */

/* Horizontal Banner Ad (728x90, 970x90) */
.ad-horizontal-banner {
    background: var(--bg-white);
    border: 1px solid var(--divider);
    border-radius: 4px;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-1);
}

/* Vertical Sidebar Ad (300x600, 300x250) */
.ad-vertical-sidebar {
    background: var(--bg-white);
    border: 1px solid var(--divider);
    border-radius: 4px;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-1);
}

/* In-Article Ad */
.ad-in-article {
    background: var(--bg-lighter);
    border: 1px solid var(--divider);
    border-radius: 6px;
    padding: 16px;
    margin: 24px 0;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-1);
}

/* Native Ad Container */
.ad-native-container {
    background: var(--bg-white);
    border: 1px solid var(--divider);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    box-shadow: var(--elevation-1);
}

.ad-native-label {
    font-size: 0.75rem;
    color: var(--text-hint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Mobile Ads */
@media (max-width: 768px) {
    .ad-horizontal-banner {
        min-height: 50px;
        margin: 16px 0;
    }

    .ad-vertical-sidebar {
        min-height: 200px;
    }

    .ad-in-article {
        min-height: 250px;
        margin: 16px 0;
    }
}

/* AdSense Compliance - Visibility */
.ad-horizontal-banner,
.ad-vertical-sidebar,
.ad-in-article,
.ad-native-container {
    position: relative;
}

.ad-horizontal-banner::before,
.ad-vertical-sidebar::before,
.ad-in-article::before,
.ad-native-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Clear distinction between ads and content */
.ad-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
}

/* Ad spacing from content */
.calculator-card .ad-in-article,
.info-section .ad-in-article,
.blog-card .ad-in-article {
    margin-top: 32px;
    margin-bottom: 32px;
}

/* Table of Contents Ad */
.ad-toc {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: 6px;
    margin: 24px 0;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sticky Ad (AdSense bottom ad) */
.ad-sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 2px solid var(--divider);
    padding: 10px;
    z-index: 99;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.ad-sticky-bottom.visible {
    display: block;
}

@media (max-width: 768px) {
    .ad-sticky-bottom {
        min-height: 60px;
        padding: 8px;
    }

    /* Adjust page bottom padding when sticky ad is visible */
    body.has-sticky-ad {
        padding-bottom: 80px;
    }
}

/* Responsive Grid Ad */
.ad-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .ad-grid-container {
        grid-template-columns: 1fr;
    }
}

/* ========== Calculator Page Styling ========== */
.calculator-section {
    margin-top: 8px;
}

.calculator-section h1 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 2rem;
    color: var(--primary);
    font-weight: 600;
}

.calculator-intro {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .calculator-section {
        margin-top: 12px;
    }

    .calculator-section h1 {
        font-size: 1.7rem;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .calculator-intro {
        margin-bottom: 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        margin-top: 8px;
    }

    .calculator-section h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .calculator-intro {
        margin-bottom: 24px;
        font-size: 0.9rem;
    }
}

/* ========== Mobile Menu Improvements ========== */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ========== Mobile Text Spacing Improvements ========== */
@media (max-width: 768px) {
    /* Improve heading line spacing on mobile */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.4;
        margin-bottom: 14px;
    }

    .header h1 {
        line-height: 1.3;
        margin-bottom: 12px;
    }

    /* Calculator section spacing */
    .calculator-section h1 {
        margin-top: 16px;
        margin-bottom: 12px;
        font-size: 1.8rem;
    }

    .calculator-intro {
        margin-bottom: 24px;
        font-size: 1rem;
        color: var(--text-secondary);
    }

    /* Improve paragraph spacing on mobile */
    p {
        line-height: 1.8;
        margin-bottom: 14px;
    }

    /* Improve list spacing on mobile */
    ul, ol {
        line-height: 1.9;
        margin-bottom: 16px;
    }

    li {
        margin-bottom: 10px;
        line-height: 1.7;
    }

    /* Improve form text spacing */
    .form-group label {
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .form-group small {
        line-height: 1.5;
        margin-top: 6px;
    }

    /* Improve card text spacing */
    .tool-card p,
    .faq-item p,
    .feature-item p {
        line-height: 1.8;
    }

    /* Improve button spacing */
    .btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }

    /* Improve table cell spacing */
    .results-table th,
    .results-table td {
        padding: 14px 12px;
        line-height: 1.5;
    }

    /* Info box spacing */
    .info-box {
        line-height: 1.7;
        padding: 14px;
        margin-top: 16px;
    }

    /* Tax row spacing */
    .tax-row {
        padding: 14px 16px;
        line-height: 1.6;
    }

    /* Result item spacing */
    .result-item {
        padding: 16px;
        gap: 14px;
    }

    .result-label {
        line-height: 1.4;
    }

    /* Error box spacing */
    .error-box {
        padding: 16px;
        gap: 12px;
        line-height: 1.6;
    }

    .error-box li {
        margin-bottom: 8px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    /* Extra small device improvements */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.35;
    }

    p {
        line-height: 1.75;
    }

    li {
        line-height: 1.65;
        margin-bottom: 8px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Calculator section spacing on mobile */
    .calculator-section h1 {
        margin-top: 20px;
        margin-bottom: 12px;
        padding-top: 10px;
    }

    .calculator-intro {
        margin-bottom: 20px;
    }
}
