/* Dynamic Home Page Enhancements */

/* Featured Events Grid */
.featured-events-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}

/* Multiple featured events layout */
.featured-events-grid .event-card {
    max-width: none;
    width: 100%;
}

/* When there are 2 events */
.featured-events-grid:has(.event-card:nth-child(2)):not(:has(.event-card:nth-child(3))) {
    grid-template-columns: 1fr 1fr;
}

/* When there are 3 or more events */
.featured-events-grid:has(.event-card:nth-child(3)) {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* Responsive featured events grid */
@media (max-width: 1024px) {
    .featured-events-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .featured-events-grid {
        gap: 1rem;
    }
}

/* Sponsor Logo Styling */
.sponsor-logo {
    max-width: 100px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    margin-bottom: 0.5rem;
}

.sponsor-logo:hover {
    filter: grayscale(0%);
}

/* Testimonial Like Functionality */
.testimonial-like-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.testimonial-like-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.testimonial-like-btn.liked {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

.testimonial-like-btn.liked:hover {
    background: rgba(231, 76, 60, 0.3);
}

.heart-icon {
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
}

.testimonial-like-btn:hover .heart-icon {
    transform: scale(1.1);
}

.like-count {
    font-weight: 600;
    font-size: 0.9rem;
}

.like-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.5rem;
}

/* Floating heart animation styles */
@keyframes floatHeart {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-25px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-50px) scale(0.5);
        opacity: 0;
    }
}

/* Responsive testimonial likes */
@media (max-width: 768px) {
    .testimonial-like-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .testimonial-like-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .like-text {
        font-size: 0.7rem;
        margin-left: 0;
    }
}

/* Event Card Photo Slideshow */
.event-card-slideshow {
    position: relative;
    width: 100%;
    height: 300px; /* Increased from 200px */
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.event-card-slideshow .event-card-image,
.event-card-slideshow .event-card-image-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.1);
}

.event-card-slideshow .event-card-image.active,
.event-card-slideshow .event-card-image-large.active {
    opacity: 1;
    transform: scale(1);
}

.event-card-slideshow .event-card-image:not(.active),
.event-card-slideshow .event-card-image-large:not(.active) {
    transform: scale(1.05);
}

/* Large Image Media Container */
.event-card-media-large {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    height: 450px; /* Significantly increased height to match featured events */
}

.event-card-image-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease;
}

.event-card:hover .event-card-image-large {
    transform: scale(1.05);
}

/* Legacy compact content (will be overridden by new styles above) */
.event-card-content-compact-legacy {
    padding: 1.5rem;
}

.event-card-content-compact-legacy .event-card-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.event-card-content-compact-legacy .event-card-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.event-card-content-compact-legacy .event-card-description {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Slideshow Controls */
.slideshow-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.event-card:hover .slideshow-controls {
    opacity: 1;
}

.slideshow-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.slideshow-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.slideshow-btn:active {
    transform: scale(0.95);
}

/* Enhanced slideshow controls for larger images */
.event-card-media-large .slideshow-controls {
    padding: 0 20px; /* More padding for larger images */
}

.event-card-media-large .slideshow-btn {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.event-card-media-large .slideshow-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Slideshow Indicators */
.slideshow-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Enhanced event card content spacing */
.event-card-content-compact {
    padding: 2rem 1.5rem; /* Increased vertical padding */
}

.event-card-content-compact .event-card-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem; /* Slightly larger title */
    font-weight: 700;
    line-height: 1.3;
}

.event-card-content-compact .event-card-date {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-weight: 500;
}

.event-card-content-compact .event-card-description {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Allow more lines for better readability */
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Responsive Slideshow */
@media (max-width: 768px) {
    .slideshow-controls {
        padding: 0 10px;
    }
    
    .slideshow-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .slideshow-indicators {
        bottom: 10px;
        gap: 6px;
    }
    
    .indicator {
        width: 6px;
        height: 6px;
    }
    
    .event-card-slideshow,
    .event-card-media-large {
        height: 320px; /* Larger responsive height for mobile */
    }
    
    .event-card-content-compact {
        padding: 1.25rem;
    }
    
    .event-card-content-compact .event-card-title {
        font-size: 1rem;
    }
    
    .event-card-content-compact .event-card-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .event-card-slideshow,
    .event-card-media-large {
        height: 380px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .event-card-slideshow,
    .event-card-media-large {
        height: 500px; /* Much larger on desktop to match featured events */
    }
    
    .event-card-content-compact .event-card-title {
        font-size: 1.2rem;
    }
    
    .event-card-content-compact .event-card-description {
        font-size: 1rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 1600px) {
    .event-card-slideshow,
    .event-card-media-large {
        height: 550px;
    }
}

.sponsor-logo:hover {
    filter: grayscale(0%);
}

/* Event Card Image Styling */
.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

/* Testimonial Avatar Styling */
.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Dynamic Content Animations */
.dynamic-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Featured Event Animation Delays */
.featured-events-grid .event-card:nth-child(1) {
    animation-delay: 0.1s;
}

.featured-events-grid .event-card:nth-child(2) {
    animation-delay: 0.2s;
}

.featured-events-grid .event-card:nth-child(3) {
    animation-delay: 0.3s;
}

.featured-events-grid .event-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sponsor-logo {
        max-width: 80px;
        max-height: 50px;
    }
    
    .event-card-image,
    .event-card-image-large {
        height: 220px;
    }
    
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
    
    /* Grid adjustments for mobile */
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .event-card-slideshow,
    .event-card-media-large {
        height: 200px !important;
    }
    
    .event-card-content-compact {
        padding: 1rem;
    }
    
    .event-card-content-compact .event-card-title {
        font-size: 0.95rem;
    }
    
    .event-card-content-compact .event-card-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Loading State for Dynamic Content */
.loading-placeholder {
    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;
    }
}

/* Featured Event Enhancements */
.featured-event-video {
    border-radius: 12px;
    overflow: hidden;
}

.featured-event-fallback {
    background: var(--gradient-primary);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: white;
}

/* Grid Layout Improvements */
.dynamic-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 640px) {
    .dynamic-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Past Events Section Improvements */
#past-events .grid {
    gap: 2.5rem; /* Increased gap between event cards */
}

/* Better grid layout for larger images */
@media (min-width: 1200px) {
    #past-events .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (min-width: 1600px) {
    #past-events .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* Enhanced slideshow controls for larger images */
.event-card-media-large .slideshow-controls {
    padding: 0 20px; /* More padding for larger images */
}

.event-card-media-large .slideshow-btn {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.event-card-media-large .slideshow-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.event-card-media-large .slideshow-indicators {
    bottom: 20px; /* More space from bottom for larger images */
    gap: 10px;
}

.event-card-media-large .indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.event-card-media-large .indicator.active,
.event-card-media-large .indicator:hover {
    background: white;
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* Newsletter Section Styles */
#newsletter {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    color: white;
}

#newsletter .section-title {
    color: white;
    margin-bottom: 1rem;
}

#newsletter .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.max-w-md {
    max-width: 28rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex-1 {
    flex: 1;
}

.shrink-0 {
    flex-shrink: 0;
}

.placeholder-white::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.bg-opacity-10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.border-opacity-20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.opacity-60 {
    opacity: 0.6;
}

.opacity-80 {
    opacity: 0.8;
}

.text-xs {
    font-size: 0.75rem;
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.hidden {
    display: none !important;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.notification-success {
    border-left: 4px solid #22c55e;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    margin-left: 1rem;
}

.notification-close:hover {
    color: #374151;
}

/* Footer Newsletter Message Styles */
.newsletter-message {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.newsletter-success {
    color: #22c55e;
}

.newsletter-error {
    color: #ef4444;
}

/* Background gradient for newsletter section */
.bg-gradient-dark {
    background: linear-gradient(135deg, 
        var(--surface-dark, #1a1a2e) 0%, 
        var(--surface-medium, #16213e) 50%, 
        var(--surface-dark, #1a1a2e) 100%
    );
}

/* Enhanced form input styles for newsletter */
#newsletter .form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
}

#newsletter .form-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

/* Responsive newsletter section */
@media (max-width: 768px) {
    #newsletter .flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}
