/* General Body and Font Styles */
body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    background-color: #121212;
    color: #E0E0E0;
}
/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}
/* Style for section titles with a green underline */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}
.section-title h2 {
    text-align: left;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 9999px;
}
/* Active state for navigation links */
.nav-link.active {
    color: #4CAF50;
    font-weight: 600;
}
/* Custom fade-in animation for initial load */
.initial-fade-in {
    animation: fadeIn 1.2s ease-out forwards;
    opacity: 0;
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
/* Glass effect card style */
.glass-card {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
/* Placeholder for product images */
.product-image-placeholder {
    background: linear-gradient(135deg, #1f2937, #374151);
}
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: #1a1a1a;
    color: #E0E0E0;
    border-radius: 1rem;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}
@media (min-width: 640px) {
    .modal-content {
        max-width: 600px;
    }
    #news-modal {
        max-width: 800px;
    }
}
/* Carousel specific styles */
.products-carousel-container {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}
.products-carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}
.product-card-item {
    scroll-snap-align: start;
    min-width: 280px;
}
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0.5rem;
    background-color: rgba(30, 41, 59, 0.6);
    border-radius: 9999px;
    transition: background-color 0.2s;
}
.carousel-button:hover {
    background-color: rgba(30, 41, 59, 0.8);
}
.carousel-button.left-arrow {
    left: 0rem;
}
.carousel-button.right-arrow {
    right: 0rem;
}
@media (min-width: 768px) {
    .carousel-button.left-arrow {
        left: -1rem;
    }
    .carousel-button.right-arrow {
        right: -1rem;
    }
}

/* Move carousel arrows closer to the carousel on larger screens */
@media (min-width: 1024px) {
    .carousel-button.left-arrow {
        left: -0.5rem;
    }
    .carousel-button.right-arrow {
        right: -0.5rem;
    }
}

/* Disabled state for carousel buttons */
.carousel-button:disabled {
    opacity: 0.75;
    filter: grayscale(60%);
    pointer-events: none;
    /* ensure SVG that uses currentColor turns grey */
    color: #9CA3AF; /* Tailwind gray-400 */
    /* slightly dim the background when disabled */
    background-color: rgba(30, 41, 59, 0.35);
    transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

/* Smooth fade/transform for product cards */
.product-card-item {
    transition: opacity 350ms ease, transform 450ms cubic-bezier(.2,.9,.3,1);
    opacity: 0.0;
    transform: translateY(8px) scale(0.992);
}
.product-card-item.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Ensure news image placeholders keep a 4:3 aspect ratio across browsers
   Tailwind's aspect utilities may not be available in some setups; this
   CSS provides a robust fallback using the padding-top trick. */
.news-image-placeholder {
    position: relative;
}
.news-image-placeholder::before {
    content: '';
    display: block;
    /* 4:3 ratio => height = 75% of width */
    padding-top: 75%;
}
.news-image-placeholder > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* If images are used inside placeholders, make sure they cover the area */
.news-image-placeholder img,
.news-content-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

