/* Scroll Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-animate {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animated {
    opacity: 1;
}

.scroll-fade-up {
    transform: translateY(30px);
}

.scroll-fade-up.animated {
    transform: translateY(0);
}

.scroll-fade-in {
    /* Already has opacity: 0 from .scroll-animate - no additional transform needed */
    transform: none;
}

.scroll-fade-in.animated {
    /* Already has opacity: 1 from .scroll-animate - no additional transform needed */
    transform: none;
}

.scroll-slide-left {
    transform: translateX(-30px);
}

.scroll-slide-left.animated {
    transform: translateX(0);
}

.scroll-slide-right {
    transform: translateX(30px);
}

.scroll-slide-right.animated {
    transform: translateX(0);
}

.scroll-scale {
    transform: scale(0.9);
}

.scroll-scale.animated {
    transform: scale(1);
}

/* Custom Card Flip Styles */
.card-flip { 
    perspective: 1000px; 
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-inner { 
    transform: rotateY(180deg); 
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
}

.card-back { 
    transform: rotateY(180deg); 
}

/* Custom scrollbar */
.menu-scroll::-webkit-scrollbar { 
    height: 6px; 
}

.menu-scroll::-webkit-scrollbar-track { 
    background: #f1f1f1; 
}

.menu-scroll::-webkit-scrollbar-thumb { 
    background: #4D96FF; 
    border-radius: 10px; 
}

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

/* Location Cards Spacing */
.location-card {
    margin-bottom: 1rem !important;
}

/* About Section Specifics */
.about-tab {
    transition: all 0.3s ease;
}
.about-tab.active {
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(10px);
    border-left: 4px solid #4D96FF;
}

/* Reviews Scroll Snap */
.reviews-scroll {
    scroll-snap-type: x mandatory;
}
.review-card {
    scroll-snap-align: start;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Dynamic Image Link Styles */
.dyn-img-link-wrapper-di-script {
    anchor-scope: all;
    display: contents;
    position: relative;
    z-index: 1;
}

.dyn-img-link-wrapper-di-script img {
    anchor-name: --photo;
    display: block;
    max-width: 100%;
}

.dyn-img-link-di-script {
    z-index: 999999;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    color: white;
    height: clamp(13px, calc(max(anchor-size(width), anchor-size(height)) * 0.3), 21px);
    width: clamp(13px, calc(max(anchor-size(width), anchor-size(height)) * 0.3), 21px);
    padding: 4px;
    position: absolute;
    bottom: anchor(bottom);
    left: anchor(left);
    margin-left: 10px;
    margin-bottom: 10px;
    transition: background-color 0.2s ease-in-out;
}

.dyn-img-link-di-script:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.dyn-img-link-di-script span {
    font-size: 14px;
    vertical-align: top;
}

.dyn-img-attribution-button-di-script {
    z-index: 999999;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    color: white;
    width: clamp(13px, calc(max(anchor-size(width), anchor-size(height)) * 0.3), 21px);
    height: clamp(13px, calc(max(anchor-size(width), anchor-size(height)) * 0.3), 21px);
    padding: 4px;
    position: absolute;
    position-anchor: --photo;
    top: anchor(top);
    right: anchor(right);
    margin-top: 10px;
    margin-right: 10px;
    transition: background-color 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dyn-img-attribution-button-di-script:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.dyn-img-attribution-button-di-script span {
    font-size: 14px;
    vertical-align: top;
}

.dyn-img-inline-attribution-di-script {
    z-index: 999999;
    font-size: 12px;
    padding: 4px;
    display: none;
    position: absolute;
    position-anchor: --photo;
    bottom: anchor(bottom);
    right: anchor(right);
    margin-bottom: 8px;
    margin-right: 8px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    white-space: nowrap;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    color: white;
}

/* Club Card Styles */
.club-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.club-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 5px 10px -5px rgba(0, 0, 0, 0.04);
    background: linear-gradient(to right, #ffffff, #f9fafb);
}
.filter-btn {
    transition: all 0.3s ease;
}
.filter-btn.active {
    background-color: #4D96FF;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(77, 150, 255, 0.4);
}

/* Dynamic Gradient Animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient-delayed {
    0%, 100% {
        background-position: 100% 50%;
        opacity: 0.3;
    }
    50% {
        background-position: 0% 50%;
        opacity: 0.5;
    }
}

.animate-gradient-delayed {
    background-size: 200% 200%;
    animation: gradient-delayed 20s ease infinite;
}

/* Scroll Navigation Styles */
#scroll-nav {
    transition: opacity 0.3s ease;
}

#scroll-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Mobile: Hide navigation partially off-screen */
@media (max-width: 1023px) {
    #scroll-nav {
        right: -35px !important;
        transform: translateY(-50%);
    }
    
    #scroll-nav .flex {
        opacity: 0.7;
        transform: scale(0.85);
    }
    
    /* Hide tooltips on mobile */
    .scroll-nav-item span {
        display: none;
    }
}

.scroll-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-nav-item.active > div {
    background-color: #4D96FF !important;
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(77, 150, 255, 0.5);
}

.scroll-nav-item[data-section="programs"].active > div {
    background-color: #FF6B6B !important;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.scroll-nav-item[data-section="menu"].active > div,
.scroll-nav-item[data-section="clubs"].active > div {
    background-color: #6BCB77 !important;
    box-shadow: 0 0 10px rgba(107, 203, 119, 0.5);
}

.scroll-nav-item[data-section="lyceum"].active > div,
.scroll-nav-item[data-section="locations"].active > div {
    background-color: #9B5DE5 !important;
    box-shadow: 0 0 10px rgba(155, 93, 229, 0.5);
}

.scroll-nav-item[data-section="reviews"].active > div {
    background-color: #FFD93D !important;
    box-shadow: 0 0 10px rgba(255, 217, 61, 0.5);
}

.scroll-nav-item span {
    transition: all 0.3s ease;
}

.scroll-nav-item:hover span {
    opacity: 1 !important;
}

/* Memory Game Styles */
.memory-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}
.memory-card.flip {
    transform: rotateY(180deg);
}
.memory-front, .memory-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.memory-front {
    background: white;
    transform: rotateY(180deg);
    font-size: 32px;
    color: #4D96FF;
}
.memory-back {
    background: linear-gradient(135deg, #FF6B6B, #FFD93D);
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Drawing Canvas Styles */
.drawing-tool {
    transition: all 0.2s ease;
    cursor: pointer;
}

.drawing-tool.active {
    transform: scale(1.2);
    border-color: #333 !important;
    box-shadow: 0 0 0 3px rgba(155, 93, 229, 0.3);
}

#custom-color-picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

#custom-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 0.5rem;
}

#custom-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 0.5rem;
}

#custom-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 0.5rem;
}

#drawing-canvas {
    touch-action: none;
    cursor: crosshair;
    background: #ffffff;
}

.drawing-polaroid {
    transition: transform 0.3s;
}

.drawing-polaroid:hover {
    transform: scale(1.05) rotate(1deg);
    z-index: 10;
}

/* Custom Range Slider Styles */
.slider-custom {
    height: 8px;
}

.slider-custom::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9B5DE5, #7C3AED);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(155, 93, 229, 0.4);
    border: 2px solid white;
    transition: all 0.2s ease;
    margin-top: -6px;
}

.slider-custom::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(155, 93, 229, 0.6);
}

.slider-custom::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

.slider-custom::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9B5DE5, #7C3AED);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(155, 93, 229, 0.4);
    border: 2px solid white;
    transition: all 0.2s ease;
    margin-top: -6px;
}

.slider-custom::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(155, 93, 229, 0.6);
}

.slider-custom::-moz-range-thumb:active {
    transform: scale(0.95);
}

.slider-custom::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, rgba(155, 93, 229, 0.2), rgba(155, 93, 229, 0.4));
}

.slider-custom::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, rgba(155, 93, 229, 0.2), rgba(155, 93, 229, 0.4));
    border: none;
}

/* Swiper Custom Styles */
.swiper {
    padding-bottom: 40px;
}

.swiper-pagination-bullet {
    background: #9333ea;
    opacity: 0.3;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #9333ea;
}

.reviews-swiper .swiper-slide {
    height: auto;
}

.drawings-swiper .swiper-slide {
    height: auto;
}

