:root {
    --primary-color: #004d99;
    --primary-hover: #003366;
    --secondary-bg: #f8fbff;
    --text-dark: #1a202c;
    --text-light: #4a5568;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

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

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bg-light {
    background-color: var(--secondary-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 56px;
}

.section-title h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.section-title .divider {
    height: 4px;
    width: 64px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.section-title .subtitle {
    margin-top: 20px;
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.header {
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
}

.nav ul {
    display: flex;
    gap: 24px;
}

.nav {
    margin-left: auto;
    order: 1;
}

.language-switch {
    display: flex;
    flex-shrink: 0;
    order: 2;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    gap: 2px;
    background: var(--secondary-bg);
}

.language-button {
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-light);
    padding: 7px 10px;
    min-height: 36px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.language-button[aria-pressed="true"] {
    color: var(--white);
    background: var(--primary-color);
}

.language-button:hover:not([aria-pressed="true"]) {
    color: var(--primary-color);
    background: #e5eef8;
}

.language-button:focus-visible,
.mobile-menu-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.mobile-menu-btn {
    display: none;
    border: 0;
    padding: 0;
    background: transparent;
    flex-shrink: 0;
    order: 3;
}

.nav a {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-light);
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.page-header {
    background-color: var(--secondary-bg);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5)), url('images/banner.webp') center/cover no-repeat;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    transition: background 1s ease-in-out;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: #e2e8f0;
    font-weight: 400;
}

.about-section {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-facilities-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.facility-card {
    overflow: hidden;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.facility-card img {
    display: block;
    width: 100%;
    height: auto;
}

.facility-card figcaption {
    padding: 16px;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

.features {
    padding: 96px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 48px 32px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.feature-card .icon {
    color: var(--primary-color);
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    font-size: 1rem;
}

.qualifications {
    padding: 80px 0;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.cert-item {
    background: var(--white);
    padding: 32px 24px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cert-item h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.cert-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.premium-product-section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.premium-product-section:nth-of-type(even) {
    background-color: #f9fafb;
}

.premium-product-row {
    display: flex;
    align-items: center;
    gap: 80px;
}


.product-visuals {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 550px;
}

.main-visual img {
    width: 100%;
    height: auto;
    display: block;
    background: #f1f5f9;
    border: none;
    border-radius: 2px;
}

.sub-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sub-visuals img {
    width: 100%;
    height: auto;
    display: block;
    background: #f1f5f9;
    border: none;
    border-radius: 2px;
}

.product-data {
    flex: 1;
    padding: 40px 0;
}

.product-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
}

.product-index {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    font-family: monospace;
}

.product-title-text {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.5px;
}

.product-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 48px;
    max-width: 480px;
}

.product-specs {
    border-top: 1px solid var(--border-color);
}

.spec-row {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
}

.spec-label {
    width: 120px;
    flex-shrink: 0;
    padding-right: 16px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.spec-value {
    color: var(--text-light);
    flex: 1;
}

.premium-metal-section {
    padding: 100px 0;
    text-align: center;
    background-color: var(--white);
}

.premium-metal-header {
    margin-bottom: 60px;
}

.premium-metal-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.premium-metal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
}

.metal-parts-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.premium-metal-item {
    background-color: var(--white);
    padding: 40px 20px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 1px;
    transition: background-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.premium-metal-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.premium-metal-item:hover {
    background-color: #f8fbff;
}

.contact-section {
    padding: 60px 0 100px;
}

.footer {
    background-color: #0b1a2a;
    color: var(--white);
    padding: 80px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-info p {
    color: #94a3b8;
    margin-bottom: 16px;
    max-width: 400px;
}

.contact-details li {
    margin-bottom: 12px;
    color: #cbd5e1;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-links a {
    color: #cbd5e1;
}

.quick-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 0.875rem;
}

@media (max-width: 992px) {

    .premium-product-row,
    .premium-product-section:nth-child(even) .premium-product-row {
        flex-direction: column;
        gap: 40px;
    }

    .product-visuals {
        max-width: 100%;
    }

    .premium-metal-grid {
        grid-template-columns: 1fr;
    }

    /* Fix Products Layout on Tablets and Mobile */
    .products-layout {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .products-sidebar {
        width: 100% !important;
        position: relative !important;
        padding: 0 !important;
        top: 0 !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 1100px) {
    /* Hamburger Menu Styles */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--primary-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Mobile Nav Dropdown */
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }

    .nav a {
        display: block;
        padding: 15px 24px;
        border-bottom: 1px solid #f1f5f9;
    }

    .language-switch {
        margin-left: auto;
    }
}

@media (max-width: 768px) {

    .about-facilities-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h2 {
        font-size: 2.2rem !important;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }
}

html[lang="en"] .hero-content h2 {
    line-height: 1.2;
}

html[lang="en"] .contact-card h3 > span:last-child {
    display: block;
    margin-left: 0 !important;
    margin-top: 8px;
}

html[lang="en"] .spec-label {
    width: 145px;
    letter-spacing: 0;
}

@media (max-width: 480px) {
    .header .container {
        gap: 10px;
        padding: 0 16px;
    }

    .header .logo {
        flex: 1;
        min-width: 0;
    }

    .header .logo a {
        gap: 6px !important;
    }

    .header .logo img {
        height: 30px !important;
    }

    .header .logo a > div > span:first-child {
        font-size: 0.85rem !important;
    }

    .header .logo a > div > span:last-child {
        font-size: 0.6rem !important;
        letter-spacing: 0;
    }

    .language-button {
        padding: 7px 8px;
    }

    .mobile-menu-btn {
        width: 24px;
    }

    html[lang="en"] .spec-label {
        width: 115px;
    }
}

/* Responsive Grid Utility for Certifications */
.cert-img,
.color-gallery img {
    height: auto;
}

.cert-grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 16px;
}

/* 7-column grid for color gallery */
.color-grid-7 {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

@media (max-width: 992px) {
    .color-grid-7 {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.1s ease-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10000;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 28px;
    transition: all 0.2s;
    user-select: none;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Products Layout with Sidebar */
.products-layout {
    display: flex;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 80px;
    align-items: flex-start;
}

.products-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: var(--white);
    border-radius: 8px;
    padding: 10px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    font-size: 1.1rem;
    padding: 12px 20px;
    color: var(--text-dark);
    display: block;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background-color: #f1f5f9;
}

.sidebar-nav a.active {
    background-color: #cce9f8;
    /* Light blue */
    color: var(--text-dark);
}

.sidebar-nav .sidebar-group-title {
    font-size: 1.1rem;
    padding: 12px 20px;
    color: var(--text-dark);
    display: block;
    font-weight: 500;
}

.sidebar-nav a.sub-link {
    padding-left: 40px;
    font-size: 1rem;
    color: var(--text-light);
}

.products-main-content {
    flex: 1;
    min-width: 0;
}

.category-anchor {
    scroll-margin-top: 100px;
}

.products-main-content .premium-product-section {
    padding: 60px 0;
    border-radius: 8px;
    margin-bottom: 24px;
}

.products-main-content .premium-metal-section {
    padding: 60px 0;
    border-radius: 8px;
    margin-bottom: 24px;
}

.products-main-content .container {
    padding: 0;
    width: 100%;
}
