/* ============================================
   CAN 2025 SECTION STYLES
   ============================================ */

.can2025-section {
    padding: 80px 0;
    background: var(--light-color, #f5f7fa);
    position: relative;
    overflow: hidden;
}

.can2025-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.can2025-left {
    position: relative;
    z-index: 2;
}

.can2025-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 63, 233, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    margin-bottom: 20px;
}

.can2025-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color, #253fe9);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.can2025-pill-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color, #253fe9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.can2025-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-color, #333);
}

.can2025-title span {
    color: var(--primary-color, #253fe9);
    font-weight: 800;
}

.can2025-subtitle {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.can2025-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.can2025-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #333);
}

.can2025-badge i {
    color: var(--primary-color, #253fe9);
    font-size: 16px;
}

.can2025-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color, #253fe9);
    color: white;
    padding: 18px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.can2025-cta:hover {
    background: var(--secondary-color, #1a2bb8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 63, 233, 0.4);
    color: white;
}

.can2025-footer {
    font-size: 14px;
    color: #666;
    margin-top: 20px;
}

/* ============================================
   NEW CAN 2025 GALLERY - MODERN CAROUSEL
   ============================================ */

.can2025-gallery-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(37, 63, 233, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.can2025-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 10px;
    animation: gallery-float 15s ease-in-out infinite;
}

.can2025-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card, #1e2838);
}

.can2025-gallery-item:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    animation-delay: 0s;
}

.can2025-gallery-item:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    animation-delay: 0.2s;
}

.can2025-gallery-item:nth-child(3) {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    animation-delay: 0.4s;
}

.can2025-gallery-item:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    animation-delay: 0.6s;
}

.can2025-gallery-item:nth-child(5) {
    grid-column: 2 / 4;
    grid-row: 2 / 4;
    animation-delay: 0.8s;
}

.can2025-gallery-item:nth-child(6) {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    animation-delay: 1s;
}

.can2025-gallery-item:nth-child(7) {
    grid-column: 3 / 4;
    grid-row: 2 / 4;
    animation-delay: 1.2s;
}

.can2025-gallery-item:nth-child(8) {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    animation-delay: 1.4s;
}

.can2025-gallery-item:nth-child(9) {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
    animation-delay: 1.6s;
}

.can2025-gallery-item:nth-child(10) {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    animation-delay: 1.8s;
}

.can2025-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, opacity 0.8s ease-in-out, filter 0.3s ease;
    opacity: 1;
    will-change: opacity, transform;
    filter: brightness(1) saturate(1);
}

/* Subtle pulse effect when image changes */
.can2025-gallery-item img.image-changing {
    animation: image-change-pulse 1s ease-in-out;
}

@keyframes image-change-pulse {
    0% {
        filter: brightness(1) saturate(1) scale(1);
    }
    50% {
        filter: brightness(1.1) saturate(1.2) scale(1.02);
    }
    100% {
        filter: brightness(1) saturate(1) scale(1);
    }
}

.can2025-gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

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

/* Animation for gallery - smooth floating effect */
@keyframes gallery-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.01);
    }
    50% {
        transform: translateY(0px) scale(1);
    }
    75% {
        transform: translateY(10px) scale(1.01);
    }
}

/* Individual item animations */
@keyframes item-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.can2025-gallery-item:nth-child(odd) {
    animation: item-float 3s ease-in-out infinite;
}

.can2025-gallery-item:nth-child(even) {
    animation: item-float 3s ease-in-out infinite reverse;
}

/* Fade in animation for items on load */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.can2025-gallery-item {
    animation: fade-in-up 0.8s ease-out backwards, item-float 3s ease-in-out 1s infinite;
}

.can2025-gallery-item:nth-child(1) { 
    animation: fade-in-up 0.8s ease-out 0.1s backwards, item-float 3s ease-in-out 1.1s infinite;
}
.can2025-gallery-item:nth-child(2) { 
    animation: fade-in-up 0.8s ease-out 0.2s backwards, item-float 3s ease-in-out 1.2s infinite reverse;
}
.can2025-gallery-item:nth-child(3) { 
    animation: fade-in-up 0.8s ease-out 0.3s backwards, item-float 3s ease-in-out 1.3s infinite;
}
.can2025-gallery-item:nth-child(4) { 
    animation: fade-in-up 0.8s ease-out 0.4s backwards, item-float 3s ease-in-out 1.4s infinite reverse;
}
.can2025-gallery-item:nth-child(5) { 
    animation: fade-in-up 0.8s ease-out 0.5s backwards, item-float 3s ease-in-out 1.5s infinite;
}
.can2025-gallery-item:nth-child(6) { 
    animation: fade-in-up 0.8s ease-out 0.6s backwards, item-float 3s ease-in-out 1.6s infinite reverse;
}
.can2025-gallery-item:nth-child(7) { 
    animation: fade-in-up 0.8s ease-out 0.7s backwards, item-float 3s ease-in-out 1.7s infinite;
}
.can2025-gallery-item:nth-child(8) { 
    animation: fade-in-up 0.8s ease-out 0.8s backwards, item-float 3s ease-in-out 1.8s infinite reverse;
}
.can2025-gallery-item:nth-child(9) { 
    animation: fade-in-up 0.8s ease-out 0.9s backwards, item-float 3s ease-in-out 1.9s infinite;
}
.can2025-gallery-item:nth-child(10) { 
    animation: fade-in-up 0.8s ease-out 1s backwards, item-float 3s ease-in-out 2s infinite reverse;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FRIENDLY
   ============================================ */

@media (max-width: 968px) {
    .can2025-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .can2025-title {
        font-size: 36px;
    }
    
    .can2025-gallery-wrapper {
        height: 450px;
        border-radius: 15px;
    }
    
    .can2025-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 8px;
        padding: 8px;
        /* Reduce animation intensity on tablet */
        animation: gallery-float 20s ease-in-out infinite;
    }
    
    /* Simplify grid layout for tablet */
    .can2025-gallery-item:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
    
    .can2025-gallery-item:nth-child(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    
    .can2025-gallery-item:nth-child(3) {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
    
    .can2025-gallery-item:nth-child(4) {
        grid-column: 2 / 3;
        grid-row: 2 / 4;
    }
    
    .can2025-gallery-item:nth-child(5) {
        grid-column: 1 / 3;
        grid-row: 4 / 5;
    }
    
    .can2025-gallery-item:nth-child(6) {
        grid-column: 1 / 2;
        grid-row: 5 / 6;
    }
    
    .can2025-gallery-item:nth-child(7) {
        grid-column: 2 / 3;
        grid-row: 4 / 6;
    }
    
    .can2025-gallery-item:nth-child(8) {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }
    
    .can2025-gallery-item:nth-child(9) {
        grid-column: 1 / 3;
        grid-row: 5 / 6;
    }
    
    .can2025-gallery-item:nth-child(10) {
        grid-column: 2 / 3;
        grid-row: 5 / 6;
    }
    
    /* Reduce floating animation on tablet */
    .can2025-gallery-item {
        animation: fade-in-up 0.8s ease-out backwards, item-float 4s ease-in-out 1s infinite;
    }
}

@media (max-width: 768px) {
    .can2025-section {
        padding: 60px 0;
    }
    
    .can2025-gallery-wrapper {
        height: 400px;
        border-radius: 12px;
    }
    
    .can2025-gallery {
        gap: 6px;
        padding: 6px;
        /* Slower animation for better mobile performance */
        animation: gallery-float 25s ease-in-out infinite;
    }
    
    /* Disable hover effects on touch devices */
    .can2025-gallery-item:hover {
        transform: none;
    }
    
    .can2025-gallery-item:hover img {
        transform: none;
    }
}

@media (max-width: 576px) {
    .can2025-section {
        padding: 50px 0;
    }
    
    .can2025-title {
        font-size: 28px;
    }
    
    .can2025-subtitle {
        font-size: 16px;
    }
    
    .can2025-badges {
        flex-direction: column;
    }
    
    .can2025-cta {
        width: 100%;
        justify-content: center;
    }
    
    .can2025-gallery-wrapper {
        height: 350px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
    
    .can2025-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 5px;
        padding: 5px;
        /* Minimal animation for mobile performance */
        animation: none;
    }
    
    .can2025-gallery-item {
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        /* Simplified animation - only fade in, no floating */
        animation: fade-in-up 0.6s ease-out backwards;
    }
    
    /* Remove individual floating animations on mobile */
    .can2025-gallery-item:nth-child(odd),
    .can2025-gallery-item:nth-child(even) {
        animation: fade-in-up 0.6s ease-out backwards;
    }
    
    /* Stagger fade-in delays */
    .can2025-gallery-item:nth-child(1) { animation-delay: 0.1s; }
    .can2025-gallery-item:nth-child(2) { animation-delay: 0.15s; }
    .can2025-gallery-item:nth-child(3) { animation-delay: 0.2s; }
    .can2025-gallery-item:nth-child(4) { animation-delay: 0.25s; }
    .can2025-gallery-item:nth-child(5) { animation-delay: 0.3s; }
    .can2025-gallery-item:nth-child(6) { animation-delay: 0.35s; }
    .can2025-gallery-item:nth-child(7) { animation-delay: 0.4s; }
    .can2025-gallery-item:nth-child(8) { animation-delay: 0.45s; }
    .can2025-gallery-item:nth-child(9) { animation-delay: 0.5s; }
    .can2025-gallery-item:nth-child(10) { animation-delay: 0.55s; }
}

@media (max-width: 480px) {
    .can2025-gallery-wrapper {
        height: 320px;
        border-radius: 8px;
    }
    
    .can2025-gallery {
        gap: 4px;
        padding: 4px;
    }
    
    .can2025-gallery-item {
        border-radius: 6px;
    }
}

@media (max-width: 400px) {
    .can2025-section {
        padding: 40px 0;
    }
    
    .can2025-title {
        font-size: 24px;
    }
    
    .can2025-gallery-wrapper {
        height: 280px;
    }
    
    .can2025-gallery {
        gap: 3px;
        padding: 3px;
    }
    
    .can2025-gallery-item {
        border-radius: 5px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Performance optimization for mobile */
@media (max-width: 768px) {
    /* Reduce will-change usage on mobile */
    .can2025-gallery-item {
        will-change: auto;
    }
    
    /* Optimize image rendering */
    .can2025-gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .can2025-gallery-item:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    
    .can2025-gallery-item:hover img {
        transform: none;
    }
    
    /* Add active state for touch feedback */
    .can2025-gallery-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .can2025-gallery-wrapper {
        height: 300px;
    }
    
    .can2025-gallery {
        grid-template-rows: repeat(4, 1fr);
    }
}
