:root {
    --primary-color: #2C435F;
    --secondary-color: #94311a;
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #e1e8ed;
    --accent-color: #4F78AA;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Barlow', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.main-header {
    background-color: #fff;
    box-shadow: none;
    border-bottom: 0;
}

.header-top {
    background-color: #f0f0f0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 63px;
}

.header-content img {
    height: 63px;
    display: block;
}

.logo {
    height: 63px;
}

.img-photo {
    border-left: 1px solid #fff;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 15px;
}

.card-header h2 {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.row {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

input[type="text"],
input[type="date"],
select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.input-inline {
    display: flex;
    gap: 10px;
}

.btn-calculate {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
    margin-top: 10px;
}

.btn-calculate:hover {
    background-color: #1a2c41;
}

.btn-calculate:active {
    transform: scale(0.98);
}

.results-section {
    margin-top: 30px;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row.primary strong {
    color: var(--secondary-color);
}

.result-row.total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #e1e8ed;
    font-size: 1.2rem;
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.main-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 40px;
    align-items: start;
}

.footer-section h3 {
    color: #f1f5f9;
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p,
.footer-section ul {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #e2e8f0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.office-hours li {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.office-hours .days {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
}

.office-hours .hours {
    color: #cbd5e1;
}

.contact-info p {
    margin-bottom: 15px;
}

.powered-by-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    text-align: right;
}

.powered-by-section span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cbd5e1;
}

.powered-by-section img {
    height: 100px;
    opacity: 0.95;
}

@media (max-width: 930px) {
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 20px;
    }

    .header-content img {
        height: 50px;
    }

    .logo {
        height: 50px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .powered-by-section {
        grid-column: 1 / -1;
        align-items: center;
        justify-content: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
}

@media (max-width: 600px) {

    .header-content img.img-photo,
    .header-content img.giglio {
        display: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* Override external styles for header links */
.header-links,
.header-links li {
    float: none !important;
    background: none !important;
    width: 100%;
    text-align: left;
    /* Align text as needed, default likely left */
}

.header-links li {
    color: var(--primary-color) !important;
    /* Improve visibility */
    font-size: 1.5rem;
    /* Make it look more like a header */
    font-weight: 600;
    padding: 10px 0 10px 20px;
    /* Added left padding */
}