﻿@font-face {
    font-family: 'Patria';
    src: url('../../fonts/PATRIA_REGULAR.OTF') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.titles_D_e_I {
    font-family: 'Patria', sans-serif;
    font-size: 3.5em;
    font-weight: 700;
    color: #611232;
    padding: 15px 0 0 0;
    text-align: center;
}

.sub_title {
    font-size: 1.2em;
    padding: 15px;
}

.custom-box {
    width: 100%;
    margin-top: 15px;
    text-align: center;
}

.line {
    width: 56%;
    margin: 0 auto;
    border-top: 2.5px solid #808080;
    position: relative;
    border-radius: 10%;
}

/***********************************/

/* ====== SECCIÓN ====== */
.cards-section {
    margin-top: 35px;
    padding: 0 20px;
}

/* ====== GRID ====== */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    justify-content: center;
}

/* ====== CARD ====== */
.card {
    position: relative;
    height: 422px;
    padding: 50px 15px 15px;
    text-align: center;
    background: #E1CFA8;
    border-radius: 5%;
    margin-top: 40px;
    width: 100%;
}

.grid .card:last-child:nth-child(3n + 1) {
    grid-column: 2 / 3;
}

/* ====== CÍRCULO SUPERIOR ====== */
.icon-circle {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid #b69140;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

    .icon-circle img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

/* ====== TÍTULO ====== */
.card-title {
    font-family: 'Patria', sans-serif;
    margin-bottom: 10px;
    font-size: 2em;
    color: #611232;
}

/* ====== CONTENEDOR IMAGEN (3D) ====== */
.image-box {
    position: relative;
    width: 100%;
    height: 250px;
    perspective: 1000px;
    margin-top: 25px;
}

/* ====== CONTENIDO INTERNO QUE GIRA ====== */
.image-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    border-radius: 5%;
}

/* ====== EFECTO HOVER ====== */
.image-box:hover .image-inner {
    transform: rotateY(180deg);
}

/* ====== CARAS ====== */
.image-front,
.image-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 5%;
}

    /* ====== FRENTE ====== */
    .image-front img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5%;
    }

/* ====== REVERSO ====== */
.image-back {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
    padding: 10px;
    text-align: center;
    font-size: 15px;
    cursor: pointer;
}

.full-width-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.top-centered-img {
    margin-top: 25px;
    max-width: 40%;
    height: auto;
}

/* ====== BOX TITLE ====== */
.title-container {
    height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* ===================================================== */
/* ==================== TABLET ========================= */
/* ===================================================== */

@media screen and (max-width: 1024px) {

    .titles_D_e_I {
        font-size: 2.8em;
    }

    .sub_title {
        font-size: 1.1em;
        padding: 10px 20px;
    }

    .line {
        width: 75%;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .card {
        height: auto;
        min-height: 420px;
    }

    .grid .card:last-child:nth-child(3n + 1) {
        grid-column: auto;
    }

    .top-centered-img {
        max-width: 60%;
    }

    .card-title {
        font-size: 1.8em;
    }

    .image-box {
        height: 220px;
    }
}

/* ===================================================== */
/* ==================== TELÉFONO ======================= */
/* ===================================================== */

@media screen and (max-width: 768px) {

    .cards-section {
        padding: 0 15px;
    }

    .titles_D_e_I {
        font-size: 2.1em;
        line-height: 1.2;
        padding: 10px 10px 0;
    }

    .sub_title {
        font-size: 1em;
        padding: 10px;
        text-align: center;
    }

    .line {
        width: 90%;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .card {
        margin-top: 20px;
        padding: 50px 12px 15px;
        border-radius: 25px;
        min-height: auto;
    }

    .card-title {
        font-size: 1.6em;
    }

    .title-container {
        height: auto;
        min-height: 70px;
        padding: 5px;
    }

    .image-box {
        height: 220px;
        margin-top: 15px;
    }

    .image-back {
        font-size: 14px;
        padding: 15px;
    }

    .icon-circle {
        width: 65px;
        height: 65px;
    }

        .icon-circle img {
            width: 35px;
            height: 35px;
        }

    .top-centered-img {
        max-width: 80%;
    }
}

/* ===================================================== */
/* ==================== TELÉFONOS PEQUEÑOS ============= */
/* ===================================================== */

@media screen and (max-width: 480px) {

    .titles_D_e_I {
        font-size: 1.8em;
    }

    .sub_title {
        font-size: 0.95em;
    }

    .card-title {
        font-size: 1.4em;
    }

    .image-box {
        height: 200px;
    }

    .image-back {
        font-size: 13px;
    }

    .top-centered-img {
        max-width: 95%;
    }
}
