/* ==========================================================================
   CALCULADORA IFCS — Home Page (index.html)
   Hero, intro, form, footer
   ========================================================================== */

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    background: var(--darkBlue);
    text-align: center;
}

.tittle-cont {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.25rem 1.5rem;
}

.hero-tittle {
    font-weight: 700;
    font-size: clamp(1.5rem, 4.5vw, 2.75rem);
    line-height: 1.2;
}

.hero-subt {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 400;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.paragraph-container {
    width: 100%;
    padding: 1.25rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--yellow);
}

.hero-paragraph {
    max-width: 40rem;
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: var(--white);
    line-height: 1.35;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.75rem 1rem;
    width: 100%;
}

.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    min-width: 10rem;
    min-height: 2.75rem;
    border-radius: 50px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color var(--transition), color var(--transition),
                transform var(--transition), box-shadow var(--transition);
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        max-width: 18rem;
    }
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn--white {
    background-color: var(--white);
    color: var(--darkBlue);
}

.btn--white:hover {
    background-color: var(--gray);
}

.btn--transparent {
    border: 2px solid var(--white);
    color: var(--white);
    background-color: transparent;
}

.btn--transparent:hover {
    background-color: var(--white);
    color: var(--darkBlue);
}

/* --- Hero: desktop ------------------------------------------------------- */

@media (min-width: 1024px) {
    .tittle-cont {
        padding: 3rem 2rem 2rem;
        max-width: 56rem;
    }

    .paragraph-container {
        padding: 1.5rem 2rem;
    }

    .button-container {
        padding: 2.5rem 2rem;
    }

    .btn {
        padding: 0.875rem 2.5rem;
        font-size: 1.05rem;
    }
}

/* ==========================================================================
   INTRO / QUOTE
   ========================================================================== */

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

.quote-container {
    padding: 2rem 1.5rem 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
}

.quote {
    text-align: center;
    color: var(--darkBlue);
    font-weight: 600;
    line-height: 1.35;
    max-width: 40rem;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

@media (min-width: 1024px) {
    .intro {
        flex-direction: row;
        align-items: stretch;
    }

    .intro .img1 {
        width: 50%;
        object-fit: cover;
        max-height: none;
    }

    .quote-container {
        width: 50%;
        padding: 3rem 2.5rem;
    }
}

/* ==========================================================================
   FORM — General
   ========================================================================== */

.calc-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.form-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--yellow);
    padding: 1.5rem 1.25rem;
    gap: 0.25rem;
}

.form-start {
    color: var(--white);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
}

.form-desc {
    color: var(--darkBlue);
    font-weight: 600;
    font-size: 1.05rem;
}

.form-title a {
    color: var(--white);
    font-weight: 400;
    font-size: 0.95rem;
    margin-top: 0.35rem;
    text-decoration: underline;
    text-underline-offset: 0.15rem;
}

.form-title a:hover {
    opacity: 0.85;
}

/* ==========================================================================
   FORM — Section containers
   ========================================================================== */

.form-section-cont {
    width: 100%;
}

.form-section {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-subtitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

/* Section number badges */
.subt-num {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Description boxes */
.desc-2,
.desc-4 {
    margin-top: 0.75rem;
    border-radius: var(--radius);
    padding: 0.625rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
}

.desc-2 {
    background-color: var(--green);
    color: var(--darkBlue);
}

.desc-4 {
    background-color: var(--yellow);
    color: var(--white);
}

/* --- Input & Select containers ------------------------------------------- */

.input-container,
.input-container2 {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Labels & field descriptions */
.input-container p,
.input-container2 p,
.input-container span,
.input-container2 span {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.3;
}

.input-container label,
.input-container2 label {
    display: flex;
    flex-direction: column;
}

/* Base input / select styling */
.form-section input[type="text"],
.form-section input[type="number"],
.form-section input[type="email"],
.form-section input[type="date"] {
    width: 100%;
    height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--darkBlue);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-section select {
    width: 100%;
    height: 2.75rem;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--darkBlue);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23275d8e' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.75rem;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

/* Input backgrounds per container type */
.input-container input,
.input-container select {
    background-color: var(--gray);
}

.input-container2 input,
.input-container2 select {
    background-color: var(--white);
}

/* Placeholders */
.form-section ::placeholder {
    color: var(--grayText);
    font-size: 0.95rem;
}

/* Focus states */
.form-section input:focus,
.form-section select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px hsla(188, 100%, 33%, 0.2);
}

/* ==========================================================================
   FORM — Section 1: Datos de ubicación
   ========================================================================== */

.sect1 {
    background-color: var(--white);
}

.subt-1 {
    background-color: var(--blue);
    color: var(--white);
}

.subt-1-desc {
    color: var(--darkBlue);
}

.inp-cont-1 p {
    color: var(--darkBlue);
}

/* ==========================================================================
   FORM — Section 2: Características de la vialidad
   ========================================================================== */

.sect2 {
    background-color: var(--blue);
}

.subt-2 {
    background-color: var(--yellow);
    color: var(--blue);
}

.subt-2-desc {
    color: var(--white);
}

.inp-cont-2 p,
.inp-cont-2 span {
    color: var(--white);
}

/* Override select arrow color on dark background */
.sect2 select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23275d8e' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ==========================================================================
   FORM — Section 3: Datos de equipamientos
   ========================================================================== */

.subt-3 {
    background-color: var(--green);
    color: var(--darkBlue);
}

.subt-3-desc {
    color: var(--darkBlue);
}

.inp-cont-3 p,
.inp-cont-3 span {
    color: var(--darkBlue);
}

/* ==========================================================================
   FORM — Image between sections
   ========================================================================== */

.img2 {
    width: 100%;
    display: block;
}

/* ==========================================================================
   FORM — Section 4: Características del puente
   ========================================================================== */

.sect4 {
    background-color: var(--green);
}

.subt-4 {
    background-color: var(--darkBlue);
    color: var(--white);
}

.subt-4-desc {
    color: var(--darkBlue);
}

.inp-cont-4 p,
.inp-cont-4 span {
    color: var(--darkBlue);
}

/* ==========================================================================
   FORM — Section 5: Fuente de los datos
   ========================================================================== */

.subt-5 {
    background-color: var(--green);
    color: var(--darkBlue);
}

.subt-5-desc {
    color: var(--darkBlue);
}

.inp-cont-5 p {
    color: var(--darkBlue);
}

.desc-5 {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
    text-align: justify;
    margin-top: 0.5rem;
}

.desc-5 a {
    color: var(--darkBlue);
    font-weight: 600;
}

.desc-5 input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    margin-top: 0.125rem;
    accent-color: var(--blue);
    cursor: pointer;
}

/* ==========================================================================
   CALCULATE BUTTON
   ========================================================================== */

.calc-btn-cont {
    display: flex;
    justify-content: center;
    padding: 2rem 1.5rem 3rem;
}

.btn-yellow {
    background-color: var(--yellow);
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 700;
    padding: 0.875rem 2.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background-color var(--transition), transform var(--transition),
                box-shadow var(--transition);
}

.btn-yellow:hover {
    background-color: hsl(40, 76%, 48%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-yellow:active {
    background-color: var(--blue);
    transform: translateY(0);
}

.btn-yellow:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background-color: var(--darkBlue);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    gap: 1.75rem;
}

.footer-logo {
    max-width: 14rem;
}

.footer-logo img {
    width: 100%;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.footer-menu li a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04rem;
    transition: color var(--transition);
}

.footer-menu li a:hover {
    color: var(--yellow);
}

.creditos {
    color: var(--white);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
    max-width: 32rem;
    line-height: 1.4;
}

/* ==========================================================================
   RESPONSIVE — Tablet (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .form-section {
        padding: 2.25rem 2.5rem;
    }

    .input-container,
    .input-container2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .desc-5 {
        grid-column: 1 / -1;
    }

    .footer {
        padding: 2.5rem 2.5rem;
    }

    .footer-menu {
        flex-direction: row;
        gap: 2rem;
    }
}

/* ==========================================================================
   RESPONSIVE — Desktop (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
    .form-section {
        padding: 2.5rem max(2.5rem, calc(50% - 27rem));
    }

    .form-title {
        padding: 2rem max(1.5rem, calc(50% - 27rem));
    }

    .inp-cont-1 {
        grid-template-columns: repeat(3, 1fr);
    }

    .calc-btn-cont {
        padding: 2.5rem 1.5rem 3.5rem;
    }

    .btn-yellow {
        font-size: 1.5rem;
        padding: 1rem 3rem;
    }

    /* Footer desktop: horizontal layout */
    .footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 2rem max(2.5rem, calc(50% - 27rem));
    }

    .footer-logo {
        max-width: 10rem;
    }

    .creditos {
        text-align: right;
        max-width: 20rem;
    }
}
