/* Custom styles and overrides */

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

/* Geometric shape animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(15deg);
    }
    50% {
        transform: translateY(-20px) rotate(20deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 6s ease-in-out 3s infinite;
}

.animate-spin-slow {
    animation: spin 12s linear infinite;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll effect */
.navbar-scrolled {
    background-color: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

img:hover {
    transform: scale(1.05);
}

/* Custom selection color */
::selection {
    background-color: #34D399;
    color: #0F172A;
}

/* Button hover effects */
button, a {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
a:focus, button:focus {
    outline: 2px solid #34D399;
    outline-offset: 2px;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 300px;
}

/* Magazine layout adjustments */
.magazine-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .magazine-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .magazine-grid > :last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .magazine-grid {
        grid-template-columns: 1fr;
    }
    
    .magazine-grid > :last-child {
        grid-column: span 1;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
