/* Contenedor principal global */
.gpg-20a75f17-wrapper {
    width: 100%;
}

/* CSS Grid */
.gpg-20a75f17-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    /* Default: Celulares (Vertical: 2 columnas ancho, 4 celdas alto total para emular el 8 ventanas) */
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px; /* altura base */
}

/* Para Celulares: Estructura de 8 celdas (2 ancho x 4 alto) */
/* 2x2 arriba, luego el rectángulo horizontal abajo, luego las dos chiquitas */
.gpg-20a75f17-type-2x2 {
    grid-column: span 2;
    grid-row: span 2; /* ocupa 2 celdas de alto y 2 de ancho */
}
.gpg-20a75f17-type-1x2 {
    /* En celular este será un rectángulo horizontal debajo del cuadro principal */
    grid-column: span 2;
    grid-row: span 1;
}
.gpg-20a75f17-type-1x1 {
    grid-column: span 1;
    grid-row: span 1;
}

/* Para Tablet y PC: Estructura de 8 celdas (4 ancho x 2 alto) */
@media (min-width: 768px) {
    .gpg-20a75f17-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 250px;
    }
    
    /* Mitad Izquierda (2x2) */
    .gpg-20a75f17-type-2x2 {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    /* Mitad Derecha Arriba (Rectángulo 1x2 - 2 de ancho, 1 de alto) */
    .gpg-20a75f17-type-1x2 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    /* Mitad Derecha Abajo (Dos 1x1) */
    /* Mantienen span 1 y span 1, se acomodan solas debajo del rectángulo 1x2 */
}

/* Contenedor principal de la tarjeta */
.gpg-20a75f17-item {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    min-height: 150px;
}
@media (min-width: 768px) {
    .gpg-20a75f17-item {
        min-height: 250px;
    }
}

/* Efecto Glassmorphism compartido */
.gpg-20a75f17-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* Animación Flip 3D */
.gpg-20a75f17-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    border-radius: 20px;
}

.gpg-20a75f17-item:hover .gpg-20a75f17-card {
    transform: rotateY(180deg);
}

.gpg-20a75f17-front,
.gpg-20a75f17-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

/* Parte Frontal */
.gpg-20a75f17-front {
    background-size: cover;
    background-position: center;
    background-color: #333;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Overlay Glass en el título (Frontal) */
.gpg-20a75f17-glass-overlay {
    padding: 15px;
    margin: 10px;
    border-radius: 15px;
    color: #fff;
    text-align: left;
}

.gpg-20a75f17-type-2x2 .gpg-20a75f17-glass-overlay {
    padding: 30px;
    margin: 15px;
}

.gpg-20a75f17-date {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 5px;
    display: block;
}

/* Tipografías base (editables via Elementor) */
.gpg-20a75f17-title {
    margin: 0 0 5px 0;
    font-weight: bold;
    color: #fff;
    line-height: 1.3;
}

.gpg-20a75f17-type-2x2 .gpg-20a75f17-title { font-size: 1.8em; }
.gpg-20a75f17-type-1x2 .gpg-20a75f17-title { font-size: 1.4em; }
.gpg-20a75f17-type-1x1 .gpg-20a75f17-title { font-size: 1.1em; }

.gpg-20a75f17-author {
    font-size: 0.8em;
    opacity: 0.8;
    display: block;
}

/* Parte Trasera */
.gpg-20a75f17-back {
    transform: rotateY(180deg);
    background-size: cover;
    background-position: center;
    background-color: #333;
    display: flex;
    flex-direction: column;
}

.gpg-20a75f17-back-glass {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: #fff;
    text-align: left;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.4); /* Oscurece el glass un poco */
}

.gpg-20a75f17-type-2x2 .gpg-20a75f17-back-glass {
    padding: 30px;
}

.gpg-20a75f17-back-inner {
    width: 100%;
}

.gpg-20a75f17-excerpt {
    line-height: 1.5;
    margin-bottom: 15px;
    opacity: 0.9;
}

.gpg-20a75f17-type-2x2 .gpg-20a75f17-excerpt { font-size: 1.1em; }
.gpg-20a75f17-type-1x2 .gpg-20a75f17-excerpt { font-size: 0.95em; }
.gpg-20a75f17-type-1x1 .gpg-20a75f17-excerpt { font-size: 0.85em; margin-bottom: 10px; }

.gpg-20a75f17-btn {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.4);
    font-weight: bold;
    transition: background 0.3s;
}

.gpg-20a75f17-type-1x1 .gpg-20a75f17-btn {
    padding: 5px 12px;
    font-size: 0.8em;
}

.gpg-20a75f17-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Botón inferior */
.gpg-20a75f17-bottom-action {
    margin-top: 30px;
    text-align: center;
}

.gpg-20a75f17-main-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #333; /* Default, can be overridden by widget styles */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.gpg-20a75f17-main-btn:hover {
    opacity: 0.8;
}
