/* Custom styles pentru carousel și animații */
.carousel-item { 
    display: none; 
}

.carousel-item.active { 
    display: block; 
}

.card-hover { 
    transition: transform 0.3s ease; 
}

.card-hover:hover { 
    transform: translateY(-8px); 
}

/* Live search results styling */
#search-results, #mobile-search-results {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#search-results a:hover, #mobile-search-results a:hover {
    background-color: rgba(55, 65, 81, 0.8);
}

/* Smooth scrollbar for search results */
#search-results::-webkit-scrollbar, #mobile-search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track, #mobile-search-results::-webkit-scrollbar-track {
    background: #1f2937;
}

#search-results::-webkit-scrollbar-thumb, #mobile-search-results::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover, #mobile-search-results::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Custom scrollbar pentru întreaga pagină */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #dc2626, #991b1b);
    border-radius: 6px;
    border: 2px solid #1f2937;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* Scroll to top button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

#scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

#scroll-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimizare pentru imagini */
img {
    content-visibility: auto;
}

.carousel-item { 
    display: none; 
}

.carousel-item.active { 
    display: block; 
}

.card-hover { 
    transition: transform 0.3s ease; 
}

.card-hover:hover { 
    transform: translateY(-8px); 
}

/* Live search results styling */
#search-results, #mobile-search-results {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#search-results a:hover, #mobile-search-results a:hover {
    background-color: rgba(55, 65, 81, 0.8);
}

/* Smooth scrollbar for search results */
#search-results::-webkit-scrollbar, #mobile-search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track, #mobile-search-results::-webkit-scrollbar-track {
    background: #1f2937;
}

#search-results::-webkit-scrollbar-thumb, #mobile-search-results::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover, #mobile-search-results::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Custom scrollbar pentru întreaga pagină */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #dc2626, #991b1b);
    border-radius: 6px;
    border: 2px solid #1f2937;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* Scroll to top button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

#scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

#scroll-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimizare pentru imagini */
img {
    content-visibility: auto;
}

/* Loading spinner */
.spinner {
    border: 3px solid #374151;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Ads */
.ad-responsive {
    display: inline-block;
    max-width: 100%;
}

.ad-responsive img,
.ad-responsive iframe,
.ad-responsive video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Mobile adjustments for ads */
@media (max-width: 640px) {
    .ad-container {
        transform: scale(0.85);
        transform-origin: center;
    }
    
    .ad-responsive {
        font-size: 0.85em;
        max-width: 280px !important;
    }
    
    .ad-responsive img,
    .ad-responsive iframe {
        max-width: 280px !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .ad-container {
        transform: scale(0.75);
    }
    
    .ad-responsive {
        font-size: 0.8em;
        max-width: 250px !important;
    }
    
    .ad-responsive img,
    .ad-responsive iframe {
        max-width: 250px !important;
        width: 100% !important;
    }
}

@media (max-width: 380px) {
    .ad-responsive {
        max-width: 220px !important;
    }
    
    .ad-responsive img,
    .ad-responsive iframe {
        max-width: 220px !important;
        width: 100% !important;
    }
}
