﻿.cotizador-image {
    background-image: url('../images/top_pages/cotizador.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    width: 100%;
    object-fit: cover;
    filter: brightness(50%);
}

.fade-in {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cotizador-content {
    padding: 4rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
}


.title-description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .title-description {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}


.cotizador-description {
    flex: 1;
    font-size: 1.1rem;
    color: #555;
    opacity: 0.9;
}

.cotiza-tu-proyecto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

    .cotiza-tu-proyecto h4 {
        font-size: 2rem;
        margin: 0;
        color: #000;
    }

.cotiza-icono {
    font-size: 40px;
    margin: 0;
    padding: 0;
}


.input-row {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin: 1rem 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.input-metros {
    width: 150px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #aaa;
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    color: #000;
}

    .input-metros::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }

    .input-metros:focus {
        outline: none;
        box-shadow: none;
    }

.btn-cotizar {
    padding: 0.5rem 1rem;
    background-color: #0072bb;
    color: white;
    border: none;
    cursor: pointer;
}

.tipo-obra-section h4 {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: -1rem;
    color: #000;
}

.nivel-detalle h4 {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: -1rem;
    color: #000;
}

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}


.checkbox-cuadrado-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-cuadrado {
    width: 20px;
    height: 20px;
    appearance: none;
    border: 2px solid black;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s ease;
}

    .checkbox-cuadrado:checked {
        background-color: black;
        border-color: black;
    }

        .checkbox-cuadrado:checked::after {
            content: "";
            position: absolute;
            top: 3px;
            left: 6px;
            width: 3px;
            height: 8px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }


.btn-mas-detalles {
    background: none;
    border: none;
    color: black;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    float: right;
}

.tabla-costos {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

    .tabla-costos th {
        padding: 0.5rem;
        background-color: #000;
        color: #fff;
    }

    .tabla-costos td {
        border-bottom: 1px solid #ddd;
        padding: 0.5rem;
        width: 50%;
        color:#000;
    }

.fila-gris {
    background-color: #f0f0f0;
    font-weight: 700;
    color: #000;
}

.fila-negra {
    background-color: #000;
    color: #fff;
    font-weight: bold;
}

.fila-negra td{
    color: #fff;
}

    .fila-negra td label{
        color: #fff;
    }

.moneda-row {
    align-items: center;
    display: flex;
    font-weight: 700;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 1rem 0px;
    padding: 0.5rem 1rem;
}

.select {
    width: 145px;
}

/* Ocultar el select nativo */
.select-hidden {
    display: none;
}

/* El nuevo contenedor estilizado */
.moneda-row .select {
    position: relative;
    display: inline-block;
}

/* Aplicar el estilo del mockup al elemento visible generado */
.select-styled {
    color: rgb(0, 0, 0);
    cursor: pointer;
    font-size: 0.9rem;
    background: rgb(255, 255, 255);
    border: 2px solid rgb(0, 0, 0);
    padding: 0.35rem 1.1rem;
    transition: 0.3s;
}

    .select-styled:hover {
        color: rgb(255, 255, 255);
        background: rgb(0, 0, 0);
    }

/* Estilos para el desplegable de opciones */
.select-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 999;
    margin: 0;
    padding: 0;
    list-style: none;
    background: rgb(255, 255, 255);
    border: 2px solid rgb(0, 0, 0);
    border-top: none;
}

    .select-options li {
        padding: 0.5rem 1rem;
        cursor: pointer;
        color: rgb(0, 0, 0);
        transition: 0.3s;
    }

        .select-options li:hover {
            color: rgb(255, 255, 255);
            background: rgb(0, 0, 0);
        }


.email-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .email-section p {
        color: black;
        padding-left: 0rem;
        padding-right: 0rem;
        text-align: start;
        font-size: 1.1rem;
    }

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-input {
    display: flex;
    flex-direction: column;
}

    .email-input label {
        font-weight: 500;
        margin-bottom: 0.5rem;
    }

    .email-input input {
        background: transparent;
        border: none;
        border-bottom: 1px solid #aaa;
        padding: 0.5rem 0;
        font-size: 1rem;
        color: #000;
    }

        .email-input input::placeholder {
            color: rgba(0, 0, 0, 0.4);
        }

        .email-input input:focus {
            outline: none;
            box-shadow: none;
        }



.animar-numero {
    transition: all 0.4s ease-in-out;
}


.animate-table {
    animation: fadeInUp 0.5s ease;
}

.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

    .custom-modal-overlay.is-open {
        display: block !important;
    }

/* Ocultar el modal por defecto */
.custom-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background-color: #ffffff;
    z-index: 9999; /* Asegura que quede por encima de todo */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow-y: auto;
    padding: 1.5rem;
}

    /* Estado activo para mostrarlo */
    .custom-modal.is-open {
        display: block !important;
    }

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

    .custom-modal-header p {
        font-size: 1.2rem;
        font-weight: 500;
        color: #555;
        flex: 1;
        line-height: 1.6;
        text-align: justify;
        margin-top: 0.5rem;
        padding-right: 1rem;
        padding-left: 0rem;
    }


.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.custom-modal-footer {
    margin-top: 1rem;
    text-align: right;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
    border-top: 1px solid #ddd;
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}


.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    border: none;
    background: none;
    transition: color 0.3s ease;
    font-size: 1.1rem;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

    .tab:hover {
        color: #000;
        background: #f0f0f0;
        border-radius: 5px;
    }

    .tab.active {
        color: #000;
        border-bottom: 4px solid #000;
        font-size: 1.2rem;
        background: #f0f0f0;
        border-radius: 5px;
        padding-bottom: 0.3rem;
        cursor: default;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        font-weight: bold;
        flex: 2;
        min-width: 150px;
        text-align: center;
    }

.table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 2%;
}


.tabla-detalles tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

.tabla-detalles {
    width: 100%;
    border-collapse: collapse;
    color: black;
}

    .tabla-detalles th,
    .tabla-detalles td {
        padding: 8px;
        border-bottom: 1px solid #ddd;
    }


.tabla-formas-pago tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

.tabla-formas-pago {
    width: 100%;
    border-collapse: collapse;
    color: black;
}

.tabla-formas-pago th,
.tabla-formas-pago td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}


@media screen and (min-width: 769px) and (max-width: 985px) {
    .cotizador-description {
        font-size: 1.1rem;
        text-align: justify;
        margin-top: 0.5rem;
        padding-right: 1rem;
        padding-left: 0rem;
    }
}


    @media screen and (max-width: 768px) {
        .tabla-costos,
        .tabla-detalles {
            font-size: 0.9rem;
            color: black;
        }

        .cotizador-description {
            font-size: 1.1rem;
            text-align: justify;
            margin-top: 0.5rem;
            padding-right: 1rem;
            padding-left: 0rem;
        }

        .checkbox-list {
            flex-direction: row;
            gap: 0.5rem;
        }

        .custom-modal {
            width: 90%;
            max-width: 95%;
            max-height: 80vh;
            padding: 1rem;
            animation: slideIn 0.3s ease-out;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            right: 1rem;
            top: 0;
            transform: translateY(0);
            box-sizing: border-box;
        }

        .custom-modal-header p {
            font-size: 1rem;
            margin-top: 0;
            padding-right: 0;
            padding-left: 0;
            text-align: justify;
        }


        .custom-modal-footer {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
            font-size: 0.8rem;
        }



        .tab {
            font-size: 1rem;
        }
    }

    label {
        color: #000;
    }

    .lbl-mtrs-construccion {
        text-align: left;
        display: contents;
        font-size: 1rem;
    }

    /* Asegurar que el modal permanezca oculto en pantallas pequeñas cuando no está activo */
    .custom-modal:not(.show) {
        display: none !important;
    }

        /* Evitar que las tablas se desplieguen fuera del modal oculto en responsive */
        .custom-modal:not(.show) .tab-content,
        .custom-modal:not(.show) .tabla-detalles {
            display: none !important;
        }

    /* Estilo base para centrar correctamente los Modales Custom en pantalla */
    .custom-modal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 800px !important;
        max-height: 85vh !important;
        z-index: 1050 !important;
        background-color: #ffffff;
        box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

        /* Ocultar modales cuando no están activos */
        .custom-modal:not(.show) {
            display: none !important;
        }

        /* Permitir scroll dentro de la tabla si el contenido supera la altura máxima */
        .custom-modal .table-wrapper {
            overflow-y: auto;
            max-height: calc(85vh - 130px);
            padding: 15px;
        }

    /* Fondo oscuro desenfocado opcional detrás del modal (Backdrop) */
    body.modal-open::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }