/**
 * Modern Theme CSS - Bright & Fresh Design
 * For 潘炳坤國術體育會暨合得來花炮會 website
 */
 
/* CSS Variables */
:root {
    --primary-color: #e63946;       /* Bold red for accents and buttons */
    --secondary-color: #457b9d;     /* Blue for secondary elements */
    --light-color: #f1faee;         /* Light cream for backgrounds */
    --dark-color: #1d3557;          /* Dark blue for text and headers */
    --accent-color: #a8dadc;        /* Light teal for accents */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    background-color: var(--white) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    color: var(--dark-color);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    opacity: 0.7;
}

/* Hero Sections */
.hero-section {
    background: linear-gradient(rgba(29, 53, 87, 0.6), rgba(29, 53, 87, 0.6)), url('/static/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-top: 56px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(230, 57, 70, 0.3) 0%, rgba(69, 123, 157, 0.3) 100%);
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.hero-text {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
    max-width: 800px;
    margin: 0 auto;
}

/* Content Sections */
.section {
    padding: 5rem 0;
    background-color: var(--white);
}

.section-alt {
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

/* Cards */
.modern-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    margin-bottom: 2rem;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 1.5rem;
}

.card-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.8rem;
}

.card-body {
    padding: 2rem;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    border-radius: 8px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.2);
    border-color: var(--secondary-color);
}

/* Buttons */
.btn-modern {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--white);
    transition: var(--transition);
}

.btn-modern:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(69, 123, 157, 0.3);
    color: var(--white);
}

.btn-outline-modern {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-modern:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Icons */
.modern-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    transition: var(--transition);
}

.icon-wrapper:hover .modern-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(69, 123, 157, 0.3);
}

/* Social Media */
.social-links {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    margin: 0 0.7rem;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.facebook {
    background: #3b5998;
}

.whatsapp {
    background: #25d366;
}

.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.youtube {
    background: #ff0000;
}

.xiaohongshu {
    background: #fe2c55;
}

/* Footer */
footer {
    background-color: var(--light-gray);
    color: var(--dark-color);
    padding: 3rem 0 1.5rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
    color: var(--dark-color);
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background: var(--primary-color);
    border-radius: 3px;
}

footer p {
    margin-bottom: 0.8rem;
    color: var(--gray);
}

footer p i {
    margin-right: 10px;
    color: var(--primary-color);
}

footer a {
    color: var(--gray);
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.3rem 0;
    text-decoration: none;
}

footer a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

footer .social-links {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

footer .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

footer .social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.footer-bottom {
    margin-top: 2rem;
    text-align: center;
}

hr {
    background-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

/* Timeline Component */
.modern-timeline {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem 0;
}

.modern-timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--white);
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.timeline-year {
    position: absolute;
    top: -20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.timeline-item:nth-child(odd) .timeline-year {
    right: 20px;
}

.timeline-item:nth-child(even) .timeline-year {
    left: 20px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    top: 45px;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.timeline-item:nth-child(even)::after {
    left: -13px;
}

@media (max-width: 768px) {
    .modern-timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important;
    }
    
    .timeline-item::after {
        left: 18px;
        right: auto;
    }
    
    .timeline-item:nth-child(odd) .timeline-year,
    .timeline-item:nth-child(even) .timeline-year {
        left: 20px;
        right: auto;
    }
}

/* Gallery items */
.gallery-item {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.gallery-image img {
    transition: transform 0.8s ease;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: all 0.4s ease;
    opacity: 0;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Additional spacing for section layout */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    font-weight: 700;
    color: var(--dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Button styles */
.btn-modern {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: var(--white);
}

.btn-modern:active {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 991px) {
    .hero-section {
        height: 35vh;
        margin-top: 56px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .modern-timeline::before {
        left: 40px;
    }
    
    .timeline-item:nth-child(even),
    .timeline-item:nth-child(odd) {
        padding: 0 0 0 80px;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-year,
    .timeline-item:nth-child(even) .timeline-year {
        left: 0;
    }
}

@media (max-width: 767px) {
    .hero-section {
        height: 30vh;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .gallery-filters .btn {
        margin-bottom: 0.5rem;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: -60px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.active {
    bottom: 30px;
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
} 