/*
css/hvaskjer.css
Hva skjer Section
*/

/* Hva Skjer Section Background */
.hvaskjer-section {
    background-color: var(--bg-light);
}
/* Empty Events State */
.events-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    border: 2px dashed #30847a;
    margin: 30px auto;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.events-empty-state .preview-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(48, 132, 122, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    border: 2px solid rgba(48, 132, 122, 0.2);
}

.events-empty-state .preview-icon::before {
    content: '📅';
    font-size: 2.5rem;
    opacity: 0.6;
}

.events-empty-state .preview-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #30847a;
    border-radius: 50%;
    opacity: 0.3;
}

.events-empty-state h3 {
    color: #30847a;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.events-empty-state p {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.events-empty-state .previous-events-link {
    background: linear-gradient(135deg, #30847a, #28a745);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(48, 132, 122, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.events-empty-state .previous-events-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.events-empty-state .previous-events-link:hover::before {
    left: 100%;
}

.events-empty-state .previous-events-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(48, 132, 122, 0.4);
    background: linear-gradient(135deg, #24665e, #218838);
}

/* Error message styling */
.error {
    padding: 30px 20px;
    text-align: center;
    color: #e74c3c;
}

.error i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.error p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.error-details {
    font-size: 0.9rem !important;
    color: #777;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #28a745
}

.loading:after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 3px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    margin-left: 10px;
    animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hvaskjer-section {
    text-align: center;
    position: relative;
}

.hvaskjer-section h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    position: relative;
    display: inline-block;
}

/* Modern section subtitle */
.hvaskjer-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
}

/* Section description */
.section-description {
    font-size: var(--font-size-body-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--line-height-relaxed);
    font-weight: var(--font-weight-normal);  /* Normal weight - larger font size provides readability */
}

/* Enhanced event container with scroll indicators */
.events-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.event-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* Restore nowrap to keep events in a horizontal row */
    overflow-x: auto; /* Restore horizontal scrolling for events */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0 30px 0;
    width: 100%;
    scroll-snap-type: x mandatory;
    gap: 24px;
    scroll-behavior: auto;
    animation: fadeInCards 0.8s ease-out;
}

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

/* Gradient scroll indicators */
.event-container::before,
.event-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 30px;
    width: 40px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.event-container::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.event-container::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

/* Custom scrollbar for desktop */
.event-container::-webkit-scrollbar {
    height: 6px;
}

.event-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.event-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #28a745, #34c759);
    border-radius: 3px;
}

.event-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #1e7e34, #28a745);
}

.event-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    min-width: 320px;
    max-width: 320px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(10px);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #34c759, #20b2aa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-card:hover::before {
    opacity: 1;
}

.event-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(40, 167, 69, 0.2);
}

/* Staggered card animation */
.event-card:nth-child(1) { animation-delay: 0.1s; }
.event-card:nth-child(2) { animation-delay: 0.2s; }
.event-card:nth-child(3) { animation-delay: 0.3s; }
.event-card:nth-child(4) { animation-delay: 0.4s; }
.event-card:nth-child(5) { animation-delay: 0.5s; }

.event-card {
    animation: slideInCard 0.6s ease-out forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes slideInCard {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.event-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    object-position: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

/* Image loading placeholder */
.event-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #dee2e6;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    animation: imageLoading 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-image[src=""], .event-image:not([src]) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.event-image[src=""]:before, .event-image:not([src]):before {
    opacity: 1;
}

@keyframes imageLoading {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.event-card:hover .event-image {
    opacity: 0.95;
    transform: scale(1.05);
}

.event-preview {
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-preview h3 {
    font-size: var(--font-size-h4);
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: var(--line-height-tight);
}

.event-date {
    font-size: var(--font-size-body-sm);
    margin-bottom: 15px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
    border-radius: 20px;
    border-left: 3px solid var(--color-primary);
    font-weight: var(--font-weight-medium);
}

.event-date i {
    margin-right: 8px;
    color: var(--color-primary);
    font-size: 1rem;
}

.details-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--text-white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-bounce);
    font-size: var(--font-size-body-sm);
    font-weight: var(--font-weight-semibold);
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.details-btn:hover::before {
    left: 100%;
}

.details-btn:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

/* Modal show state */
.modal.show {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 1500px;  /* Increased from 1025px to 1500px for wider content */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0);
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Modal content show state */
.modal.show .modal-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: none;
}

.modal-close:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

/* Removed old keyframe animation - now using CSS transitions for smoother performance */

/* Event details inside modal */
.event-details-modal {
    padding: 10px 0;
}

.event-details-modal h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    line-height: 1.3;
    padding-right: 50px;
}

.event-details-modal img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    width: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: zoom-in;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: block;
}

.event-details-modal img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Image zoom functionality */
.image-zoom-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.image-zoom-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-zoom-close:hover {
    background: rgba(220, 53, 69, 0.8);
    transform: scale(1.1);
}

.event-details-modal .info-row {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.event-details-modal .info-label {
    min-width: 120px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.event-details-modal .info-value {
    color: #555;
    line-height: 1.5;
    flex: 1;
}

.event-details-modal .description {
    line-height: 1.7;
    color: #333;
    margin-top: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #333;
}

/* Enhanced mobile responsive adjustments */
@media (max-width: 768px) {
    .events-empty-state {
        margin: 20px 15px;
        padding: 30px 20px;
        max-width: none;
    }

    .events-empty-state .preview-icon {
        width: 70px;
        height: 70px;
    }

    .events-empty-state .preview-icon::before {
        font-size: 2rem;
    }

    .events-empty-state h3 {
        font-size: 1.3rem;
    }

    .events-empty-state p {
        font-size: 0.95rem;
    }

    .event-card {
        min-width: 85%;
    }

    .event-image {
        height: 160px;
    }

    .event-details-modal img {
        max-height: 250px;
        border-radius: 8px;
    }

    .image-zoom-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 40px;
        height: 40px;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 95%;
        padding: 25px 20px;
        border-radius: 16px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        max-height: 90vh;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .modal.show .modal-content {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 20px;
        width: 35px;
        height: 35px;
    }

    .event-details-modal h2 {
        font-size: 1.5rem;
        padding-right: 40px;
        margin-bottom: 15px;
    }

    .event-details-modal .info-row {
        flex-direction: column;
        padding: 12px;
        margin-bottom: 15px;
    }

    .event-details-modal .info-label {
        min-width: auto;
        margin-bottom: 5px;
        font-size: 0.9rem;
    }

    .event-details-modal .description {
        padding: 15px;
        margin-top: 20px;
        font-size: 0.95rem;
    }

    .back-button {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 1rem;
        margin-top: 25px;
    }
}


/* Extra small screens */
@media (max-width: 480px) {
    .events-empty-state {
        margin: 15px 10px;
        padding: 25px 15px;
    }

    .events-empty-state .preview-icon {
        width: 60px;
        height: 60px;
    }

    .events-empty-state .preview-icon::before {
        font-size: 1.8rem;
    }

    .events-empty-state h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .events-empty-state p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .events-empty-state .previous-events-link {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 20px 15px;
    }

    .event-details-modal h2 {
        font-size: 1.3rem;
    }

    .event-details-modal .info-row {
        padding: 10px;
    }

    .event-details-modal .description {
        padding: 12px;
        font-size: 0.9rem;
    }

    .event-image {
        height: 140px;
    }

    .event-details-modal img {
        max-height: 200px;
        margin-bottom: 20px;
    }

    .image-zoom-content {
        max-width: 95%;
        max-height: 85%;
    }
}