/* Custom Styles for Tommy Cho Martial Arts */

/* Hero Section Background */
header {
    /*
    TODO
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://source.unsplash.com/1600x900/?martial-arts-dojo') no-repeat center center;
    */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    background-size: cover;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1s ease-in-out;
}

.hero-slideshow .slide.active {
    opacity: 1;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Menu Hover Effects */
nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #EF4444;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Card Hover Effects */
.shadow-lg {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shadow-lg:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Hover Animation */
.bg-red-600 {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bg-red-600::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.bg-red-600:hover::after {
    width: 300px;
    height: 300px;
}

/* Instructor Image Hover Effect */
.rounded-full {
    transition: transform 0.3s ease;
}

.rounded-full:hover {
    transform: scale(1.05);
}

/* Form Input Focus Effects */
input, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Mobile Navigation Menu */
@media (max-width: 768px) {
    .hidden {
        display: none;
    }
    
    .gallery-slider {
        padding: 20px 0 40px;
    }
    
    .swiper-slide {
        height: 300px;
    }
}

/* Loading Animation for Images */
.bg-gray-200 {
    position: relative;
    overflow: hidden;
}

/* Section Fade-In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 1s ease-out;
}

/* Gallery Section Styles */
.gallery-slider {
    padding: 20px 0 60px;
    position: relative;
}

.swiper-slide {
    height: 800px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-slide:hover {
    transform: translateY(-5px);
}

.swiper-button-next,
.swiper-button-prev {
    color: #EF4444 !important;
    background: rgba(255, 255, 255, 0.9);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(239, 68, 68, 0.5);
}

.swiper-pagination-bullet-active {
    background: #EF4444 !important;
}

/* Gallery Image Captions */
.swiper-slide > div {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.swiper-slide:hover > div {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .swiper-slide {
        height: 500px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    
    .swiper-slide > div {
        transform: translateY(0);
    }
}

/* Navigation Styles */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

nav.scrolled {
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(5px);
}

/* News flyers */
#news .image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

#news .image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

/* Mobile Navigation */
.mobile-menu-button {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(17, 24, 39, 0.95);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        margin: 1rem 0;
        font-size: 1.5rem;
    }

    .close-menu {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
    }
}

/* Active Section Highlight */
@media (min-width: 769px) {
    .nav-links a {
        position: relative;
    }

    .nav-links a.active {
        color: #EF4444;
    }

    .nav-links a.active::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        bottom: -4px;
        left: 0;
        background-color: #EF4444;
    }
}
