/* DD Autotech Website - Modern CSS (Orange theme) */
:root {
    --primary-color: #f59e0b;
    --primary-dark: #d97706;
    --secondary-color: #ea580c;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Products Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 6px;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0; /* no gap so hover is not lost when moving mouse to menu */
    border: 1px solid var(--border-color);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: block;
}

.nav-dropdown .dropdown-menu li {
    margin: 0;
}

.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.nav-dropdown .dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section - default image (home); overrides below per page */
.hero {
    position: relative;
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    background-image: url('../images/U-Linear-1.jpg');
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

/* Per-page hero backgrounds */
.hero.hero-products { background-image: url('../images/AllProducts-e1605499258346.jpg'); }
.hero.hero-ksd { background-image: url('../images/KS-Series-1.jpg'); }
.hero.hero-kxad { background-image: url('../images/KXA-Series.jpg'); }
.hero.hero-uld { background-image: url('../images/U-Linear-scaled.jpg'); }
.hero.hero-xsd { background-image: url('../images/XS-Series-1.jpg'); }
.hero.hero-about { background-image: url('../images/Production-Platform-1.jpg'); }
.hero.hero-contact { background-image: url('../images/industrial4.0-e1598697009450.jpeg'); }
.hero.hero-consultation { background-image: url('../images/Production-Platform-1.jpg'); }
.hero.hero-thank-you { background-image: url('../images/AllProducts-e1605499258346.jpg'); }
.hero.hero-cta { background-image: url('../images/U-Linear-scaled.jpg'); }

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.85) 0%, rgba(245, 158, 11, 0.75) 100%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.product-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Features */
.features {
    background: var(--bg-light);
    padding: 3rem 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 24px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

/* Specifications Table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spec-table th,
.spec-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.spec-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.spec-table th a {
    color: var(--white);
}

.spec-table tr:hover {
    background: var(--bg-light);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        margin-top: 0.25rem;
        display: none;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .spec-table {
        font-size: 0.875rem;
    }
    
    .spec-table th,
    .spec-table td {
        padding: 0.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}
