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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* Left menu: hamburger + slide-out panel (shared across all pages) */
.nav-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.2s, box-shadow 0.2s;
}
.nav-toggle:hover {
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.nav-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.nav-overlay.nav-overlay-open {
    opacity: 1;
    visibility: visible;
}
.nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 9999;
    width: 260px;
    max-width: 85vw;
    background: var(--card-bg);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    overflow: auto;
}
.nav-panel.nav-panel-open {
    transform: translateX(0);
}
.nav-panel-inner {
    padding: 72px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nav-label {
    display: block;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    margin-top: 8px;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}
.nav-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}
.nav-group {
    margin-top: 6px;
}
.nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: var(--radius);
    text-align: left;
}
.nav-group-toggle:hover {
    color: var(--primary-color);
}
.nav-group-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    margin-left: 8px;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.nav-group-expanded .nav-group-chevron {
    transform: rotate(180deg);
}
.nav-group-content {
    display: none;
    padding-left: 12px;
}
.nav-group-expanded .nav-group-content {
    display: block;
}
.nav-sublink {
    padding: 10px 16px 10px 28px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Skip to Content Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
    top: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main layout: calculator on left, results on right */
main {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

.calculator-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header – white bar only behind logo; headline and subtitle on page background */
header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 24px 20px 24px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--card-bg);
    z-index: -1;
}

.header-logo {
    display: inline-block;
    margin-bottom: 16px;
    line-height: 0;
}

.header-logo img {
    display: block;
    width: 148px;
    height: 52px;
    object-fit: contain;
}

.header-logo:hover img,
.header-logo:focus img {
    opacity: 0.9;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Ad containers: no space until ad code is present (no blank boxes on live) */
.ad-container {
    margin: 0;
    min-height: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 10px;
}

.ad-container:has(ins.adsbygoogle) {
    display: flex;
    margin: 20px 0;
    min-height: 100px;
}

.ad-container ins.adsbygoogle {
    display: block;
}

.ad-top {
    margin-top: 0;
}

.ad-container:has(ins.adsbygoogle).ad-incontent {
    margin: 30px 0;
}

.ad-container:has(ins.adsbygoogle).ad-footer {
    margin-top: 40px;
}

/* Calculator Sections */
.calculator-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.calculator-section h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.label-note {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.optional {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.helper-text {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.input-field {
    cursor: pointer;
}

/* Currency Input */
.currency-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
}

.currency-input .input-field {
    padding-left: 40px;
}

/* Segmented Control */
.segmented-control {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--bg-color);
    padding: 4px;
    border-radius: var(--radius);
}

.segment-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.segment-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

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

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 200px;
}

.stepper-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stepper-btn:active {
    transform: scale(0.95);
}

.stepper-input {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px;
    background: white;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    background: white;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.radio-input {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-label input:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.radio-label:has(.radio-input:checked) {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* Tooltip */
.tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
    line-height: 18px;
    cursor: help;
    margin-left: 6px;
    position: relative;
    opacity: 0.85;
}

.tooltip-icon:hover {
    opacity: 1;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.85rem;
    white-space: nowrap;
    margin-bottom: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
    margin-bottom: 2px;
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-input {
    position: relative;
    width: 48px;
    height: 24px;
    appearance: none;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-input:checked {
    background: var(--primary-color);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    pointer-events: none;
}

.toggle-input:checked + .toggle-slider {
    transform: translateX(24px);
}

/* Slider */
.slider-container {
    margin-bottom: 12px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 12px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.slider-presets {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.preset-btn {
    padding: 6px 12px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.preset-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* Detailed Mode */
.detailed-section {
    border: 2px dashed var(--border-color);
    margin-top: 24px;
    transition: var(--transition);
}

.detailed-section.expanded {
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    background: rgba(37, 99, 235, 0.02);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.toggle-detailed {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: 2px solid var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-detailed:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.toggle-detailed:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.toggle-detailed-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Modern chevron icon (down = refine, up = hide) */
.toggle-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 10px solid currentColor;
    margin-bottom: 3px;
    transition: transform 0.25s ease;
}

.toggle-detailed.expanded .toggle-chevron {
    transform: rotate(180deg);
    margin-bottom: -3px;
    margin-top: 3px;
}

.detailed-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.detailed-group {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.detailed-group:last-child {
    border-bottom: none;
}

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

.section-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

/* Results Section */
.results-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    color: white;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.results-section::-webkit-scrollbar {
    width: 6px;
}

.results-section::-webkit-scrollbar-track {
    background: transparent;
}

.results-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.results-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.results-section h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    text-align: center;
}

.results-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.total-cost {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.total-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.total-amount {
    display: block;
    font-size: 3rem;
    font-weight: 700;
}

.currency-note {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 4px;
}

.currency-note-small {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 4px;
}

.currency-disclaimer {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 12px;
    margin-bottom: 0;
    font-style: italic;
}

.breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.breakdown-item-label {
    opacity: 0.9;
}

.breakdown-item-value {
    font-weight: 600;
}

.income-comparison {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.comparison-item.highlight {
    background: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comparison-item.positive {
    color: #059669;
}

.comparison-item.positive.highlight {
    background: rgba(255, 255, 255, 0.85);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.5);
    border-left: 4px solid rgba(16, 185, 129, 0.6);
}

.comparison-item.negative {
    color: #ea580c;
}

.comparison-item.negative.highlight {
    background: rgba(255, 255, 255, 0.85);
    color: #ea580c;
    border-color: rgba(249, 115, 22, 0.5);
    border-left: 4px solid rgba(249, 115, 22, 0.6);
}

/* Content Section */
.content-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* Wide Banner Ad Slots */
.content-banner-ad {
    margin: 0;
    padding: 0;
    min-height: 0;
    display: none;
}

.content-banner-ad:has(ins.adsbygoogle) {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    padding: 24px 0;
    min-height: 100px;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.content-wrapper {
    line-height: 1.8;
}

.content-section h2:first-of-type {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 700;
}

.content-section .intro-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.content-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 24px;
    font-weight: 700;
}

.content-section h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 600;
}

.content-section h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.content-section ul {
    margin-bottom: 20px;
    padding-left: 24px;
}

.content-section li {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.content-section a {
    color: var(--primary-color);
    text-decoration: underline;
}

.content-section a:hover {
    color: var(--primary-hover);
}

/* Enhanced content sections - visual improvements */
.content-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.content-section h2::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 3px;
}

.content-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.content-section h4 {
    color: var(--primary-color);
    padding-left: 14px;
    border-left: 3px solid var(--primary-color);
}

/* Styled lists in content sections */
.content-section ul {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 20px 20px 44px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.content-section ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    line-height: 1.6;
}

.content-section ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.content-section ul li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.content-section ul li strong {
    color: var(--primary-color);
}

/* Intro text enhancement */
.content-section .intro-text {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0.02) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 24px;
}

/* Key formula/calculation callouts */
.content-section p strong:only-child {
    display: block;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-size: 1.05rem;
    margin: 8px 0;
}

/* Data sources section - special styling */
.content-section ul li a {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-all;
}

/* Content section paragraph spacing improvements */
.content-section > .content-wrapper > p + p {
    margin-top: -4px;
}

.content-section > .content-wrapper > h3 + p,
.content-section > .content-wrapper > h2 + p {
    margin-top: 16px;
}

/* Disclaimer section - special styling */
.content-disclaimer {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.content-disclaimer h3 {
    background: none;
    padding: 0;
    border-left: none;
    color: #92400e;
    margin-top: 0;
    margin-bottom: 16px;
}

.content-disclaimer h3::before {
    content: '⚠️';
    margin-right: 8px;
}

.content-disclaimer ul {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(245, 158, 11, 0.2);
    margin-bottom: 0;
}

.content-disclaimer ul li {
    color: #78350f;
    border-bottom-color: rgba(245, 158, 11, 0.15);
}

.content-disclaimer ul li::marker {
    color: #f59e0b;
}

/* Why Use section - highlight box */
.content-why-use {
    margin-top: 32px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 2px solid rgba(37, 99, 235, 0.15);
    border-radius: 16px;
    position: relative;
}

.content-why-use::before {
    content: '✓';
    position: absolute;
    top: -12px;
    left: 24px;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.content-why-use h3 {
    background: none;
    padding: 0;
    border-left: none;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.35rem;
}

.content-why-use ul {
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.content-why-use ul li {
    padding: 10px 0;
}

.content-why-use ul li::marker {
    content: '✓ ';
    color: #10b981;
    font-weight: bold;
}

/* Responsive adjustments for enhanced styles */
@media (max-width: 768px) {
    .content-section h2::before {
        width: 5px;
        height: 24px;
    }
    
    .content-section h3 {
        padding: 12px 14px;
    }
    
    .content-section ul {
        padding: 16px 16px 16px 36px;
    }
    
    .content-section .intro-text {
        padding: 16px 18px;
    }
    
    .content-disclaimer,
    .content-why-use {
        padding: 20px;
    }
    
    .content-why-use::before {
        width: 28px;
        height: 28px;
        font-size: 1rem;
        top: -10px;
        left: 20px;
    }
}

/* FAQ Accordion */
.faq-container {
    margin-top: 24px;
}

.faq-item {
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.faq-question:hover {
    background: rgba(37, 99, 235, 0.05);
}

.faq-question[aria-expanded="true"] {
    background: rgba(37, 99, 235, 0.1);
    border-bottom: 2px solid var(--border-color);
}

.faq-item:has(.faq-question[aria-expanded="true"]) {
    border-color: var(--primary-color);
}

.faq-question span:first-child {
    flex: 1;
    padding-right: 16px;
    pointer-events: none;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    min-width: 24px;
    text-align: center;
    pointer-events: none;
    user-select: none;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
    display: block;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 20px;
    overflow: visible;
}

.faq-answer p {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Ensure FAQ answer is visible when active */
.faq-answer.active p {
    opacity: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-note {
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Site footer (shared across all pages) */
.site-footer {
    text-align: center;
    padding: 32px 20px;
    border-top: 2px solid rgba(37, 99, 235, 0.2);
    margin-top: 24px;
}

.site-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.site-footer .tagline {
    margin-top: 4px;
    color: var(--primary);
    font-weight: 500;
}

.site-footer .tagline a {
    color: inherit;
}

.site-footer .tagline a:hover {
    text-decoration: underline;
}

.site-footer p.footer-keywords,
.footer-keywords {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-section {
        padding: 24px 20px;
        margin: 24px 16px;
        max-width: 100%;
    }
    
    .content-banner-ad:has(ins.adsbygoogle) {
        margin: 32px 0;
        padding: 20px 0;
    }
    
    .content-section h2:first-of-type {
        font-size: 2rem;
    }
    
    .content-section .intro-text {
        font-size: 1.1rem;
    }
    
    .content-section h2 {
        font-size: 1.75rem;
    }
    
    .content-section h3 {
        font-size: 1.3rem;
    }
    
    .content-section h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 1024px) {
    /* Stack layout on tablets and mobile */
    main {
        grid-template-columns: 1fr;
    }
    
    .calculator-wrapper {
        order: 1;
    }
    
    .results-section {
        position: relative;
        top: 0;
        max-height: none;
        order: 2;
        margin-top: 24px;
    }
}

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

    header h1 {
        font-size: 1.75rem;
    }

    .calculator-section {
        padding: 20px;
    }

    .segmented-control {
        flex-direction: column;
    }

    .segment-btn {
        width: 100%;
    }

    .total-amount {
        font-size: 2.5rem;
    }

    .stepper {
        max-width: 100%;
    }
    
    .results-section {
        padding: 24px 16px;
    }
}

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

    .total-amount {
        font-size: 2rem;
    }

    .results-section {
        padding: 24px 16px;
    }
}

/* Print Styles */
@media print {
    .ad-container,
    .toggle-detailed,
    .detailed-content {
        display: none;
    }
}
