:root {
    --primary-color: #1a2b7c;
    --secondary-color: #d11141;
    --background-color: #ffcc00;
    --card-color: #ffffff;
    --text-color: #333333;
    --accent-color: #00aeef;
    --link-color: #0008a7;
    --link-hover-color: #1a2b7c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: #ffcc00;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    border-radius: 10px;
}

.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    transition: .4s;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.slider::before {
    content: "\f185";
    color: #ffcc00;
    font-size: 18px;
}

.slider::after {
    content: "\f186";
    color: #d3d3d3;
    font-size: 18px;
}

input:checked + .slider {
    background-color: #2d2d2d;
    border-color: #555;
}

input:checked + .slider::before {
    color: #333333;
}

input:checked + .slider::after {
    color: #fff;
}

header {
    background: #ffcc00;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 0.5rem;
    border-radius: 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.date-container {
    display: inline-block;
    white-space: normal;
    text-align: left;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.logo img {
    width: 200px;
    height: auto;
}

.navbar-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--link-color);
    background: none;
    border: none;
    padding: 0.5rem;
}

.main-nav {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 1.5rem;
}

.nav-links {
    color: var(--link-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    display: block;
    transition: color 0.3s ease;
}

.nav-links:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    flex: 1;
}

footer {
    background-color: #232323;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.5rem;
}

footer a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

/* --- Breadcrumb Styles --- */
.breadcrumb-nav {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: inline;
}

.breadcrumb li + li::before {
    content: " > ";
    padding: 0 0.5em;
    color: #6c757d;
}

.breadcrumb li a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb li a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
    color: var(--text-color);
    font-weight: 500;
}


/* --- Dark Theme --- */
[data-theme="dark"] {
    --primary-color: #4a6bff;
    --secondary-color: #ff5277;
    --background-color: #1a1a1a;
    --card-color: #2d2d2d;
    --text-color: #e0e0e0;
    --accent-color: #00aeef;
    --link-color: #ffffff;
    --link-hover-color: #ffcc00;
}

[data-theme="dark"] .top-bar,
[data-theme="dark"] header {
    background: #2d2d2d;
}

[data-theme="dark"] .navbar-toggle,
[data-theme="dark"] .nav-links {
    color: var(--link-color);
}
[data-theme="dark"] .nav-links:hover {
    color: var(--link-hover-color);
}
[data-theme="dark"] .main-nav {
    background: #2d2d2d;
}
[data-theme="dark"] body {
    background-color: var(--background-color);
    color: var(--text-color);
}
[data-theme="dark"] footer {
    background-color: #121212;
}
[data-theme="dark"] .breadcrumb-nav {
    background-color: rgba(0, 0, 0, 0.2);
}


/* --- Calculator Styles --- */
.container {
    --calc-primary-color: #2563eb;
    --calc-secondary-color: #1e40af;
    --calc-card-background: #ffffff;
    --calc-text-color: #1f2937;
    --calc-border-radius: 12px;
    --calc-transition: all 0.3s ease;

    background: var(--calc-card-background);
    padding: 2rem;
    border-radius: var(--calc-border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: var(--calc-text-color);
}

[data-theme="dark"] .container {
     --calc-card-background: #2d2d2d;
     --calc-text-color: #e0e0e0;
}

.container h1 {
    color: var(--calc-primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
}

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

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

.container label {
    font-weight: 600;
    color: var(--calc-text-color);
}

.container input, .container select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--calc-border-radius);
    font-size: 1rem;
    transition: var(--calc-transition);
    width: 100%;
    background-color: #fff;
    color: #1f2937;
}

[data-theme="dark"] .container input, [data-theme="dark"] .container select {
    background-color: #444;
    color: #e0e0e0;
    border-color: #555;
}

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

.container button {
    background-color: var(--calc-primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--calc-border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--calc-transition);
}

.container button:hover {
    background-color: var(--calc-secondary-color);
    transform: translateY(-1px);
}

.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: var(--calc-border-radius);
    text-align: center;
    display: none;
}

[data-theme="dark"] .result {
     background-color: #1a1a1a;
}

.result.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.result h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--calc-text-color);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    margin-top: 0.5rem;
    text-align: center;
}

.suggestions {
    font-size: 1rem;
    color: #1f2937;
    margin-top: 1.5rem;
    text-align: left;
    white-space: pre-line;
}

[data-theme="dark"] .suggestions {
    color: #e0e0e0;
}

/* --- SEO Content Styles --- */
.content-section {
    margin-top: 2rem;
}

.content-section h2 {
    color: var(--calc-primary-color);
    text-align: left;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .content-section h2 {
    border-top-color: #444;
}

.content-section h3 {
    color: var(--calc-primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    opacity: 0.9;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: left;
}

.content-section a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted var(--secondary-color);
}
.content-section a:hover {
    text-decoration: none;
    border-bottom: 1px solid var(--secondary-color);
}

.content-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: var(--calc-border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* --- FAQ Styles --- */
.faq-container {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--card-color);
    border-radius: var(--calc-border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.faq-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}
[data-theme="dark"] .faq-item {
    border-bottom-color: #444;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    position: relative;
    transition: background-color 0.2s;
}
.faq-question:hover {
    background-color: rgba(0,0,0,0.03);
}
[data-theme="dark"] .faq-question:hover {
    background-color: rgba(255,255,255,0.05);
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 1rem;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}
.faq-question.active::after {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1rem;
}
.faq-answer p {
    padding-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffcc00;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }
    .main-nav.active {
        display: flex;
    }
    .main-nav li {
        margin: 0.5rem 0;
        margin-left: 0;
    }
    .logo img {
        max-width: 140px;
    }
}

@media (max-width: 640px) {
    main {
        padding: 1rem;
    }
    .container, .faq-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-width: 100px;
    }
}