/* css/style.css */

/* --- Base & Variables --- */
:root {
    --primary-color: #005a9c; /* A trustworthy blue */
    --secondary-color: #e6f0f7; /* Light blue accent */
    --text-color: #333;
    --border-color: #ddd;
    --card-bg: #ffffff;
    --body-bg: #f9fafb;
    --font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header & Navigation --- */
.main-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

/* --- Hero Section --- */
.hero {
    background-color: var(--secondary-color);
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Calculator Form & Card --- */
.calculator-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}

.btn:hover {
    background-color: #00487c;
    text-decoration: none;
}

/* --- Results Placeholder --- */
.results-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.results-card h3 {
    margin-bottom: 1rem;
}

.results-placeholder {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.results-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 250px;
    flex-shrink: 0;
}


/* --- Copy Button --- */
.btn-copy {
    background-color: #f0f0f0;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: normal;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 1.5rem;
    width: auto;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

.btn-copy:disabled {
    background-color: #d4edda; /* A light green for success */
    color: #155724;
    cursor: not-allowed;
}

/* --- Content Section --- */
.content-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.content-section h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section ul {
    list-style-position: inside;
}

.results-grid {
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 1rem;
    font-weight: normal;
}

.results-grid hr {
    grid-column: 1 / -1;
}

.results-grid .deduction-label {
    color: #c0392b;
}

/* --- FAQ Section (Accordion) --- */
.faq-section {
    margin-top: 3rem;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
    padding: 1rem 0;
    font-weight: bold;
    cursor: pointer;
    list-style: none; /* Hide default marker */
    position: relative;
    padding-right: 2rem;
}

.faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome/Safari */
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item div {
    padding-bottom: 1rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    list-style: none;
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumbs li {
    display: inline;
}

.breadcrumbs li+li::before {
    content: '>';
    margin: 0 0.5rem;
    color: #666;
}

.breadcrumbs a {
    color: #666;
}

/* --- Blog --- */
.blog-list article {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-list h2 a {
    color: var(--primary-color);
}

.blog-post-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.blog-post-content {
    margin-top: 2rem;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #666;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .results-grid {
        grid-template-columns: 1fr; /* Stack results in a single column on mobile */
        gap: 5px;
    }

    .results-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .chart-container {
        max-width: 200px;
    }

    .content-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}
