:where([class^="ri-"])::before { content: "\f3c2"; }
body {
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
}

/* Inventory Cards Enhancement */
.inventory-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.inventory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Inventory Grid Layout - Smart Centering */
#inventory-grid {
    display: grid;
    gap: 2rem;
    justify-content: center;
    align-items: start;
}

/* Mobile and Tablet Layout (tetap responsive) */
@media (max-width: 767px) {
    #inventory-grid {
        grid-template-columns: 1fr !important;
        max-width: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #inventory-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 800px !important;
        margin: 0 auto !important;
    }
}

/* Desktop Layout Rules - Smart Positioning */
@media (min-width: 1024px) {
    /* Default 3 columns for desktop */
    #inventory-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* 1 item - center it */
    #inventory-grid[data-count="1"] {
        grid-template-columns: 1fr;
        max-width: 400px;
        justify-items: center;
    }
    
    /* 2 items - center them */
    #inventory-grid[data-count="2"] {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        justify-items: center;
    }
    
    /* 3 items - perfect fit */
    #inventory-grid[data-count="3"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
    
    /* 4 items - 3 on top, 1 centered below */
    #inventory-grid[data-count="4"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
    
    #inventory-grid[data-count="4"] .inventory-item:nth-child(4) {
        grid-column: 2 / 3;
        justify-self: center;
    }
    
    /* 5 items - 3 on top, 2 centered below */
    #inventory-grid[data-count="5"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
    
    #inventory-grid[data-count="5"] .inventory-item:nth-child(4) {
        grid-column: 1 / 2;
        justify-self: end;
        margin-right: 1rem;
    }
    
    #inventory-grid[data-count="5"] .inventory-item:nth-child(5) {
        grid-column: 3 / 4;
        justify-self: start;
        margin-left: 1rem;
    }
    
    /* 6 items - perfect 2 rows of 3 */
    #inventory-grid[data-count="6"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Buttons */
.category-btn {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.category-btn.active {
    background-color: #c8102e !important;
    color: white !important;
    border-color: #c8102e !important;
}

/* Search Box Enhancement */
.search-box {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.search-box:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.hero-section {
    background-image: linear-gradient(to right, rgba(12, 35, 64, 0.9), rgba(12, 35, 64, 0.7)), url('../images/header_depan.jpg');
    background-size: cover;
    background-position: center top 30px;
}        
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #c8102e;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.incremental-number {
    transition: all 0.5s ease-in-out;
}
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.timeline-line {
    display: none; /* COMPLETELY HIDDEN: Garis timeline sepenuhnya dihilangkan */
    /* position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: transparent;
    background-color: #e5e7eb; */
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 4px solid #f9fafb;
    background-color: #c8102e;
}
.testimonial-card {
    transition: transform 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-5px);
}
#back-to-top {
    transition: all 0.3s ease;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#back-to-top:hover {
    transform: translateY(-3px);
}
.company-stats {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.company-stats.show {
    opacity: 1;
    transform: translateY(0);
}
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-height: 200px;
    overflow-y: auto;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* ============================== */
/* MOBILE MENU ANIMATIONS */
/* ============================== */

#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}
#mobile-menu:not(.hidden) {
    max-height: 400px;
}

/* ============================== */
/* BUTTON STYLES */
/* ============================== */

.rounded-button {
    border-radius: 0.75rem !important;
}

/* ============================== */
/* RESPONSIVE TWEAKS */
/* ============================== */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    .hero-section p {
        font-size: 1.1rem;
    }
    .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .flex.flex-col.sm\\:flex-row {
        flex-direction: column;
        gap: 1rem;
    }
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================== */
/* SCROLLBAR STYLING */
/* ============================== */

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c8102e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a01e28;
}

/* ============================== */
/* LOADING ANIMATIONS */
/* ============================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================== */
/* FORM ENHANCEMENTS */
/* ============================== */

.form-group {
    position: relative;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-20px) scale(0.8);
    color: #c8102e;
}
.form-group label {
    position: absolute;
    top: 12px;
    left: 12px;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* ============================== */
/* ACCESSIBILITY IMPROVEMENTS */
/* ============================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators - FIXED */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #c8102e;
    outline-offset: 2px;
}

/* Newsletter input - no focus outline in light mode */
input[type="email"][placeholder="Your email address"]:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Mobile menu button override focus - STRONGEST SELECTOR */
button#mobile-menu-button:focus,
button#mobile-menu-button:focus-visible,
button#mobile-menu-button:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background-color: transparent !important;
}

/* Remove focus untuk element yang tidak memerlukan - FIXED KOTAK MERAH */
#theme-toggle-desktop:focus,
#theme-toggle-mobile:focus,
.navbar button:focus,
.mobile-menu-button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove default focus untuk navigation links - FIXED KOTAK MENU HEADER */
nav a:focus,
.nav-link:focus,
nav a[href]:focus {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Remove default focus untuk footer links - FIXED KOTAK QUICK LINKS */
footer a:focus {
    outline: none !important;
    text-decoration: underline !important;
}

/* ============================== */
/* MOBILE MENU STYLING */
/* ============================== */

/* Mobile menu button focus fix */
#mobile-menu-button:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background-color: transparent !important;
}

/* Mobile menu button styling */
#mobile-menu-button {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
#mobile-menu-button:hover {
    background-color: transparent !important;
    opacity: 0.8 !important;
    transition: opacity 0.3s ease !important;
}

/* Mobile menu links focus fix */
#mobile-menu a:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

/* Mobile menu container styling */
#mobile-menu {
    border: none !important;
    outline: none !important;
}

/* ============================== */
/* NEWSLETTER INPUT LIGHT MODE */
/* ============================== */

/* Newsletter input styling for light mode */
input[type="email"][placeholder="Your email address"] {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    border: none !important;
    outline: none !important;
    border-radius: 0.5rem 0 0 0.5rem !important;
}
input[type="email"][placeholder="Your email address"]::placeholder {
    color: #6b7280 !important;
}

/* Newsletter subscribe button light mode */
.flex input[type="email"] + button {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
}
.flex input[type="email"] + button:hover {
    background-color: #b91c1c !important;
}

/* Override Tailwind form-input class for newsletter specifically */
input[type="email"][placeholder="Your email address"].form-input,
input[type="email"][placeholder="Your email address"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    --tw-ring-shadow: none !important;
    border-color: transparent !important;
    --tw-border-style: none !important;
}
input[type="email"][placeholder="Your email address"].form-input:focus,
input[type="email"][placeholder="Your email address"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    --tw-ring-shadow: none !important;
    border-color: transparent !important;
    --tw-border-style: none !important;
}

/* Strong override untuk semua kemungkinan selector newsletter */
form input[type="email"][placeholder="Your email address"],
.flex input[type="email"][placeholder="Your email address"],
div input[type="email"][placeholder="Your email address"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
form input[type="email"][placeholder="Your email address"]:focus,
.flex input[type="email"][placeholder="Your email address"]:focus,
div input[type="email"][placeholder="Your email address"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ============================== */
/* CONTACT FORM STYLING */
/* ============================== */

/* Contact form inputs - remove all borders */
#contactForm input,
#contactForm textarea,
#contactForm select {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: #f9fafb !important;
    color: #374151 !important;
}
#contactForm input:focus,
#contactForm textarea:focus,
#contactForm select:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: #f3f4f6 !important;
}
#contactForm input::placeholder,
#contactForm textarea::placeholder {
    color: #9ca3af !important;
}

/* Contact form labels */
#contactForm label {
    color: #374151 !important;
    font-weight: 500 !important;
}

/* ============================== */
/* PRINT STYLES */
/* ============================== */

@media print {
    .no-print {
        display: none !important;
    }
    .hero-section {
        background: none !important;
        color: black !important;
    }
    a {
        text-decoration: underline;
    }
}

/* ============================== */
/* DARK MODE STYLES */
/* ============================== */

/* Dark Mode - Judul Part dan Send Us Message */
.dark h1,
.dark h2,  
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
    color: #ffffff !important;
}

/* Dark Mode - Inventory card titles spesifik */
.dark .inventory-item h4 {
    color: #ffffff !important;
}

/* Dark Mode - Text primary override untuk semua elemen */
.dark .text-primary {
    color: #ffffff !important;
}

/* Dark Mode - Send Us a Message title spesifik */
.dark .text-red-500,
.dark #contactForm h3,
.dark #contact h3,
.dark section h3.text-red-500 {
    color: #ffffff !important;
}

/* Dark Mode - Send Us a Message dengan selector yang lebih kuat */
.dark #contact form h3,
.dark #contact .bg-white h3,
.dark form .text-2xl,
.dark .text-2xl.font-bold.text-primary {
    color: #ffffff !important;
}

/* Dark Mode - Selector paling kuat untuk Send Us a Message */
.dark h3:contains("Send Us a Message"),
.dark *[class*="text-2xl"]:contains("Send Us a Message") {
    color: #ffffff !important;
}

/* Dark Mode - Override Tailwind text-primary di semua konteks */
.dark .text-primary,
.dark .text-primary * {
    color: #ffffff !important;
}

/* Dark Mode - Tambahan selector untuk mengatasi resistensi CSS */
.dark section#contact h3.text-2xl.font-bold.text-primary {
    color: #ffffff !important;
}

.dark form#contactForm h3 {
    color: #ffffff !important;
}

/* Dark Mode - Universal override untuk semua h3 dengan text-primary */
.dark h3.text-primary {
    color: #ffffff !important;
}

/* Dark Mode - News Section */
.dark #news {
    background-color: #0f172a !important;
}

.dark #news .bg-white {
    background-color: #1e293b !important;
}

.dark #news article {
    background-color: #1e293b !important;
    border: 1px solid #374151 !important;
}

.dark #news h3 a {
    color: #ffffff !important;
}

.dark #news h3 a:hover {
    color: #60a5fa !important;
}

.dark #news .text-gray-700 {
    color: #d1d5db !important;
}

.dark #news .text-gray-900 {
    color: #ffffff !important;
}

.dark #news .border-gray-100 {
    border-color: #374151 !important;
}

/* Dark Mode - Footer link hover dengan line putih tipis */
.dark footer a {
    position: relative;
    transition: all 0.3s ease;
    color: #d1d5db;
}

.dark footer a:hover {
    color: #ffffff;
}

.dark footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.dark footer a:hover::after {
    width: 100%;
}

/* Dark Mode - Inventory card text colors */
.dark .inventory-item .text-gray-900 {
    color: #ffffff !important;
}

.dark .inventory-item .text-primary {
    color: #ffffff !important;
}

/* Dark Mode - Additional inventory card styling */
.dark .inventory-item h4.text-lg {
    color: #ffffff !important;
}

.dark .inventory-item p.text-primary {
    color: #ffffff !important;
}

/* Dark Mode - Footer styling improvements */
.dark footer a,
.dark footer ul li a,
.dark footer .text-gray-300 {
    position: relative !important;
    color: #d1d5db !important;
    transition: all 0.3s ease !important;
}

.dark footer a:hover,
.dark footer ul li a:hover {
    color: #ffffff !important;
}

/* Dark Mode - Footer link hover line - EXCLUDE social media icons */
.dark footer a:not(.w-10):not([class*="bg-white/10"]):not([class*="rounded-full"])::after,
.dark footer ul li a::after {
    content: '' !important;
    position: absolute !important;
    width: 0 !important;
    height: 1px !important;
    bottom: -2px !important;
    left: 0 !important;
    background-color: #ffffff !important;
    transition: width 0.3s ease !important;
}

.dark footer a:not(.w-10):not([class*="bg-white/10"]):not([class*="rounded-full"]):hover::after,
.dark footer ul li a:hover::after {
    width: 100% !important;
}
