/**
 * Homepage Complete Styles
 * Replaces Tailwind CSS with custom implementation
 * 
 * @package Milestrong
 * @version 2.0.0
 */

/* ============================================
   1. RESET & BASE STYLES
   ============================================ */

/* Ensure box-sizing for all elements */
.banner-section *,
.products-section *,
.markets-section *,
.news-section *,
.about-section *,
.contact-section * {
    box-sizing: border-box;
}

/* ============================================
   2. UTILITY CLASSES (Tailwind-like)
   ============================================ */

/* Layout */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Width & Height */
.w-full { width: 100%; }
.w-20 { width: 5rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-full { height: 100%; }
.h-1 { height: 0.25rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-20 { height: 5rem; }
.h-64 { height: 16rem; }
.max-w-7xl { max-width: 80rem; }

/* Spacing - Padding */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

/* Spacing - Margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-2 { margin-right: 0.5rem; }

/* Text */
.text-center { text-align: center; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }

/* Colors */
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-900 { background-color: #111827; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-600 { background-color: #2563eb; }
.bg-black { background-color: #000000; }

/* Background Opacity */
.bg-opacity-0 { background-color: rgba(0, 0, 0, 0); }
.bg-opacity-20 { background-color: rgba(0, 0, 0, 0.2); }

/* Border */
.border-l-4 { border-left-width: 4px; }
.border-transparent { border-color: transparent; }
.rounded-lg { border-radius: 0.5rem; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Shadow */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Transitions */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.duration-700 { transition-duration: 700ms; }

/* Transform */
.transform { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Object Fit */
.object-cover { object-fit: cover; }

/* Background */
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }
.bg-no-repeat { background-repeat: no-repeat; }

/* Gradient */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-stops)); }
.from-gray-300 { --tw-gradient-from: #d1d5db; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(209, 213, 219, 0)); }
.to-gray-400 { --tw-gradient-to: #9ca3af; }
.from-black\/30 { --tw-gradient-from: rgba(0, 0, 0, 0.3); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0)); }
.to-transparent { --tw-gradient-to: transparent; }

/* Line Clamp */
.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;
}

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

/* Space Between */
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Gap */
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Grid Columns */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
/* ============================================
   3. BANNER SECTION - UPDATED
   ============================================ */

.banner-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #111827;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 400px;
}

.banner-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.7s ease-in-out;
    opacity: 0;
    z-index: 0;
}

.banner-slide.active {
    opacity: 1 !important;
    z-index: 10 !important;
}

/* CRITICAL: Ensure background images display */
.banner-slide > a,
.banner-slide > div {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-slide .bg-cover {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Banner Navigation Buttons */
.banner-prev,
.banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 3rem;
    height: 3rem;
}

.banner-prev:hover,
.banner-next:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.banner-prev {
    left: 1rem;
}

.banner-next {
    right: 1rem;
}

.banner-prev svg,
.banner-next svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.banner-prev:hover svg,
.banner-next:hover svg {
    transform: scale(1.1);
}

/* Banner Indicators */
.banner-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-indicator.active,
.banner-indicator.bg-white {
    background-color: white !important;
    width: 2rem !important;
}

.banner-indicator:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

/* Responsive Banner Heights */
@media (min-width: 768px) {
    .banner-slider {
        height: 600px;
    }
    
    .banner-prev,
    .banner-next {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .banner-prev {
        left: 2rem;
    }
    
    .banner-next {
        right: 2rem;
    }
    
    .banner-prev svg,
    .banner-next svg {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .banner-indicators {
        bottom: 2rem;
        gap: 0.75rem;
    }
    
    .banner-indicator {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .banner-indicator.active,
    .banner-indicator.bg-white {
        width: 2.5rem !important;
    }
}

@media (min-width: 1024px) {
    .banner-slider {
        height: 800px;
    }
}

/* Additional utility classes for banner */
.-translate-y-1\/2 {
    transform: translateY(-50%);
}

.-translate-x-1\/2 {
    transform: translateX(-50%);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.bg-white\/30 {
    background-color: rgba(255, 255, 255, 0.3);
}

.bg-white\/50 {
    background-color: rgba(255, 255, 255, 0.5);
}

.bg-white\/75 {
    background-color: rgba(255, 255, 255, 0.75);
}


/* ============================================
   4. PRODUCTS SECTION
   ============================================ */

.products-section {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: #f9fafb;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-item {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.5rem);
}

.product-image {
    position: relative;
    width: 100%;
    height: 16rem;
    overflow: hidden;
    background-color: #e5e7eb;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.1);
}

.product-image .absolute {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.product-item:hover .product-image .absolute {
    background-color: rgba(0, 0, 0, 0.2);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.product-item:hover .product-title {
    color: #2563eb;
}

.product-excerpt {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    display: flex;
    align-items: center;
    color: #2563eb;
    font-weight: 500;
    transition: color 0.3s ease;
}

.product-item:hover .product-link {
    color: #1d4ed8;
}

.product-link svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.product-item:hover .product-link svg {
    transform: translateX(0.5rem);
}

/* ============================================
   5. MARKETS SECTION
   ============================================ */

.markets-section {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: white;
}

.markets-content {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

.markets-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.markets-list > li + li {
    margin-top: 1rem;
}

.market-item {
    cursor: pointer;
}

.market-item-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.market-item:hover .market-item-inner {
    border-left-color: #2563eb;
    background-color: #eff6ff;
}

.market-item.active .market-item-inner {
    border-left-color: #2563eb;
    background-color: #eff6ff;
}

.market-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    transition: color 0.3s ease;
}

.market-item:hover .market-title,
.market-item.active .market-title {
    color: #2563eb;
    font-weight: 700;
}

.market-arrow {
    width: 1.5rem;
    height: 1.5rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.market-item:hover .market-arrow,
.market-item.active .market-arrow {
    color: #2563eb;
    transform: translateX(0.5rem);
}

.markets-bg-container {
    position: relative;
    width: 100%;
    height: 16rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.markets-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease-in-out;
}

/* ============================================
   6. NEWS SECTION
   ============================================ */

.news-section {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: #f9fafb;
}

/* ============================================
   7. ABOUT SECTION
   ============================================ */

.about-section {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: white;
}

/* ============================================
   8. CONTACT SECTION
   ============================================ */

.contact-section {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: #f9fafb;
}

/* ============================================
   9. RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    /* Banner */
    .banner-slider {
        height: 600px;
    }
    
    /* Utilities */
    .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
    .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:mb-16 { margin-bottom: 4rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\:h-72 { height: 18rem; }
    .md\:h-96 { height: 24rem; }
    .md\:w-7 { width: 1.75rem; }
    .md\:h-7 { height: 1.75rem; }
    .md\:gap-8 { gap: 2rem; }
    .md\:space-y-6 > * + * { margin-top: 1.5rem; }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .product-image {
        height: 18rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-excerpt {
        font-size: 1rem;
    }
    
    /* Markets */
    .market-title {
        font-size: 1.5rem;
    }
    
    .market-item-inner {
        padding: 1.5rem;
    }
    
    .markets-bg-container {
        height: 24rem;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    /* Banner */
    .banner-slider {
        height: 800px;
    }
    
    /* Utilities */
    .lg\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .lg\:text-5xl { font-size: 3rem; line-height: 1; }
    .lg\:h-80 { height: 20rem; }
    .lg\:h-\[600px\] { height: 600px; }
    .lg\:gap-12 { gap: 3rem; }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .product-image {
        height: 20rem;
    }
    
    /* Markets */
    .markets-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem;
    }
    
    .market-title {
        font-size: 1.875rem;
    }
    
    .markets-bg-container {
        height: 600px;
    }
    
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* ============================================
   10. HOVER STATES & INTERACTIONS
   ============================================ */

.group:hover .group-hover\:bg-opacity-20 {
    background-color: rgba(0, 0, 0, 0.2);
}

.group:hover .group-hover\:text-blue-600 {
    color: #2563eb;
}

.group:hover .group-hover\:text-blue-700 {
    color: #1d4ed8;
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:translate-x-2 {
    transform: translateX(0.5rem);
}

.hover\:border-blue-600:hover {
    border-color: #2563eb;
}

.hover\:bg-blue-50:hover {
    background-color: #eff6ff;
}

.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover\:-translate-y-2:hover {
    transform: translateY(-0.5rem);
}

/* ============================================
   11. SECTION TITLE STYLES
   ============================================ */

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 1rem;
}

.section-title .title-underline {
    width: 5rem;
    height: 0.25rem;
    background-color: #2563eb;
    margin: 1rem auto 0;
}

@media (min-width: 768px) {
    .section-title {
        margin-bottom: 4rem;
    }
    
    .section-title h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .section-title h2 {
        font-size: 3rem;
    }
}
