/* Dividend Tax Calculator Specific Styles */
:root {
    --primary-color: #204080;
    --secondary-color: #5AC8FA;
    --dark-color: #0056CC;
    --light-color: #E3F2FD;
    --error-color: #e53e3e;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-heavy: 0 10px 25px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, #204080 0%, #5AC8FA 100%);
    --dividend-green: #10b981;
    --dividend-blue: #3b82f6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
}

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

/* Breadcrumb */
.breadcrumb {
    background: #f8fafc;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.05) 50%, transparent 75%);
    background-size: 60px 60px;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(60px) translateY(60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* YMYL Compliance Styles */
.ymyl-notice {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ymyl-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.ymyl-icon {
    font-size: 1.2rem;
}

.ymyl-text {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ymyl-disclaimer {
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

.ymyl-disclaimer strong {
    color: #dc2626;
    font-weight: 700;
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 2rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-color);
}

.calculator-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Styles */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

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

.input-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-label.required::after {
    content: '*';
    color: var(--error-color);
    margin-left: 4px;
    font-weight: 700;
}

.input-field {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.1);
}

.input-field:invalid {
    border-color: var(--error-color);
}

.input-field:disabled {
    background-color: #f1f5f9;
    color: var(--text-secondary);
    cursor: not-allowed;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

.calculate-section {
    margin-top: 1rem;
}

.calculate-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(32, 64, 128, 0.2);
    font-family: inherit;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 64, 128, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-color);
}

.results-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.result-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.result-card.primary {
    background: var(--gradient-primary);
    color: white;
    grid-column: 1 / -1;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(32, 64, 128, 0.2);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.result-card.primary:hover {
    transform: scale(1.02) translateY(-2px);
}

.result-label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-card.primary .result-value {
    font-size: 2.2rem;
}

.result-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Tax Rates Section */
.tax-rates-section {
    margin-top: 2rem;
}

.tax-rates-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tax-rates-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.rate-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.rate-card.qualified {
    border-left: 4px solid var(--dividend-green);
}

.rate-card.ordinary {
    border-left: 4px solid var(--dividend-blue);
}

.rate-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rate-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.rate-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.rate-card.qualified .rate-value {
    color: var(--dividend-green);
}

.rate-card.ordinary .rate-value {
    color: var(--dividend-blue);
}

.rate-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Breakdown Section */
.breakdown-section {
    margin-top: 2rem;
}

.breakdown-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.breakdown-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.breakdown-row:nth-child(even) {
    background: #f8fafc;
}

.breakdown-row:hover {
    background: var(--light-color);
    transform: scale(1.01);
}

.breakdown-row.highlight {
    background: var(--light-color);
    font-weight: 700;
}

.breakdown-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.breakdown-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

/* Account Optimization Section */
.account-optimization-section {
    margin-top: 2rem;
}

.account-optimization-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.account-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.account-card.taxable {
    border-left: 4px solid var(--error-color);
}

.account-card.tax-deferred {
    border-left: 4px solid var(--warning-color);
}

.account-card.roth {
    border-left: 4px solid var(--success-color);
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.account-header {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.account-amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.account-card.taxable .account-amount {
    color: var(--error-color);
}

.account-card.tax-deferred .account-amount {
    color: var(--warning-color);
}

.account-card.roth .account-amount {
    color: var(--success-color);
}

.account-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Optimization Section */
.optimization-section {
    margin-top: 2rem;
}

.optimization-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tips-content {
    background: var(--light-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(32, 64, 128, 0.2);
}

.tip-item {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.tip-item:last-child {
    margin-bottom: 0;
}

.tip-highlight {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.tip-warning {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.tip-dividend {
    background: rgba(16, 185, 129, 0.1);
    color: var(--dividend-green);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Info Section */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.info-card ol,
.info-card ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.info-card ol li,
.info-card ul li {
    margin-bottom: 0.75rem;
}

/* Related Calculators */
.related-calculators {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
}

.related-calculators h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.related-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(32, 64, 128, 0.2);
}

.related-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.related-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.related-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.faq-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: white;
    box-shadow: var(--shadow-light);
    transform: translateY(-2px);
}

.faq-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-card {
        position: static;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
    }
    
    .tax-rates-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator-section {
        padding: 2rem 0;
    }
    
    .related-calculators {
        padding: 2rem 0;
    }
    
    .faq-section {
        padding: 2rem 0;
    }
}

/* Data Sources Section */
.data-sources-section {
    margin-top: 2rem;
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.data-sources-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.source-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.source-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.source-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.source-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.source-item small {
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
}

/* Professional Disclaimer Section for YMYL Compliance */
.disclaimer-section {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0;
    border-top: 3px solid var(--primary-color);
}

.disclaimer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.disclaimer-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.disclaimer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.disclaimer-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.disclaimer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.disclaimer-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.disclaimer-footer {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

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

.disclaimer-footer strong {
    color: var(--text-primary);
    font-weight: 600;
}

.disclaimer-contact {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.disclaimer-contact a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.disclaimer-contact a:hover {
    text-decoration: underline;
    color: var(--dark-color);
}