/* ===== RESTAURANTES DINÁMICOS CSS ===== */

/* Contenedor principal de restaurantes */
.restaurantes-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.restaurantes-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23003366" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23003366" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Título principal */
.restaurantes-title {
    color: #003366;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.restaurantes-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #003366, #0066cc);
    border-radius: 2px;
}

.restaurantes-subtitle {
    color: #666;
    font-size: 18px;
    margin-bottom: 50px;
    font-weight: 300;
}

/* Filtros de categoría */
.filter-buttons {
    margin-bottom: 40px;
    text-align: center;
}

.filter-btn {
    background: #fff;
    border: 2px solid #003366;
    color: #003366;
    padding: 10px 25px;
    margin: 5px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
    background: #003366;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

/* Grid de restaurantes */
.restaurantes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Tarjeta de restaurante */
.restaurante-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
    opacity: 0;
    transform: translateY(30px);
}

.restaurante-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.restaurante-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #003366, #0066cc, #00cc99);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.restaurante-card:hover::before {
    transform: scaleX(1);
}

.restaurante-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Contenido de la tarjeta */
.restaurante-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.restaurante-name {
    color: #003366;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.descuento-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    margin-left: 15px;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.restaurante-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.restaurante-categoria {
    display: inline-block;
    background: #f8f9fa;
    color: #003366;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* Botones de acción */
.restaurante-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-qr {
    background: linear-gradient(135deg, #003366, #0066cc);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-qr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.3);
}

.btn-info {
    background: #fff;
    color: #003366;
    border: 2px solid #003366;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: #003366;
    color: #fff;
}

/* Modal para QR */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.qr-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.qr-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.qr-close:hover {
    color: #003366;
}

.qr-code-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.qr-code-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Sección de estadísticas */
.restaurantes-stats {
    background: #003366;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #00cc99;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .restaurantes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .restaurante-card {
        padding: 20px;
    }
    
    .restaurante-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .descuento-badge {
        margin-left: 0;
        margin-top: 10px;
        align-self: flex-start;
    }
    
    .restaurante-actions {
        flex-direction: column;
    }
    
    .filter-btn {
        display: block;
        margin: 5px auto;
        width: 200px;
    }
    
    .qr-modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .restaurantes-section {
        padding: 40px 0;
    }
    
    .restaurantes-title {
        font-size: 24px;
    }
    
    .restaurantes-subtitle {
        font-size: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

/* Animaciones adicionales */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bounce-in {
    animation: bounceIn 0.8s ease forwards;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}
