/* assets/css/style.css */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --sidebar-width: 300px;
    --header-height: 70px;
    --container-width: 1200px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.site-logo span {
    color: var(--primary-color);
}

.site-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.site-nav ul {
    display: flex;
    gap: 2rem;
}

.site-nav a {
    color: var(--text-dark);
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
}

/* Main Content */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* Ad Slots */
.ad-slot {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    color: #94a3b8;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
}

.ad-header {
    max-width: 728px;
    height: 90px;
    margin-top: 1rem;
}

.ad-content {
    width: 100%;
    height: 250px;
    margin: 2rem 0;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
    margin-bottom: 2rem;
}

.ad-footer {
    max-width: 728px;
    height: 90px;
}

/* Footer */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    /* Increased padding */
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 1.5fr;
    /* 4 columns now */
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-newsletter h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-newsletter p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input[type="email"] {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.newsletter-form button:hover {
    background-color: var(--primary-hover);
}

.success-message {
    color: var(--success-color) !important;
    font-weight: 600;
    margin-top: 0.5rem;
}

.footer-brand .site-logo {
    margin-bottom: 1rem;
    display: inline-flex;
    /* Ensure it doesn't take full width if not needed, though flex usually implies block-like behavior for the container in some contexts, but site-logo is flex. inline-flex is safer for footer alignment if text-align is involved. */
}

/* Updated to target the new logo class instead of h3 if h3 is gone, but keeping just in case */
.footer-brand h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-light);
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-dark);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}


/* Calculator Styles */
.hero-section {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.calculator-app {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.form-section {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 2rem;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.step-badge {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol,
.percent-symbol {
    position: absolute;
    color: var(--text-light);
    font-weight: 500;
}

.currency-symbol {
    left: 1rem;
}

.percent-symbol {
    right: 1rem;
}

input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-wrapper input:not([name="income"]):not([name="expenses"]) {
    padding-left: 1rem;
}

/* Fix for specific inputs with symbols */
input[name="profit"] {
    padding-right: 2rem;
}

input[name="income"],
input[name="expenses"] {
    padding-left: 2rem;
}


.hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.calculate-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calculate-btn:hover {
    background: var(--primary-hover);
}

/* Results Area */
.results-area {
    margin-top: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.results-area.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.final-rate {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.1;
}

.per-hour {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breakdown-item {
    text-align: center;
}

.breakdown-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.breakdown-item .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.detailed-breakdown {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
}

.detailed-breakdown h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.detailed-breakdown li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.detailed-breakdown li:last-child {
    border-bottom: none;
}

/* Content Area */
.guide-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.guide-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.guide-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.guide-content p {
    margin-bottom: 1rem;
}

.guide-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style: disc;
}

.formula-box {
    background: #e0e7ff;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
    font-family: monospace;
    font-size: 1.1em;
}

.sidebar-widget {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 0.5rem;
}

.widget-links li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-light);
}

.widget-links li:last-child {
    border: none;
}

/* Accordion */
.accordion details {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1rem;
    background: white;
}

.accordion summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    /* Hide default arrow */
    position: relative;
    padding-right: 2.5rem;
}

.accordion summary::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 400;
    font-size: 1.5rem;
}

.accordion details[open] summary::after {
    content: '-';
}

.accordion details p {
    padding: 1rem;
    padding-top: 0;
    margin-bottom: 0;
    color: var(--text-light);
}

.accordion details p {
    padding: 1rem;
    padding-top: 0;
    margin-bottom: 0;
    color: var(--text-light);
}

/* Resources Page Styling */
.resource-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.resource-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.resource-card h3 {
    margin-bottom: 0.5rem;
}

.resource-card h3 a {
    color: var(--text-dark);
}

.resource-card h3 a:hover {
    color: var(--primary-color);
}

/* Media Queries Update */

/* Media Queries - Navigation */
@media (max-width: 1024px) {
    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .site-nav.active {
        display: block;
        animation: slideDownNav 0.3s ease-out;
    }

    @keyframes slideDownNav {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .site-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .site-nav a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--bg-light);
    }

    .site-nav li:last-child a {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* Base Mobile styles (typography adjustments) */
@media (max-width: 768px) {

    .form-row,
    .breakdown-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .calculate-btn {
        padding: 0.875rem;
    }

    .final-rate {
        font-size: 2.5rem;
    }

    .ad-header,
    .ad-footer {
        height: auto;
        min-height: 50px;
        padding: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }
}

/* Hamburger Animation */
.mobile-menu-toggle span {
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}