/* 
 * Custom CSS for the Happening Page
 * Created: 2025-07-05
 * Description: Styles for the event cards and video section
 *
 * Color Scheme:
 * - Primary: #5e7ca3 (soft blue)
 * - Secondary: #f8f9fa (light gray)
 * - Accent: #e8c872 (soft gold)
 * - Text: #333333 (dark gray)
 * - Light Text: #666666 (medium gray)
 */

/* Video Container Styles */
.video-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    background-color: #f8f8f8;
    /* Add a subtle border */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Add max-width for better control */
    max-width: 100%;
    /* Add aspect ratio */
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    cursor: pointer;
}

/* Video thumbnail container */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video iframe container */
.video-iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Responsive iframe for YouTube video */
.responsive-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-play-btn {
    display: block;
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 12px;
}

/* Play button container */
.play-overlay::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.play-overlay i {
    color: #fff;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-play-btn:hover .play-overlay,
.video-play-btn.is-hovered .play-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.video-play-btn:hover .play-overlay i,
.video-play-btn.is-hovered .play-overlay i {
    transform: scale(1.2);
    opacity: 1;
    color: #e8c872; /* Accent color for the play icon on hover */
}

.video-play-btn:hover .play-overlay::after,
.video-play-btn.is-hovered .play-overlay::after {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

/* Event Card Styles */
.event-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    background-color: #fff;
    margin-bottom: 20px;
    /* Animation properties */
    opacity: 0;
    transform: translateY(20px);
}

/* Card animation when visible */
.event-card.card-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Add active class for touch devices */
.event-card.is-hovered {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.event-card:hover .event-card-title {
    color: #5e7ca3; /* Primary color for title on hover */
}

.event-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.event-card-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.event-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* Align image to top to prevent chopping off top portion */
    transition: all 0.5s ease;
}

.event-card:hover .event-card-img img {
    transform: scale(1.1);
}

.event-card-body {
    padding: 20px;
    background-color: #fff;
}

.event-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
}

.event-card-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Section Styles */
.heading-large {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.subheading {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.bg-light {
    background-color: #f8f9fa; /* Secondary color */
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .event-card-img {
        height: 180px;
    }
    
    .heading-large {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .event-card {
        margin-bottom: 30px;
    }
    
    .event-card-img {
        height: 200px;
    }
    
    .heading-large {
        font-size: 24px;
    }
    
    .subheading {
        font-size: 14px;
    }
    
    .video-container {
        margin-bottom: 20px;
        /* For portrait mode - take full width */
        width: 100%;
    }
}

/* Portrait mode specific styles */
@media (max-width: 767px) and (orientation: portrait) {
    .video-container {
        /* Take full viewport width */
        width: 100%;
        /* Maintain 16:9 aspect ratio */
        padding-bottom: 56.25%;
    }
}

/* Landscape mode specific styles */
@media (max-width: 767px) and (orientation: landscape) {
    .video-container {
        /* Take 60% of viewport height as requested */
        height: 60vh;
        padding-bottom: 0;
        margin: 0 auto 20px;
    }
    
    .responsive-iframe {
        height: 100%;
    }
}

/* Spacing between cards - reduced to 15px as requested */
.row.mb-15 {
    margin-bottom: 15px;
}

.mb-15 {
    margin-bottom: 15px;
}

/* Original 30px spacing classes kept for backward compatibility */
.row.mb-30 {
    margin-bottom: 15px; /* Reduced from 30px to 15px */
}

.mb-30 {
    margin-bottom: 15px; /* Reduced from 30px to 15px */
}

.mb-50 {
    margin-bottom: 50px;
}

/* Additional utility classes */
.text-primary {
    color: #5e7ca3;
}

.text-accent {
    color: #e8c872;
}

/* Section transitions */
.section-wrap {
    position: relative;
    z-index: 1;
    transition: background-color 0.5s ease;
}

/* Add a subtle divider between sections */
.section-wrap:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
}
