/* Google Fonts: Roboto */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300,400,500,700&display=swap");

/* Basic Reset & Global Styles */
body {
    font-family: "Roboto", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5; /* Light gray background */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background-color: #1976d2; /* Deep blue, common in Material Design */
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin: 0;
    font-size: 2.8em;
    font-weight: 500;
}

header p {
    font-size: 1.1em;
    font-weight: 300;
    opacity: 0.9;
}

/* Main Container (Sidebar + Content) */
.container {
    display: flex;
    flex-grow: 1;
    max-width: 1200px;
    margin: 24px auto; /* More generous margin */
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    overflow: hidden;
}

/* Sidebar Navigation Styles */
.sidebar-nav {
    width: 1000px; /* Wider sidebar for readability */
    background-color: #f0f4f8; /* Light blue-gray */
    padding: 24px;
    border-right: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    height: fit-content;
    align-self: flex-start;
}

.sidebar-nav h2 {
    color: #3f51b5; /* Indigo */
    font-size: 1.6em;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c5cae9; /* Light divider */
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li {
    margin-bottom: 8px;
}

.sidebar-nav ul li a {
    color: #424242; /* Dark gray */
    text-decoration: none;
    font-weight: 400;
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a:focus {
    background-color: #e3f2fd; /* Light blue on hover */
    color: #1976d2; /* Blue text on hover */
}

/* Main Content Styles */
.content {
    flex-grow: 1;
    padding: 32px; /* More padding */
    background-color: #ffffff;
}

section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

section:last-of-type {
    border-bottom: none;
}

section h2 {
    color: #3f51b5; /* Indigo */
    font-size: 2em;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

section h2 a {
    color: inherit;
    text-decoration: none;
}

section h2 a:hover {
    text-decoration: underline;
}

section h3 {
    color: #424242; /* Dark gray */
    font-size: 1.5em;
    font-weight: 500;
    margin-top: 28px;
    margin-bottom: 16px;
}

section p {
    margin-bottom: 12px;
    font-size: 1.05em;
}

section ul {
    list-style: none; /* Remove default list style */
    padding: 0;
    margin-left: 0;
    margin-bottom: 15px;
}

section ul li {
    position: relative;
    padding-left: 28px; /* Space for custom bullet */
    margin-bottom: 8px;
    font-size: 1em;
}

section ul li:before {
    content: "▪"; /* Unicode square bullet */
    position: absolute;
    left: 0;
    color: #1976d2; /* Blue bullet */
    font-size: 1.2em;
    line-height: 1;
}

section ul ul li:before {
    content: "•"; /* Unicode circle bullet for sub-lists */
    color: #424244;
}

strong {
    font-weight: 500;
    color: #d32f2f; /* Dark red for emphasis */
}

/* Card Component for Calculator */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-top: 24px;
}

.card-content {
    /* Flexbox for calculator elements */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: center;
    gap: 16px; /* Spacing between elements */
}

.card-content label {
    flex: 1 1 150px; /* Allow label to grow/shrink, min-width 150px */
    font-weight: 500;
    color: #424242;
    text-align: right;
}

.card-content input[type="number"] {
    flex: 1 1 180px; /* Allow input to grow/shrink, min-width 180px */
    padding: 10px 12px;
    border: 1px solid #bdbdbd; /* Light gray border */
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.card-content button {
    flex: 1 1 200px; /* Button takes more space */
    background-color: #1976d2; /* Blue button */
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-left: auto; /* Push button to the right for layout */
    margin-right: auto;
    display: block; /* Ensure it takes full width when flex wraps */
}

.card-content button:hover {
    background-color: #1565c0; /* Darker blue on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card-content p {
    flex-basis: 100%; /* Make paragraph take full width */
    font-size: 1.2em;
    font-weight: 700;
    color: #212121; /* Very dark gray */
    margin-top: 20px;
    text-align: center;
}

.card-content .note {
    flex-basis: 100%;
    font-size: 0.9em;
    color: #616161;
    font-weight: 400;
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content .note .icon {
    margin-right: 8px;
    color: #ff9800; /* Amber for note icon */
    font-size: 1.2em;
}

/* FAQ Section Specific Styles */
.faq-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0e0e0; /* Light dashed separator */
}

.faq-item:last-of-type {
    border-bottom: none; /* No border for the last item */
}

.faq-item h3 {
    color: #1976d2; /* Blue for FAQ question */
    font-size: 1.3em;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 8px;
}

.faq-item p {
    color: #424242; /* Dark gray for FAQ answer */
    font-size: 1em;
    margin-bottom: 0; /* Remove default paragraph margin */
    padding-left: 10px; /* Indent answer slightly */
}

/* Footer Styles */
footer {
    background-color: #212121; /* Dark gray */
    color: #bdbdbd; /* Light gray text */
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 40px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 960px) {
    .container {
        flex-direction: column;
        margin: 16px;
    }

    .sidebar-nav {
        width: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 16px;
        margin-bottom: 24px;
    }

    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar-nav ul li {
        margin: 4px 8px;
    }

    .sidebar-nav h2 {
        margin-bottom: 16px;
        text-align: center;
    }

    .content {
        padding: 24px;
    }

    header h1 {
        font-size: 2.2em;
    }

    section h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }

    header p {
        font-size: 0.9em;
    }

    .content {
        padding: 16px;
    }

    section h2 {
        font-size: 1.5em;
    }

    section h3 {
        font-size: 1.3em;
    }

    .card-content label,
    .card-content input[type="number"],
    .card-content button {
        flex-basis: 100%; /* Stack elements vertically */
        text-align: left; /* Align labels to left */
    }

    .card-content button {
        margin-left: 0;
        margin-right: 0;
    }
}
