/* Base Styles & Variables */
:root {
    --bg-primary: #080a0f;
    --bg-secondary: #10141d;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-primary: #0ea5e9;
    --accent-secondary: #38bdf8;
    --gradient-accent: linear-gradient(135deg, #0ea5e9, #14b8a6);
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(16, 20, 29, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography Utilities */
.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--accent-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary.glow {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: inline-block;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--text-primary);
}

.w-100 {
    width: 100%;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
    padding: 1.5rem 0;
}

header.scrolled {
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn-primary) {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Sections */
section {
    padding: 6rem 0;
}

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

.section-header {
    margin-bottom: 4rem;
}

.section-header h2:not(.subtitle) {
    font-size: 2.5rem;
}

.text-center {
    text-align: center;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(8, 10, 15, 0.95) 0%, rgba(8, 10, 15, 0.4) 100%),
                url('images/casting_products_premium.png') center/cover no-repeat;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: fadeInSlide 2s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
    z-index: 2;
}

.scroll-indicator span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

/* About Section (Original Concise Layout) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Concise MVV Single Card */
.mvv-single-card {
    display: flex;
    justify-content: space-between;
    background: rgba(4, 6, 10, 0.6);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 16px;
    padding: 2.5rem 1rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.mvv-single-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('images/facility_casting.png') center/cover;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
    filter: grayscale(30%);
}

.mvv-item {
    flex: 1;
    padding: 0 2rem;
    text-align: center;
    z-index: 1;
}

.mvv-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(14, 165, 233, 0.3), transparent);
    z-index: 1;
}

.mvv-item .card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.mvv-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.mvv-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}
/* Certifications Section */
.certifications {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
}

.cert-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cert-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cert-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.cert-btn {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1px solid rgba(14, 165, 233, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.05);
}

.cert-btn:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--accent-primary);
}

/* Capabilities Marquee Section */
.capabilities-marquee-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    padding: 2rem 0; 
}
.capabilities-marquee-container::before,
.capabilities-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.capabilities-marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}
.capabilities-marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}
.capabilities-marquee-track {
    display: inline-flex;
    gap: 2rem;
    animation: marquee-scroll 25s linear infinite;
    padding: 0 1rem;
}
.capabilities-marquee-track:hover {
    animation-play-state: paused;
}
.capabilities-marquee-track .card {
    width: 400px;
    white-space: normal; 
    flex: 0 0 auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
}
.capabilities-marquee-track .card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1rem)); } 
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
}

/* Services Section */
.services-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.accordion-header {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.accordion-header:hover {
    color: var(--accent-secondary);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-secondary);
}

.accordion-item.active .accordion-header::after {
    content: '−';
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-item.active .accordion-body {
    max-height: 200px;
    padding-top: 1rem;
}

.accordion-body p {
    color: var(--text-secondary);
}

.services-image {
    position: relative;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    background: url('services_image.png') center/cover no-repeat;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
}

.glass-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(10, 11, 16, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 12px;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item .icon {
    font-size: 1.5rem;
    background: var(--glass-bg);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--text-secondary);
}

.footer-links ul li a:hover {
    color: var(--accent-secondary);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* GDPR Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 800px;
    width: 90%;
    transition: all 0.5s ease;
}

.cookie-banner.hidden {
    bottom: -150px;
    opacity: 0;
    pointer-events: none;
}

.cookie-banner p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
}

.cookie-banner a {
    color: var(--accent-secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Products Showcase Section */
.products {
    background-color: var(--bg-secondary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.product-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 10, 15, 0.95) 0%, rgba(8, 10, 15, 0.2) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.product-overlay h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.2);
}

.product-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

/* Base overlay content styling */
.product-overlay .overlay-content {
    width: 100%;
}

.product-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    opacity: 0;
}

/* 1. PDC: Pressure Squeeze Animation */
@keyframes pressureSqueeze {
    0% { transform: scaleX(1) scaleY(1) translateY(20px); opacity: 0; }
    40% { transform: scaleX(1.05) scaleY(0.9) translateY(0); opacity: 1; }
    70% { transform: scaleX(0.95) scaleY(1.05) translateY(0); opacity: 1; }
    100% { transform: scaleX(1) scaleY(1) translateY(0); opacity: 1; }
}
#card-pdc:hover .product-overlay h3 {
    animation: pressureSqueeze 0.5s ease forwards;
}

/* 2. GDC: Gravity Drop Animation */
@keyframes gravityDrop {
    0% { transform: translateY(-50px); opacity: 0; }
    60% { transform: translateY(5px); opacity: 1; }
    80% { transform: translateY(-3px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}
#card-gdc:hover .product-overlay h3 {
    animation: gravityDrop 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 3. Sand Casting: Grainy/Shake Animation */
@keyframes sandSift {
    0% { transform: translateY(15px) translateX(-2px); opacity: 0; filter: blur(4px); }
    30% { transform: translateY(5px) translateX(2px); opacity: 0.5; filter: blur(2px); }
    60% { transform: translateY(2px) translateX(-1px); opacity: 0.8; filter: blur(1px); }
    100% { transform: translateY(0) translateX(0); opacity: 1; filter: blur(0); }
}
#card-sand:hover .product-overlay h3 {
    animation: sandSift 0.5s ease forwards;
}

/* 4. CNC Machining: Precision Slide & Spin Animation */
@keyframes cncSlide {
    0% { transform: translateX(-30px); opacity: 0; }
    80% { transform: translateX(5px); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}
#card-machining:hover .product-overlay h3 {
    animation: cncSlide 0.5s ease forwards;
    border-left: 3px solid var(--accent-primary);
    padding-left: 10px;
}

.btn-real-sample {
    margin-top: 10px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid var(--accent-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.btn-fac-sample {
    margin-top: 20px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid var(--accent-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-fac-sample:hover,
.product-card:hover .btn-real-sample {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.btn-real-sample:hover,
.btn-fac-sample:hover {
    background: var(--accent-primary);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

/* Modal Lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(4, 6, 10, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    margin: 5% auto;
    width: 90%;
    max-width: 1200px;
    background: var(--bg-dark);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border: 1px solid var(--border-color);
}

.carousel-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    display: flex;
}

.carousel-slide {
    display: none;
    width: 100%;
    animation: fadeInSlide 0.5s;
}

.carousel-slide.active {
    display: flex;
}

@keyframes fadeInSlide {
    from {opacity: 0;}
    to {opacity: 1;}
}

.slide-image {
    flex: 0 0 60%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
}

.slide-image img {
    max-width: 100%;
    max-height: 700px;
    object-fit: contain;
}

.slide-details {
    flex: 0 0 40%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.slide-details h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.slide-details p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.slide-details .tech-specs {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.slide-details .spec-item {
    display: flex;
    margin-bottom: 0.8rem;
}

.slide-details .spec-label {
    color: var(--accent-primary);
    font-weight: 600;
    min-width: 120px;
}

.carousel-prev, .carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid var(--accent-primary);
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover, .carousel-next:hover {
    background: var(--accent-primary);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: var(--accent-primary);
}

@media (max-width: 900px) {
    .modal-content {
        margin: 10px auto;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto; /* Allow scrolling inside the modal content on mobile */
    }

    .carousel-container {
        min-height: auto;
    }
    
    .carousel-slide.active {
        flex-direction: column;
    }
    
    .slide-image {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
        height: 350px; /* Fixed height for image area on mobile */
    }
    
    .slide-image img {
        height: 100%;
        width: 100%;
        object-fit: contain;
    }
    
    .slide-details {
        flex: 0 0 auto;
        padding: 1.5rem;
    }
    
    .slide-details h3 {
        font-size: 1.5rem;
        margin-top: 10px;
    }
    
    .slide-details p {
        font-size: 1rem;
    }
    
    .tech-specs {
        margin-bottom: 2rem; /* Give some breathing room at the bottom */
    }

    .carousel-prev, .carousel-next {
        top: 175px; /* Center arrows over the 350px high image */
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }

    .close-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .slide-image {
        height: 250px;
    }
    .carousel-prev, .carousel-next {
        top: 125px;
        width: 35px;
        height: 35px;
    }
    .slide-details {
        padding: 1rem;
    }
    .slide-details h3 {
        font-size: 1.3rem;
    }
    .spec-item {
        flex-direction: column;
    }
    .spec-label {
        margin-bottom: 5px;
    }
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Infrastructure Tabs */
.infrastructure {
    background-color: var(--bg-primary);
    padding: 5rem 0;
}

.tabs-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom: 3px solid var(--accent-primary);
    background: rgba(14, 165, 233, 0.05);
}

.tabs-content {
    padding: 3rem;
}

.tab-pane {
    display: none;
    animation: fadeInTab 0.5s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}

.tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.tab-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.facility-list {
    list-style: none;
    padding: 0;
}

.facility-list li {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 25px;
    position: relative;
}

.facility-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.facility-list li strong {
    color: var(--text-primary);
}

.tab-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
}

/* Animations */
.reveal-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
    .about-grid, .services-wrapper, .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        display: flex;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        padding: 1rem 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: 0.4s;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2:not(.subtitle) {
        font-size: 2rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-buttons a {
        width: 100%;
        text-align: center;
    }

    .hero {
        padding-bottom: 5rem;
    }
    
    .scroll-indicator {
        bottom: 0.5rem;
        transform: translateX(-50%) scale(0.8);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .mvv-single-card {
        flex-direction: column;
        padding: 2rem;
    }

    .mvv-item {
        padding: 1rem 0;
    }

    .mvv-divider {
        width: 100%;
        height: 1px;
        margin: 1rem 0;
        background: linear-gradient(to right, transparent, rgba(14, 165, 233, 0.3), transparent);
    }
    
    .capabilities-marquee-container::before,
    .capabilities-marquee-container::after {
        width: 30px;
    }
    
    .capabilities-marquee-track .card {
        width: 280px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .services-image {
        height: 300px;
    }
}

/* Marquee Animation */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee img {
    height: 60px;
    width: auto;
    margin: 0 3rem;
    vertical-align: middle;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.marquee img:hover {
    filter: grayscale(0%) opacity(1);
}

@media (max-width: 768px) {
    .marquee img {
        height: 40px;
        margin: 0 1.5rem;
    }
}

/* FIRST HOVER ANIMATIONS FOR PRODUCT CARDS */

/* 1. PDC: Entrance Squeeze (Pressure) */
#card-pdc.hover-animated {
    animation: entranceSqueeze 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes entranceSqueeze {
    0% { transform: scaleX(1) scaleY(1) translateY(0); }
    40% { transform: scaleX(1.1) scaleY(0.9) translateY(0); }
    70% { transform: scaleX(0.95) scaleY(1.05) translateY(0); }
    100% { transform: scaleX(1) scaleY(1) translateY(0); }
}

/* 2. GDC: Entrance Gravity Drop */
#card-gdc.hover-animated {
    animation: entranceDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes entranceDrop {
    0% { transform: translateY(0); }
    50% { transform: translateY(15px); }
    75% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* 3. Sand Casting: Entrance Sand Sprinkle */
#card-sand.hover-animated::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: 
        radial-gradient(#a0522d 2px, transparent 2px), 
        radial-gradient(#cd853f 1px, transparent 1px);
    background-size: 25px 25px, 15px 15px;
    background-position: 0 0, 10px 10px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    animation: sprinkleDust 1.5s ease-out forwards;
}
@keyframes sprinkleDust {
    0% { top: -100%; opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { top: 50%; opacity: 0; }
}

/* 4. CNC Machining: Entrance Laser/Cut Line */
#card-machining.hover-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.6), transparent);
    transform: skewX(-25deg);
    z-index: 10;
    pointer-events: none;
    animation: cncLaserCut 1s ease-in-out forwards;
}
@keyframes cncLaserCut {
    0% { left: -150%; opacity: 1; }
    100% { left: 150%; opacity: 1; }
}
