/* Custom styles for MondayGIF */

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

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* GIF Gallery Hover Effects */
.gif-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.gif-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* FAQ Accordion Styles */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.show {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.faq-toggle i {
    transition: transform 0.3s ease;
}

.faq-toggle.active i {
    transform: rotate(180deg);
}

/* Button Hover Effects */
.btn-hover {
    position: relative;
    overflow: hidden;
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-hover:hover::before {
    left: 100%;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Navigation */
.mobile-menu {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-menu.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }
}

/* Language Selector Styling */
#languageSelector {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* GIF Download Button */
.download-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gif-container:hover .download-btn {
    opacity: 1;
}

/* Search Bar Styling */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 6px 16px;
    margin: 4px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-pill:hover {
    background: #8b5cf6;
    color: white;
}

.category-pill.active {
    background: #8b5cf6;
    color: white;
}

/* Blog Card Styling */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Social Media Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #374151;
    color: white;
    border-radius: 50%;
    margin: 0 8px;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #8b5cf6;
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
    .gif-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gif-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Optimized Grid Container */
.grid-container {
    width: 100%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive Grid Columns */
.grid-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* Responsive adjustments */
@media (min-width: 1024px) {
    .grid-container {
        gap: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .grid-container {
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .grid-container {
        gap: 8px;
    }
}

/* Optimized GIF Container */
.gif-container {
    width: 251px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Smooth image loading */
.gif-item {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gif-item.loaded {
    opacity: 1;
}

/* Lazy loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}