/* ============================================
   STYLES.CSS - GNP SEGUROS COATZACOALCOS
   Versión PRO 2026 - Tarjeta con portada móvil
   ============================================ */

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

/* Products Section */
.products-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Products Grid - 2x2 Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.card-image.autos {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-image.hogar {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.card-image.salud {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.card-image.vida {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    text-align: center;
    white-space: nowrap;
}

.badge.featured {
    background: #ff6b35;
    color: white;
}

.card-content {
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-company {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.bookmark-btn, .heart-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.bookmark-btn:hover, .heart-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.card-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #6c757d;
}

.detail-icon {
    margin-right: 10px;
    opacity: 0.7;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Modificación para la tarjeta de gastos médicos - sin precio */
.card-footer.gastos-medicos {
    justify-content: center;
}

.card-footer.gastos-medicos .card-buttons {
    width: 100%;
}

.price {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Contenedor de botones */
.card-buttons {
    display: flex;
    gap: 10px;
}

.card-buttons.full-width {
    width: 100%;
}

.apply-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    flex: 1;
}

.apply-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* Botón Ver más con el azul de GNP */
.ver-mas-btn {
    background: #1e3a8a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.ver-mas-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

/* CTA Badge - Elemento elegante */
.cta-badge {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.cta-text {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulse-glow 3s ease-in-out infinite;
}

.cta-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 15px 40px rgba(30, 58, 138, 0.4);
        transform: scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   AGENT CARD - DISEÑO BASE (Desktop/Tablet)
   ============================================ */
.agent-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: center;
    position: sticky;
    top: 30px;
}

/* Imagen de portada - OCULTA en Desktop */
.agent-card-cover {
    display: none;
}

.agent-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #f0f9ff;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.2);
    overflow: hidden;
}

.agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-name {
    font-size: 24px;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.agent-title {
    font-size: 20px;
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
}

.agent-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

/* Logo "Vivir es increíble" al final de la tarjeta */
.agent-card-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
}

.agent-card-footer img {
    height: 40px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.agent-card-footer img:hover {
    opacity: 1;
}

/* ============================================
   CONTACT ACTIONS - BOTONES DE CONTACTO
   ============================================ */
.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-phone {
    background: #333;
    color: white;
}

.btn-email {
    background: #1e3a8a;
    color: white;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .agent-card {
        position: static;
        order: -1;
    }
}

/* ============================================
   🔥 RESPONSIVE - MÓVIL
   PORTADA ESTILO FACEBOOK SOLO EN MÓVIL
   ============================================ */
@media (max-width: 768px) {
    .main-content {
        margin: 20px auto;
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-image {
        height: 180px;
    }

    .cta-text {
        font-size: 14px;
        padding: 15px 30px;
    }

    /* ========================================
       🔥 AGENT CARD CON PORTADA - SOLO MÓVIL
       ======================================== */
    .agent-card {
        position: static;
        order: -1;
        margin-bottom: 20px;
        padding: 0; /* Quitar padding para la portada */
        overflow: hidden;
    }
    
    /* 🔥 MOSTRAR imagen de portada solo en móvil */
    .agent-card-cover {
        display: block;
        width: 100%;
        height: 140px;
        background-image: url('../imagenes/portada.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
        border-radius: 15px 15px 0 0;
    }
    
    /* Overlay oscuro para contraste */
    .agent-card-cover::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.25) 100%);
    }
    
    /* 🔥 Contenedor de contenido (recuperar padding) */
    .agent-card-content {
        padding: 0 20px 20px 20px;
        position: relative;
    }
    
    /* 🔥 Foto sobrepuesta a la portada */
    .agent-photo {
        width: 120px;
        height: 120px;
        margin: -60px auto 15px; /* -60px = mitad, sube sobre portada */
        border: 4px solid #ffffff;
        box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
        position: relative;
        z-index: 10;
    }

    .agent-name {
        font-size: 20px;
    }

    .agent-title {
        font-size: 16px;
        line-height: 1.3;
    }

    .agent-subtitle {
        font-size: 13px;
    }
    
    /* Logo vivir es increíble más pequeño */
    .agent-card-footer {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .agent-card-footer img {
        height: 35px;
    }

    /* ============================================
       🎯 BOTONES DE CONTACTO - ICONOS HORIZONTALES
       ============================================ */
    .contact-actions {
        flex-direction: row;
        justify-content: center;
        gap: 70px;
        margin-top: 30px;
    }

    .contact-button {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 0;
        background: transparent !important;
        font-size: 50px;
        box-shadow: none;
        border: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    }

    /* Ocultar el texto, mostrar solo icono */
    .contact-button span:last-child {
        display: none;
    }

    .contact-button span:first-child {
        display: none;
    }

    /* Crear iconos SVG con pseudo-elementos */
    .btn-phone::before,
    .btn-email::before,
    .btn-whatsapp::before {
        content: '';
        display: block;
        width: 50px;
        height: 50px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    /* Icono de teléfono */
    .btn-phone::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333333'%3E%3Cpath d='M20.01 15.38c-1.23 0-2.42-.2-3.53-.56a.977.977 0 0 0-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z'/%3E%3C/svg%3E");
    }

    /* Icono de Gmail */
    .btn-email::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23EA4335' d='M5 5h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3Cpath fill='%23FBBC04' d='M3 7v10c0 1.1.9 2 2 2h14l-8-6-8-6z'/%3E%3Cpath fill='%2334A853' d='M21 7v10c0 1.1-.9 2-2 2H5l8-6 8-6z'/%3E%3Cpath fill='%234285F4' d='M21 7 12 13 3 7l9-4 9 4z'/%3E%3Cpath fill='%23C5221F' d='M12 13 3 7v10l9-4z'/%3E%3C/svg%3E");
    }

    /* Icono de WhatsApp */
    .btn-whatsapp::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2325D366' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.051 3.488'/%3E%3C/svg%3E");
    }

    .contact-button:hover {
        transform: scale(1.2) translateY(-3px);
        filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.25));
    }

    .contact-button:active {
        transform: scale(1.1) translateY(-1px);
    }

    /* Responsive para botones de productos */
    .card-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL PEQUEÑO
   ============================================ */
@media (max-width: 480px) {
    .card-title {
        font-size: 1rem;
    }

    .card-company {
        font-size: 0.75rem;
    }

    .detail-item {
        font-size: 0.75rem;
    }

    .price {
        font-size: 0.9rem;
    }

    .apply-btn, .ver-mas-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .cta-text {
        font-size: 12px;
        padding: 12px 20px;
    }

    /* Agent card - aún más compacto */
    .agent-card-cover {
        height: 120px;
    }
    
    .agent-photo {
        width: 110px;
        height: 110px;
        margin: -55px auto 15px;
    }

    .agent-title {
        font-size: 15px;
    }

    .agent-subtitle {
        font-size: 12px;
    }
    
    .agent-card-footer img {
        height: 30px;
    }

    /* Botones de contacto aún más compactos */
    .contact-button {
        width: 48px;
        height: 48px;
    }

    .contact-button::before {
        width: 48px !important;
        height: 48px !important;
    }

    .contact-actions {
        gap: 60px;
        margin-top: 25px;
    }
}