/* Additional CSS fixes for JTGC Events and Image Display */
/* Add this to your assets/css/public.css file */

/* Event Cards Enhanced Styling */
.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none !important;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.event-card .card-img-top {
    height: 250px;
    object-fit: cover;
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Ensure images load properly */
.event-card img {
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dee2e6' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v12H4V4zm2 2v8h12V6H6zm2 2h8v4H8V8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2rem;
}

/* Event details styling */
.event-details {
    font-size: 0.875rem;
}

.event-details i {
    width: 16px;
    text-align: center;
}

/* Badge styling improvements */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Event time and venue styling */
.event-meta {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Fix for overflow text in event descriptions */
.event-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 4.2rem; /* 3 lines * 1.4 line-height */
}

/* Event status indicators */
.event-status-upcoming {
    border-left: 4px solid #28a745;
}

.event-status-past {
    border-left: 4px solid #6c757d;
    opacity: 0.8;
}

.event-status-ongoing {
    border-left: 4px solid #dc3545;
}

/* Image loading states */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error state for missing images */
.image-error {
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dee2e6' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM5 19V5h14v14H5z'/%3E%3Cpath d='m13.96 12.71-2.75-2.75a.5.5 0 0 0-.71 0L8 12.46V19h11v-4.54l-1.75-1.75a.5.5 0 0 0-.71 0l-2.58 2.58z'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .event-card .p-4 {
        padding: 1rem !important;
    }
    
    .event-description {
        height: 3.6rem; /* Reduce height on mobile */
        -webkit-line-clamp: 2;
    }
    
    .event-details {
        font-size: 0.8rem;
    }
}

/* Gallery and destination image fixes */
.destination-img img,
.gallery-item img,
.national-item img,
.international-item img {
    object-fit: cover;
    background-color: #f8f9fa;
}

/* Lightbox integration improvements */
.destination-img .search-icon,
.gallery-plus-icon {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.destination-img:hover .search-icon,
.gallery-item:hover .gallery-plus-icon {
    opacity: 1;
}

/* Package/Membership card image fixes */
.packages-img img {
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
}

/* Guide profile image fixes */
.guide-img img {
    height: 250px;
    object-fit: cover;
    background-color: #f8f9fa;
}

/* Carousel image improvements */
.carousel-item img {
    height: 100vh;
    min-height: 600px;
    object-fit: cover;
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    .carousel-item img {
        height: 70vh;
        min-height: 400px;
    }
}

/* About section image fix */
.about .h-100 img {
    height: 400px;
    object-fit: cover;
    background-color: #f8f9fa;
}

/* Service icons consistency */
.service-icon i {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Japanese text styling improvements */
.japanese-text {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Event type badges with better colors */
.badge.bg-cultural { background-color: #13357B !important; }
.badge.bg-marine { background-color: #17a2b8 !important; }
.badge.bg-adventure { background-color: #28a745 !important; }
.badge.bg-wildlife { background-color: #ffc107 !important; color: #000 !important; }

/* Improved button hover effects */
.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(19, 53, 123, 0.3);
}

/* Loading spinner for images */
.img-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Print styles for event cards */
@media print {
    .event-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .event-card img {
        filter: grayscale(100%);
    }
}