/* Custom Styles for Nông Sản Đà Lạt */

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/* Hero Slide Transitions */
.hero-slide {
    transition: opacity 1s ease-in-out;
}

/* Product Card Hover Effects */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
}

/* Ensure product cards have equal height in grids */
.grid.items-stretch .product-card {
    height: 100%;
}

/* Ripple Effect for Buttons */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2c8b43;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e6b32;
}

/* Loading Animation for Images */
img {
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"] {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

img[loading="eager"] {
    opacity: 1;
}

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

/* Image Object Fit Fallback */
img {
    object-fit: cover;
    object-position: center;
}

/* Countdown Timer Pulse Animation */
#countdown > div > div {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Mobile Sticky Button Animation */
@media (max-width: 768px) {
    .fixed.bottom-0 {
        animation: slideUp 0.3s ease-out;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Focus States for Accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #d02027;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer,
    .fixed {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-green-light,
    .bg-green-medium {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Partners Slider Styles */
.partners-slider {
    animation: slidePartners 30s linear infinite;
    will-change: transform;
    display: flex;
    width: max-content;
}

.partners-slider:hover {
    animation-play-state: paused;
}

@keyframes slidePartners {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Partners Slider Container with fade effect */
.partners-container {
    position: relative;
}

.partners-container::before,
.partners-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 10;
    pointer-events: none;
}

.partners-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 248, 240, 1), rgba(255, 248, 240, 0));
}

.partners-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 248, 240, 1), rgba(255, 248, 240, 0));
}

/* Partners Slider Container */
#partnersSlider {
    display: flex;
    width: max-content;
}

/* Footer Styles */
footer {
    position: relative;
    background-color: #2c8b43;
    background-image: 
        url('https://dautaydalat.vn/wp-content/uploads/2025/07/Layer-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        rgba(44, 139, 67, 0.85);
    pointer-events: none;
    z-index: 0;
}

footer > * {
    position: relative;
    z-index: 1;
}

footer iframe {
    border-radius: 0.5rem;
}
