body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #1a3a8f 0%, #4e73df 100%);
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 150px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 1px;
}

.tagline {
    margin: 10px 0 0;
    font-size: 1.2rem;
    font-weight: 300;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

section {
    margin-bottom: 40px;
}

.calendar {
    margin: 20px auto;
    max-width: 1000px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    background-color: #fff;
    position: relative;
    min-height: 450px;
    z-index: 20;
    isolation: isolate;
}

.calendar-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    color: #1a3a8f;
    font-size: 1.2rem;
    z-index: 5;
}

#calendar iframe {
    width: 100%;
    transition: height 0.3s ease;
    z-index: 1;
    position: relative;
}

.reload-btn {
    margin: 15px auto 0;
    display: block;
    background-color: #1a3a8f;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.reload-btn:hover {
    background-color: #4e73df;
}

.google-calendar-embed h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #35424a;
}

/* Sections */
.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.intro h2 {
    color: #1a3a8f;
    font-size: 2rem;
}

.intro p {
    font-size: 1.1rem;
    color: #555;
}

/* Event Highlights Section */
.highlights-section {
    margin: 40px auto;
    max-width: 1000px;
}

.highlights-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.event-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: flex;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.event-date {
    background: linear-gradient(135deg, #1a3a8f 0%, #4e73df 100%);
    color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.event-date .day {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
}

.event-details {
    padding: 15px;
    flex-grow: 1;
}

.event-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1a3a8f;
    font-size: 1.2rem;
}

.event-time, .event-location {
    font-size: 0.9rem;
    color: #666;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.time-icon, .location-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
}

.time-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"/></svg>');
}

.location-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M12 2C8.1 2 5 5.1 5 9c0 5.2 7 13 7 13s7-7.8 7-13c0-3.9-3.1-7-7-7zm0 9.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5z"/></svg>');
}

.event-description {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #555;
}

.calendar-section {
    margin-bottom: 60px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e7ff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    clear: both;
    position: relative;
    z-index: 10;
}

.calendar-section h2 {
    color: #1a3a8f;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
}

.calendar-description {
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
}

.calendar-view-options {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.view-btn {
    background-color: #f0f4ff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: #e0e7ff;
}

.view-btn.active {
    background-color: #1a3a8f;
    color: white;
    border-color: #1a3a8f;
}

.calendar-instructions {
    margin-top: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.calendar-instructions h3 {
    color: #1a3a8f;
    margin-top: 0;
}

.calendar-instructions ul {
    padding-left: 20px;
}

.calendar-instructions li {
    margin-bottom: 10px;
    color: #555;
}

.calendar-fallback {
    margin-top: 15px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.calendar-fallback a {
    color: #1a3a8f;
    font-weight: 600;
    text-decoration: none;
}

.calendar-fallback a:hover {
    text-decoration: underline;
}

.subscribe-section {
    text-align: center;
    padding: 30px;
    background: #f0f4ff;
    border-radius: 8px;
}

.btn {
    display: inline-block;
    background: #1a3a8f;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.btn:hover {
    background: #4e73df;
}

/* Footer */
footer {
    background: #1a3a8f;
    color: #ffffff;
    padding: 30px 0 15px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-right: 20px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #fff;
    margin-top: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.social-link:hover {
    color: #ccc;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .container {
        width: 90%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .intro h2 {
        font-size: 1.6rem;
    }
    
    .intro p {
        font-size: 1rem;
    }
    
    .event-card {
        max-width: 100%;
    }
    
    .highlights-container {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-section {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px 0;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .container {
        width: 92%;
        padding: 15px 0;
    }
    
    .calendar {
        width: 100%;
        margin: 15px auto;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .subscribe-section {
        padding: 20px 15px;
    }
    
    .gallery-section {
        padding: 10px 5px;
    }
    
    .gallery-carousel img,
    .video-thumbnail {
        max-width: 95%;
    }
}

/* Gallery Styles */
.gallery-section {
    padding: 40px 0;
    background-color: #f0f4ff;
    border-radius: 8px;
    margin-top: 50px;
    position: relative;
    z-index: 1;
    clear: both;
    overflow: hidden;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a3a8f;
}

.gallery-carousel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 20px;
}

.gallery-carousel a {
    width: calc(25% - 20px);
    min-width: 250px;
    max-width: 350px;
    height: auto;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-carousel a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-carousel a.active-thumbnail {
    border: 3px solid #1a3a8f;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.gallery-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 58, 143, 0.8);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 3px solid white;
    z-index: 2;
}

/* FancyBox customizations */
.fancybox__container {
    --fancybox-bg: rgba(24, 24, 27, 0.93);
}

/* Make sure the FancyBox images fit well on all screens */
.fancybox__content img {
    object-fit: contain;
    max-height: 90vh;
}

.fancybox-container {
    width: 100%;
    overflow: hidden;
    padding: 0 10px;
}

/* Improve mobile preview for FancyBox */
.gallery-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-carousel a:hover img {
    transform: scale(1.05);
}

/* Enhanced thumbnail styling */
.f-thumbs__slide__img {
    object-fit: cover;
    border-radius: 4px;
}

/* Improve FancyBox mobile experience */
.f-button--thumbs {
    background-color: rgba(26, 58, 143, 0.8) !important;
}

.f-thumbs {
    padding: 8px !important;
}

@media (max-width: 768px) {
    .gallery-carousel a {
        width: calc(50% - 15px);
        min-width: 220px;
        max-width: none;
        margin-bottom: 20px;
    }
    
    .calendar-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-carousel a {
        width: calc(100% - 30px);
        aspect-ratio: 4/3;
        min-width: 0;
        margin-bottom: 30px;
        max-height: 350px;
    }
    
    .gallery-section {
        padding: 30px 15px;
    }
    
    .gallery-carousel {
        gap: 30px;
    }
}