/* Events Section Styles */
.events-container {
    padding: 50px 15px;
    background-color: #f8f9fa;
}

.event-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 25px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 420px;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.event-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.7) 100%
    );
    transition: all 0.3s ease;
    z-index: 1;
}

.event-card:hover .event-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.05) 30%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.event-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    z-index: 2;
    color: white;
}

.event-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    padding-top: 8px;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
}

.event-instructor {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-style: italic;
}

.event-info {
    margin-bottom: 10px;
}

.event-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 3px;
}

.event-time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
    font-weight: 500;
}

.event-venue {
    font-size: 0.8rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.event-description {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.event-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.event-duration,
.event-type,
.event-price {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.event-price {
    background: rgba(255, 215, 0, 0.9);
    color: #333;
    border: 1px solid rgba(255, 215, 0, 0.5);
    font-weight: 600;
    text-shadow: none;
}

.event-book-btn {
    background: linear-gradient(135deg, #471b02 0%, #5c2203 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(71, 27, 2, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.event-book-btn:hover {
    background: linear-gradient(135deg, #5c2203 0%, #471b02 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(71, 27, 2, 0.4);
}

/* General responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Navbar logo responsiveness */
.navbar-logo, .navbar-logo-offcanvas {
    max-height: 50px;
    width: auto;
    transition: max-height 0.3s ease;
}

/* Icon images responsiveness */
img[alt*="Icon"] {
    max-width: 80px;
    height: auto;
    margin: 0 auto;
}

/* Responsive adjustments */
/* Mobile devices (up to 480px) */
@media (max-width: 480px) {
    .events-container {
        padding: 30px 10px;
    }
    
    .event-card {
        height: 360px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .event-content {
        padding: 16px;
    }
    
    .event-details {
        padding-top: 6px;
    }
    
    .event-title {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }
    
    .event-instructor {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .event-date {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .event-time {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .event-venue {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .event-info {
        margin-bottom: 12px;
    }
    
    .event-description {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .event-meta {
        margin-bottom: 14px;
        gap: 8px;
    }
    
    .event-duration,
    .event-type,
    .event-price {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
    
    .event-book-btn {
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 18px;
    }
    
    .navbar-logo, .navbar-logo-offcanvas {
        max-height: 40px;
    }
    
    img[alt*="Icon"] {
        max-width: 60px;
    }
}

/* Small mobile devices (481px to 576px) */
@media (min-width: 481px) and (max-width: 576px) {
    .events-container {
        padding: 35px 12px;
    }
    
    .event-card {
        height: 380px;
    }
    
    .event-content {
        padding: 18px;
    }
    
    .event-details {
        padding-top: 8px;
    }
    
    .event-title {
        font-size: 1.35rem;
        margin-bottom: 7px;
    }
    
    .event-instructor {
        font-size: 1rem;
        margin-bottom: 13px;
    }
    
    .event-date {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }
    
    .event-time {
        font-size: 0.88rem;
        margin-bottom: 6px;
    }
    
    .event-venue {
        font-size: 0.85rem;
    }
    
    .event-info {
        margin-bottom: 13px;
    }
    
    .event-description {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .event-meta {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .event-duration,
    .event-type,
    .event-price {
        padding: 5px 11px;
        font-size: 0.8rem;
    }
    
    .event-book-btn {
        padding: 13px 20px;
        font-size: 15px;
    }
}

/* Small tablets (577px to 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .events-container {
        padding: 40px 15px;
    }
    
    .event-card {
        height: 400px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-details {
        padding-top: 8px;
    }
    
    .event-title {
        font-size: 1.4rem;
        margin-bottom: 7px;
    }
    
    .event-instructor {
        font-size: 1.05rem;
        margin-bottom: 13px;
    }
    
    .event-date {
        font-size: 0.98rem;
        margin-bottom: 5px;
    }
    
    .event-time {
        font-size: 0.9rem;
        margin-bottom: 7px;
    }
    
    .event-venue {
        font-size: 0.85rem;
    }
    
    .event-info {
        margin-bottom: 13px;
    }
    
    .event-description {
        font-size: 1rem;
        margin-bottom: 14px;
    }
    
    .event-meta {
        margin-bottom: 17px;
    }
    
    .event-duration,
    .event-type,
    .event-price {
        padding: 5px 12px;
        font-size: 0.82rem;
    }
    
    .event-book-btn {
        padding: 13px 24px;
        font-size: 15px;
    }
    
    .navbar-logo, .navbar-logo-offcanvas {
        max-height: 45px;
    }
    
    img[alt*="Icon"] {
        max-width: 70px;
    }
}

/* Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .events-container {
        padding: 45px 20px;
    }
    
    .event-card {
        height: 420px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-details {
        padding-top: 8px;
    }
    
    .event-title {
        font-size: 1.45rem;
        margin-bottom: 7px;
    }
    
    .event-instructor {
        font-size: 1.08rem;
        margin-bottom: 14px;
    }
    
    .event-info {
        margin-bottom: 14px;
    }
    
    .event-meta {
        margin-bottom: 18px;
    }
    
    .event-book-btn {
        padding: 14px 26px;
        font-size: 15px;
    }
}

/* Desktop (1025px to 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .event-card {
        height: 440px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-details {
        padding-top: 8px;
    }
}

/* Large desktop (1201px and up) */
@media (min-width: 1201px) {
    .events-container {
        padding: 60px 30px;
    }
    
    .event-card {
        height: 460px;
    }
    
    .event-content {
        padding: 22px;
    }
    
    .event-details {
        padding-top: 10px;
    }
    
    .event-title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .event-instructor {
        font-size: 1.15rem;
        margin-bottom: 16px;
    }
    
    .event-date {
        font-size: 1.05rem;
        margin-bottom: 6px;
    }
    
    .event-time {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .event-venue {
        font-size: 0.95rem;
    }
    
    .event-info {
        margin-bottom: 16px;
    }
    
    .event-meta {
        margin-bottom: 20px;
    }
    
    .event-duration,
    .event-type,
    .event-price {
        padding: 7px 14px;
        font-size: 0.9rem;
    }
    
    .event-description {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
    
    .event-book-btn {
        padding: 16px 28px;
        font-size: 17px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .event-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Aspect ratio maintenance for responsive images */
.responsive-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.responsive-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Enhanced animations and effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: fadeInUp 0.6s ease-out;
}

.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; }

/* Focus states for accessibility */
.event-card:focus-within {
    outline: 3px solid #471b02;
    outline-offset: 2px;
}

.event-book-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Loading skeleton (optional) */
.event-card.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; }
}

/* Improved hover effects for mobile touch */
@media (hover: none) and (pointer: coarse) {
    .event-card:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }
    
    .event-card:active {
        transform: scale(0.98);
    }
}

/* Print styles */
@media print {
    .event-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        min-height: auto;
        height: auto;
        background: white !important;
    }
    
    .event-overlay {
        display: none;
    }
    
    .event-content {
        color: black !important;
    }
    
    .event-title {
        color: black !important;
        text-shadow: none;
    }
    
    .event-description {
        color: #333 !important;
        text-shadow: none;
    }
    
    .event-book-btn {
        display: none;
    }
    
    .event-meta {
        color: #666 !important;
    }
}

/* RTL support */
[dir="rtl"] .event-content {
    text-align: right;
}

[dir="rtl"] .event-meta {
    flex-direction: row-reverse;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .event-card {
        animation: none;
        transition: none;
    }
    
    .event-card:hover {
        transform: none;
    }
    
    .event-book-btn:hover {
        transform: none;
    }
}
