/* AMAX CNC Laser Solutions - Custom Styles */
/* Industrial Theme with Glassmorphism Effects */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d3748;
    --accent-color: #4299e1;
    --text-light: #f7fafc;
    --text-dark: #2d3748;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1a202c;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
    color: var(--text-light);
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dark .glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    transition: all 0.3s ease;
    color: #1a202c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dark .glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f7fafc;
    box-shadow: none;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(66, 153, 225, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.dark .glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* Industrial Button Styles */
.btn-industrial {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white !important;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-industrial:hover {
    background: linear-gradient(45deg, #3182ce, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
    color: white !important;
}

/* Secondary button styles for better light mode readability */
.glass-card.px-8 {
    color: #1a202c !important;
    font-weight: 600;
}

.dark .glass-card.px-8 {
    color: #f7fafc !important;
}

.glass-card.px-8:hover {
    color: #1a202c !important;
}

.dark .glass-card.px-8:hover {
    color: #f7fafc !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Hero video styles */
.hero-section video {
    z-index: 0;
}

/* Hero overlay styles for better visual depth */
.hero-section .bg-black\/60 {
    backdrop-filter: blur(1px);
    transition: opacity 0.3s ease;
}

/* Enhanced text contrast on hero section */
.hero-section h1,
.hero-section p,
.hero-section .btn-industrial {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .hero-section .glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Product Cards */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    color: #1a202c;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.dark .product-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f7fafc;
    box-shadow: none;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(66, 153, 225, 0.3);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dark .product-card:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Product card text elements */
.product-card h3 {
    color: #1a202c !important;
    font-weight: 700;
}

.dark .product-card h3 {
    color: #f7fafc !important;
}

.product-card p {
    color: #4a5568 !important;
}

.dark .product-card p {
    color: #cbd5e1 !important;
}

.product-card .text-gray-300 {
    color: #4a5568 !important;
}

.dark .product-card .text-gray-300 {
    color: #cbd5e1 !important;
}

/* List view specific enhancements */
.product-card.flex {
    min-height: 200px;
    align-items: stretch;
}

.product-card.flex > div:first-child {
    flex-shrink: 0;
}

.product-card.flex > div:last-child {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Power badge styling */
.product-card .bg-blue-500 {
    background-color: #4299e1 !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Category badge for list view */
.product-card .bg-gray-700 {
    background-color: rgba(45, 55, 72, 0.8) !important;
    backdrop-filter: blur(4px);
}

/* Animation for filtered products */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card[style*="animation"] {
    animation-fill-mode: both;
}

/* Responsive improvements for product cards */
@media (max-width: 768px) {
    .product-card.flex {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .product-card.flex > div:first-child {
        margin-bottom: 1rem;
    }

    .product-card.flex img {
        width: 100% !important;
        height: 12rem !important;
    }
}

/* Typography */
.heading-xl {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(45deg, #1a202c, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .heading-xl {
    background: linear-gradient(45deg, #ffffff, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.heading-lg {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c !important;
}

.dark .heading-lg {
    color: var(--text-light) !important;
}

/* Text color fixes for light mode */
.text-gray-300 {
    color: #4a5568 !important;
}

.dark .text-gray-300 {
    color: #cbd5e1 !important;
}

.text-gray-400 {
    color: #718096 !important;
}

.dark .text-gray-400 {
    color: #a0aec0 !important;
}

/* General text readability improvements */
p {
    color: #4a5568 !important;
}

.dark p {
    color: #cbd5e1 !important;
}

/* Specific text color overrides - text-white should always be white */
.text-white {
    color: #ffffff !important;
}

.dark .text-white {
    color: #ffffff !important;
}

/* Link readability */
a {
    color: #4299e1;
}

.dark a {
    color: #63b3ed;
}

/* Icon color fixes */
.fas, .far, .fab {
    color: inherit;
}

.heading-md {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
}

.dark .heading-md {
    color: var(--text-light);
}

/* Improved heading styles for better light mode readability */
.heading-xl {
    font-size: 3rem;
    font-weight: 700;
    color: #1a202c;
}

.dark .heading-xl {
    color: #f7fafc;
}

.heading-lg {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a202c;
}

.dark .heading-lg {
    color: #f7fafc;
}

/* Fix for grey text readability in light mode */
.text-gray-300 {
    color: #718096;
}

.dark .text-gray-300 {
    color: #cbd5e1;
}

/* Better contrast for light mode text */
.text-gray-700 {
    color: #2d3748 !important;
}

.text-gray-600 {
    color: #4a5568 !important;
}

.text-gray-900 {
    color: #1a202c !important;
}

.dark .text-gray-700 {
    color: #d1d5db !important;
}

.dark .text-gray-600 {
    color: #d1d5db !important;
}

.dark .text-gray-900 {
    color: #ffffff !important;
}

/* Brochure section specific text styling for better contrast */
section .text-gray-900 {
    color: #1a202c !important;
}

.dark section .text-gray-900 {
    color: #ffffff !important;
}

section .text-gray-700 {
    color: #2d3748 !important;
}

.dark section .text-gray-700 {
    color: #d1d5db !important;
}

section .text-gray-300 {
    color: #6b7280 !important;
}

.dark section .text-gray-300 {
    color: #d1d5db !important;
}

/* Form Styles */
.form-input {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #1a202c;
    width: 100%;
    transition: all 0.3s ease;
}

.dark .form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.08);
}

.dark .form-input:focus {
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.dark .form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Select dropdown specific styles */
.form-input select,
select.form-input {
    background: rgba(0, 0, 0, 0.05);
    color: #1a202c;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .form-input select,
.dark select.form-input {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-input option,
select.form-input option {
    background: #ffffff !important;
    color: #1a202c !important;
    padding: 8px 12px;
}

.dark .form-input option,
.dark select.form-input option {
    background: #2d3748 !important;
    color: #ffffff !important;
}

.form-input option:hover,
select.form-input option:hover,
.form-input option:checked,
select.form-input option:checked {
    background: #4299e1 !important;
    color: #ffffff !important;
}

/* Fix for dropdown arrow */
select.form-input {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Additional dropdown fixes for better visibility */
select.form-input:focus option {
    background: #2d3748 !important;
    color: #ffffff !important;
}

/* Modal specific dropdown fixes */
.modal select.form-input,
.modal .form-input select,
#quote-modal select.form-input,
#quote-modal .form-input select,
div[id*="modal"] select.form-input,
div[id*="modal"] .form-input select {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.modal select.form-input option,
.modal .form-input option,
#quote-modal select.form-input option,
#quote-modal .form-input option,
div[id*="modal"] select.form-input option,
div[id*="modal"] .form-input option {
    background: #1a202c !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 12px !important;
}

.modal select.form-input option:hover,
.modal .form-input option:hover,
#quote-modal select.form-input option:hover,
#quote-modal .form-input option:hover,
div[id*="modal"] select.form-input option:hover,
div[id*="modal"] .form-input option:hover {
    background: #4299e1 !important;
    color: #ffffff !important;
}

.modal select.form-input optgroup,
.modal .form-input optgroup,
#quote-modal select.form-input optgroup,
#quote-modal .form-input optgroup,
div[id*="modal"] select.form-input optgroup,
div[id*="modal"] .form-input optgroup {
    background: #2d3748 !important;
    color: #a0aec0 !important;
    font-weight: bold !important;
    padding: 8px 12px !important;
}

/* Force dropdown option visibility globally */
select option {
    background: #ffffff !important;
    color: #1a202c !important;
}

.dark select option {
    background: #2d3748 !important;
    color: #ffffff !important;
}

.dark select optgroup {
    background: #1a202c !important;
    color: #a0aec0 !important;
    font-weight: bold !important;
}

/* Specific fix for quote modal dropdown */
#quote-modal select[name="product_interest"] {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#quote-modal select[name="product_interest"] option {
    background: #1a202c !important;
    color: #ffffff !important;
    padding: 8px 12px !important;
}

#quote-modal select[name="product_interest"] optgroup {
    background: #2d3748 !important;
    color: #a0aec0 !important;
    font-weight: bold !important;
    font-style: normal !important;
}

#quote-modal select[name="product_interest"] option:hover,
#quote-modal select[name="product_interest"] option:focus,
#quote-modal select[name="product_interest"] option:checked {
    background: #4299e1 !important;
    color: #ffffff !important;
}

/* Universal dark mode dropdown fix */
.dark select,
.dark .form-input,
.dark input.form-input,
.dark textarea.form-input {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.dark select:focus,
.dark .form-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #4299e1 !important;
}
select option {
    background: #2d3748 !important;
    color: #ffffff !important;
}

select option:hover,
select option:focus,
select option:checked {
    background: #4299e1 !important;
    color: #ffffff !important;
}

/* Webkit specific fixes for Safari/Chrome */
select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: #1a202c;
}

select::-webkit-scrollbar-thumb {
    background: #4299e1;
    border-radius: 4px;
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    select option {
        background: #2d3748 !important;
        color: #ffffff !important;
    }
}

/* Technical Specifications Styling */
.specifications-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
}

.specification-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 40px;
}

.specification-item:last-child {
    border-bottom: none;
}

.specification-key {
    color: #cbd5e1;
    text-align: left;
    flex-shrink: 0;
    padding-right: 16px;
    font-weight: 500;
    width: auto;
    max-width: 60%;
}

.specification-value {
    color: #ffffff;
    text-align: right;
    font-weight: 600;
    flex-shrink: 0;
    word-break: break-word;
}

/* Responsive specifications */
@media (max-width: 768px) {
    .specification-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .specification-key {
        max-width: 100%;
        padding-right: 0;
    }

    .specification-value {
        text-align: left;
        padding-left: 12px;
        color: #4299e1;
    }
}

/* Navigation */
.nav-link {
    color: #4a5568;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dark .nav-link {
    color: var(--text-light);
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--accent-color);
}

.dark .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .heading-xl {
        font-size: 2.5rem;
    }
    
    .heading-lg {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 80vh;
        padding: 20px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer and section background fixes for light theme */
footer {
    color: #1a202c !important;
}

.dark footer {
    color: #f7fafc !important;
}

/* Footer specific text color fixes */
footer h3 {
    color: #1a202c !important;
}

.dark footer h3 {
    color: #ffffff !important;
}

footer p {
    color: #4a5568 !important;
}

.dark footer p {
    color: #cbd5e1 !important;
}

footer a {
    color: #4a5568 !important;
}

.dark footer a {
    color: #cbd5e1 !important;
}

footer a:hover {
    color: #4299e1 !important;
}

.dark footer a:hover {
    color: #63b3ed !important;
}

/* Footer contact info specific styling */
footer .text-gray-700 {
    color: #374151 !important;
}

.dark footer .text-gray-700 {
    color: #d1d5db !important;
}

footer .text-gray-300 {
    color: #6b7280 !important;
}

.dark footer .text-gray-300 {
    color: #d1d5db !important;
}

footer .text-gray-600 {
    color: #4b5563 !important;
}

.dark footer .text-gray-600 {
    color: #9ca3af !important;
}

footer .text-gray-400 {
    color: #6b7280 !important;
}

.dark footer .text-gray-400 {
    color: #9ca3af !important;
}

/* Footer headings specific styling */
footer h4 {
    color: #1a202c !important;
}

.dark footer h4 {
    color: #ffffff !important;
}

/* Newsletter section specific styling */
footer .text-gray-900 {
    color: #1a202c !important;
}

.dark footer .text-gray-900 {
    color: #ffffff !important;
}

/* Product filter section enhancements */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.dark .filter-btn::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Enhanced active filter styling */
.filter-btn.active {
    position: relative;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
}

/* Filter section background improvements */
.bg-industrial-800\/50 {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .bg-industrial-800\/50 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Brochure section background fixes */
section[class*="bg-gradient-to-r"] {
    color: #1a202c;
}

.dark section[class*="bg-gradient-to-r"] {
    color: #f7fafc;
}

/* Improved text readability for light theme */
.text-gray-300:not(.dark *) {
    color: #4a5568 !important;
}

.text-gray-400:not(.dark *) {
    color: #718096 !important;
}

/* Ensure proper contrast for headings in light mode */
h1, h2, h3, h4, h5, h6 {
    color: #1a202c;
}

.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #f7fafc;
}

/* Better link colors for light mode */
a:not(.btn-industrial):not(.glass-card) {
    color: #3182ce;
}

.dark a:not(.btn-industrial):not(.glass-card) {
    color: #63b3ed;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, #4299e1, #63b3ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-industrial {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
