/* ===========================
   TARJETAS DE NOTICIAS CON MARCO DE TELÉFONO
   =========================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 60px;
    margin-top: 60px;
    justify-items: center;
}

/* Contenedor de tarjeta con marco de teléfono */
.news-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 9 / 16;
    /* Proporción típica de smartphone */
}

/* Marco del teléfono como imagen de fondo */
.news-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../assets/images/TELEFONO.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
    pointer-events: none;
    /* Permite interactuar con el contenido debajo */
}

/* Encabezado de la tarjeta (icono + nombre de red social) */
.news-header {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.news-header .social-icon {
    width: 28px;
    height: 28px;
}

.news-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Área de contenido dentro del marco del teléfono */
.news-content {
    position: absolute;
    top: 18%;
    left: 10%;
    right: 10%;
    bottom: 12%;
    overflow: hidden;
    border-radius: 20px;
    background: white;
    z-index: 2;
}

/* Iframe de Facebook */
.news-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

/* Tarjeta de Instagram personalizada */
.insta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    text-align: center;
}

.insta-profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.insta-card h4 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.insta-card p {
    margin: 0 0 24px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.insta-btn {
    display: inline-block;
    padding: 12px 32px;
    background: white;
    color: #e1306c;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.insta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #f5f5f5;
}

/* Animación de entrada */
.news-card {
    animation: phoneSlideIn 0.8s cubic-bezier(0.22, 0.9, 0.35, 1) backwards;
}

.news-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes phoneSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .news-card {
        max-width: 350px;
    }

    .news-header h3 {
        font-size: 16px;
    }

    .news-header .social-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .news-card {
        max-width: 300px;
    }

    .news-header {
        padding: 10px 20px;
    }

    .news-header h3 {
        font-size: 14px;
    }

    .insta-profile-pic {
        width: 100px;
        height: 100px;
    }

    .insta-card h4 {
        font-size: 18px;
    }

    .insta-card p {
        font-size: 13px;
    }
}