/* ============================================================================
   EVENT DETAIL PAGE STYLES
   ============================================================================ */

.event-detail-hero {
    margin-top: 80px;
    min-height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    padding: 60px 20px 40px;
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
    opacity: 0.7;
    text-decoration: underline;
}

.event-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    font-size: 16px;
}

.event-detail-location {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-detail-location a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    outline: none;
}

.event-detail-location a:hover,
.event-detail-location a:focus {
    text-decoration: underline;
    outline: none;
}

.event-detail-location a:visited {
    color: var(--text-light);
    text-decoration: none;
    font-weight: normal;
}

.event-detail-meta svg {
    flex-shrink: 0;
}

.event-detail-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.event-detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.event-detail-description {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.event-detail-description h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.event-detail-description p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

.event-detail-info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.event-detail-info-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    min-width: 120px;
    color: var(--text-dark);
}

/* Event Photos Section */
.event-photos-section {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.event-photos-section h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 700;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Photo Pagination */
.photo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.photo-page-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.photo-page-btn:hover:not(:disabled),
.photo-page-btn:focus:not(:disabled) {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.photo-page-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.photo-page-info {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f0f0f0;
}

.photo-item:hover,
.photo-item:focus {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Event Calendar Section - matches info-item styling */
.event-detail-info-card .event-calendar-section {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: none;
    margin-top: 0;
}

.event-detail-info-card .event-calendar-section strong {
    flex-shrink: 0;
    width: 120px;
    color: var(--text-dark);
}

/* Event Actions */
.event-detail-actions {
    text-align: center;
    margin-top: 40px;
}

.back-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.back-link:hover,
.back-link:focus {
    text-decoration: underline;
}

.back-link:active {
    color: var(--primary-color);
    text-decoration: underline;
}

.back-link:visited {
    color: var(--secondary-color);
    text-decoration: none;
}

/* ============================================================================
   LIGHTBOX STYLES
   ============================================================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10001;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover,
.lightbox-close:focus {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-prev:focus,
.lightbox-next:hover,
.lightbox-next:focus {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-prev:focus {
    transform: translateY(-50%) translateX(-5px);
}

.lightbox-next:hover,
.lightbox-next:focus {
    transform: translateY(-50%) translateX(5px);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    max-width: 600px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .event-detail-meta {
        flex-direction: column;
        gap: 12px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 32px;
    }

    .lightbox-content img {
        max-height: 70vh;
    }
}

@media (min-width: 768px) {
    .event-detail-content {
        grid-template-columns: 2fr 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .event-detail-hero {
        min-height: 350px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Keyboard navigation support */
.photo-item:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Ensure lightbox is accessible */
.lightbox:focus-within {
    outline: none;
}
