/* ==========================================
   Take-Home Freelance Income Calculator - Styles
   ========================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --background-color: #f8f9fa;
    --text-color: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo i {
    font-size: 1.75rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Tool Section */
.tool-section {
    padding: 3rem 0;
}

.calculator-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a02424;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Results Section */
.results {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--border-color);
}

.results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.results-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    color: var(--white);
}

.result-card.highlight small {
    color: rgba(255, 255, 255, 0.9);
}

.result-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-card small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Breakdown */
.breakdown {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.breakdown h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.breakdown h3 i {
    color: var(--primary-color);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--primary-color);
}

.breakdown-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* CTA Bridge */
.cta-bridge {
    background: linear-gradient(135deg, var(--accent-color) 0%, #a8c95e 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.bridge-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.bridge-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    transition: var(--transition);
}

.feature-card:hover {
    background-color: var(--background-color);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* How to Use Section */
.how-to-use {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.how-to-use h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    color: var(--white);
}

.cta-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.cta-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-visual {
    text-align: center;
    font-size: 8rem;
    opacity: 0.2;
}

/* FAQ Section */
.faq {
    padding: 4rem 0;
    background-color: var(--white);
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    background: none;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-color);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question i {
    transition: var(--transition);
    color: var(--primary-color);
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Related Tools Section */
.related-tools {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.related-tools h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.tool-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Educational Content Section */
.educational-content {
    padding: 4rem 0;
    background-color: var(--white);
}

.educational-content article {
    max-width: 800px;
    margin: 0 auto;
}

.educational-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.educational-content h3 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.educational-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column a {
    display: block;
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-column a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .nav {
        gap: 1rem;
    }

    .nav a {
        font-size: 0.9rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .features-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .cta-content {
        grid-template-columns: 1fr;
    }

    .cta-visual {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .result-value {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .cta-section,
    .related-tools,
    .footer {
        display: none;
    }

    .calculator-card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}