/* ========================= */


/* RESET */


/* ========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7fb;
    color: #222;
    min-height: 100vh;
}


/* ========================= */


/* HEADER */


/* ========================= */

header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    text-align: center;
    padding: 70px 20px;
}

header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
}

header p {
    font-size: 18px;
    opacity: .9;
}


/* ========================= */


/* CONTENEDOR */


/* ========================= */

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 60px 0;
}


/* ========================= */


/* GRID */


/* ========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}


/* ========================= */


/* TARJETAS */


/* ========================= */

.card {
    background: white;
    border-radius: 18px;
    padding: 35px;
    text-align: center;
    text-decoration: none;
    color: #222;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    transition: .35s;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    border-color: #2563eb;
    box-shadow: 0 20px 40px rgba(37, 99, 235, .18);
}

.icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    line-height: 1.6;
    min-height: 75px;
}


/* ========================= */


/* BOTÓN */


/* ========================= */

.btn {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 30px;
    background: #2563eb;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s;
}

.card:hover .btn {
    background: #1d4ed8;
}


/* ========================= */


/* FOOTER */


/* ========================= */

footer {
    margin-top: 60px;
    padding: 35px;
    text-align: center;
    color: #777;
}


/* ========================= */


/* CALCULADORAS */


/* ========================= */

.calculadora {
    background: white;
    width: 95%;
    max-width: 600px;
    margin: 50px auto;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
}

.calculadora h2 {
    text-align: center;
    margin-bottom: 30px;
}

.calculadora label {
    display: block;
    margin-top: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.calculadora input,
.calculadora select {
    width: 100%;
    padding: 13px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    font-size: 16px;
    transition: .25s;
}

.calculadora input:focus,
.calculadora select:focus {
    outline: none;
    border-color: #2563eb;
}


/* ========================= */


/* BOTONES */


/* ========================= */

.botones {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.botones button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: .3s;
}

.btn-calcular {
    background: #2563eb;
    color: white;
}

.btn-calcular:hover {
    background: #1d4ed8;
}

.btn-limpiar {
    background: #e5e5e5;
}

.btn-limpiar:hover {
    background: #d0d0d0;
}


/* ========================= */


/* RESULTADOS */


/* ========================= */

.resultado {
    margin-top: 35px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.linea {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
}

.total {
    margin-top: 15px;
    border-top: 2px solid #ddd;
    padding-top: 15px;
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
}


/* ========================= */


/* BOTÓN VOLVER */


/* ========================= */

.volver {
    display: inline-block;
    margin-top: 25px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.volver:hover {
    text-decoration: underline;
}


/* ========================= */


/* RESPONSIVE */


/* ========================= */

@media(max-width:768px) {
    header {
        padding: 50px 20px;
    }
    header h1 {
        font-size: 32px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 28px;
    }
    .calculadora {
        padding: 25px;
    }
    .botones {
        flex-direction: column;
    }
}