body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

header {
    text-align: center;
    padding: 40px 0;
    background-color: #f4f4f4;
}

h1,
h2,
h3 {
    color: #2c3e50;
}

/* Estilos para el encabezado con imagen de fondo */
.hero {
    background: url('headerback.jpeg') no-repeat center center/cover;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    padding: 55px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);

    /* Capa oscura para mejor legibilidad */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}

.header-logo {
    max-height: 150px;
    flex-shrink: 0;

    /* Prevents logo from shrinking */
    background-color: white; /* Solid white background */
    border-radius: 50%;
    padding: 0px;
    box-sizing: border-box;
}

.header-text {
    text-align: left;
}

.hero h1 {
    font-size: 2.5em;
    color: white;
    margin: 0 0 10px 0;
}

.hero p {
    font-size: 1.1em;
    max-width: 600px;
    margin: 0;
}

.form-section {
    padding: 40px 0;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

.form-row .six.columns {
    width: 48%;
}

.input-group {
    margin-bottom: 15px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.slider-input {
    display: flex;
    align-items: center;
}

.slider-input input[type="range"] {
    flex-grow: 1;
    margin-right: 10px;
}

.slider-input input[type="number"] {
    width: 120px;
}

.cta-button {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.cta-button {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 25px;
    border: none;
    cursor: pointer;
}

#results {
    padding: 40px 0;
    background-color: #f9f9f9;
    display: none;
}

.results-summary {
    text-align: center;
    margin-bottom: 40px;
}

#total-monthly-payment {
    font-size: 3em;
    color: #2c3e50;
    font-weight: bold;
}

.charts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.chart-box {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

@media (min-width: 550px) {
    .form-row .six.columns {
        width: 48%;
    }

    .chart-box {
        width: 48%;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 30px 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header-logo {
        max-height: 80px;
    }

    .header-text {
        text-align: center;
    }

    .hero h1 {
        font-size: 2em;
    }
}