/* VARIABLEN & RESET */
:root {
    --color-primary: #1b4259;
    /* VIASTRON Petrol/Teal */
    --color-secondary: #ff9900;
    /* Safety Orange */
    --color-text: #334155;
    --color-light: #F8FAFC;
    --color-white: #ffffff;
    --color-gray: #94A3B8;
    --font-heading: 'Barlow', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
    --border-radius: 4px;
}

/* Custom Scrollbar - Base */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-primary);
}

::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Firefox Support */
html {
    scrollbar-width: thin;
    scrollbar-color: #64748b var(--color-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-light);
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 50px;
}

.center {
    text-align: center;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.line {
    width: 60px;
    height: 4px;
    background-color: var(--color-secondary);
    margin-top: 20px;
}

.center-line {
    margin: 20px auto 0;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    border: 2px solid var(--color-secondary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-secondary);
}

/* Button Sheen Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: sheen 6s infinite;
    pointer-events: none;
}

.btn-primary:hover::after {
    animation: none;
    left: 100%;
    transition: left 0.5s;
}

@keyframes sheen {
    0% {
        left: -100%;
    }

    10%,
    100% {
        left: 200%;
    }
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* HEADER */
.header {
    background-color: transparent;
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-primary);
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img-header {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.header.scrolled .logo-img-header {
    filter: none;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-secondary);
}

.btn-nav {
    border: 1px solid var(--color-secondary);
    padding: 5px 15px;
    border-radius: 3px;
}

.header-utils {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}


.search-box input {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 5px 10px;
    color: var(--color-primary);
    border-radius: 3px;
    color: var(--color-primary);
    border-radius: 3px;
    width: 150px;
}

.header.scrolled .search-box input {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
}

.lang-switch {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
}

.lang-switch .active {
    color: var(--color-secondary);
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(27, 66, 89, 0.95) 0%, rgba(27, 66, 89, 0.7) 50%, rgba(27, 66, 89, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: 0;
    /* Align left in container */
    padding-top: 120px;
    /* Safe zone for fixed header */
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-logo-img {
    height: auto;
    width: auto;
    max-width: 80%;
    /* Responsive Limit */
    max-height: 25vh;
    /* Height Limit */
    display: inline-block;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
    margin-top: 20px;
    /* Safety Gap */
    vertical-align: bottom;
}

.hero-lead {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    color: #e2e8f0;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* ABOUT SECTION */
.about {
    background-color: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: #475569;
}

.about-image {
    position: relative;
}

.about-image img {
    box-shadow: 20px 20px 0 var(--color-secondary);
    border-radius: 4px;
}

.image-caption {
    background: var(--color-primary);
    color: white;
    padding: 10px 20px;
    position: absolute;
    bottom: -15px;
    left: 20px;
    right: 20px;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* SERVICES SECTION */
/* SERVICES SECTION */
.services-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: stretch;
}

.service-item {
    display: flex;
    flex-direction: column;
    /* Stack image and content vertically */
    gap: 20px;
    background: white;
    padding: 0;
    /* Remove padding to let image fill width */
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    overflow: hidden;
    /* Ensure image respects border radius */
    height: 100%;
    border-bottom: 3px solid transparent;
}

.service-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid var(--color-secondary);
}

.service-item.reverse {
    direction: ltr;
    /* Reset direction since we are vertical now */
}

/* Specific content padding since we removed it from parent */
.service-content {
    padding: 0 30px 30px 30px;
    flex: 1;
    /* Make content fill remaining space */
}

.service-img {
    width: 100%;
    order: -1;
    /* Ensure image is always top */
}

.service-img img {
    width: 100%;
    height: 250px;
    /* Slightly shorter for card look */
    object-fit: cover;
    border-radius: 0;
    /* Remove specific radius as container has it */
}

@media (max-width: 900px) {
    .services-list {
        grid-template-columns: 1fr;
    }
}

.service-content .icon {
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 15px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.service-item:hover .icon {
    transform: scale(1.1);
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.service-content p {
    margin-bottom: 15px;
    color: #64748B;
}

/* PROJECTS SECTION */
.projects {
    background-color: var(--color-primary);
    color: white;
}

.projects .section-header h2 {
    color: white;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.project-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.project-info {
    padding: 25px;
}

.project-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--color-secondary);
}

.project-info p {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.read-more:hover {
    color: var(--color-secondary);
}

/* NEWS SECTION */
.news {
    background-color: #f1f5f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    background: white;
    padding: 30px;
    border-left: 4px solid var(--color-secondary);
}

.news-item .date {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.news-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-item p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: #475569;
}

.news-item a {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.9rem;
}

/* CAREER SECTION */
.career {
    background: url('../assets/tiefbau.png');
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    padding: 100px 0;
}

.career::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 66, 89, 0.9);
}

.career-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.career-text {
    flex: 1;
    color: white;
    padding-right: 50px;
}

.career-text h2 {
    color: white;
    margin-bottom: 20px;
}

.career-jobs {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-card {
    background: white;
    padding: 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    transition: transform 0.2s;
}

.job-card:hover {
    transform: translateX(-10px);
}

.job-type {
    font-size: 0.7rem;
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 3px;
    color: #64748B;
    font-weight: 700;
}

/* FOOTER */
.footer {
    background-color: #020617;
    /* Even darker blue */
    color: #94a3b8;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    margin-bottom: 20px;
}

.footer-col h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.contact-info li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    background: #1e293b;
    border: none;
    padding: 10px;
    color: white;
    flex: 1;
    border-radius: 3px 0 0 3px;
}

.newsletter-form button {
    background: var(--color-secondary);
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
}

.footer-bottom {
    background: #000;
    padding: 20px 0;
    font-size: 0.85rem;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.1rem;
}

.social-links a:hover {
    color: var(--color-secondary);
}


/* --- NEW SECTIONS & REFINEMENTS --- */

/* Sticky Header Refinement */
/* Sticky Header Refinement - REMOVED (Replaced by main header styles) */

/* QHSE Section */
.qhse {
    background-color: white;
}

.qhse-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.qhse-text h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--color-secondary);
}

.qhse-text p {
    margin-bottom: 20px;
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.cert-img {
    height: 100px;
    width: auto;
    transition: transform 0.3s;
}

.cert-img:hover {
    transform: scale(1.1);
}

.cert-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid;
    text-align: center;
    padding: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cert-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cert-badge.orange {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.cert-badge.blue {
    border-color: #3b82f6;
    color: #3b82f6;
}

.cert-badge.dark {
    border-color: #334155;
    color: #334155;
}

.cert-code {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
}

.cert-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Fleet Section */
.fleet {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.fleet-item {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    border-bottom: 4px solid var(--color-secondary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.fleet-item:hover {
    transform: translateY(-10px);
}

.fleet-item i {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.fleet-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.fleet-item p {
    font-size: 0.9rem;
    color: #64748b;
}

/* Contact Form & Enhanced Footer */
.enhanced-footer .contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    margin-bottom: 50px;
}

.contact-form-section {
    background: #1e293b;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.contact-form-section h3 {
    color: white;
    margin-bottom: 10px;
}

.contact-form-section p {
    color: #94a3b8;
    margin-bottom: 30px;
}

.project-form label {
    display: block;
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.project-form input,
.project-form select,
.project-form textarea {
    width: 100%;
    background: var(--color-primary);
    border: 1px solid #334155;
    color: white;
    padding: 12px;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.project-form input:focus,
.project-form select:focus,
.project-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.full-width {
    width: 100%;
}

.address-block {
    margin-bottom: 30px;
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-list li {
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.contact-list i {
    color: var(--color-secondary);
    min-width: 25px;
}

.map-placeholder {
    margin-top: 30px;
    margin-bottom: 30px;
}

.map-dummy {
    width: 100%;
    height: 200px;
    background: #334155;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.map-dummy:hover {
    background: #475569;
    color: white;
}

.map-dummy i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.footer-legal-links {
    font-size: 0.9rem;
}

.footer-legal-links a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* INNOVATION & NEW SECTIONS */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1b4259;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-content .logo-img {
    height: auto;
    width: 300px;
    display: block;
    margin: 0 auto 20px;
    filter: brightness(0) invert(1);
}

.pulse {
    animation: pulse 1.5s infinite;
}

.loader-text {
    color: #475569;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-secondary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    transform: translateY(-5px);
}

/* Innovation Section */
.section-dark {
    background-color: #0A2342;
    color: white;
    position: relative;
    overflow: hidden;
}

.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(10, 35, 66, 0.9), rgba(10, 35, 66, 0.95)),
        url('../assets/tech_bg.png');
    /* Fallback / Blend */
    background-size: cover;
    opacity: 0.5;
    z-index: 1;
}

.tech-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 49%, rgba(6, 182, 212, 0.05) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(6, 182, 212, 0.05) 50%, transparent 51%);
    background-size: 50px 50px;
    pointer-events: none;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.text-white {
    color: white !important;
}

.text-cyan {
    color: #06b6d4 !important;
}

.text-light {
    color: #cbd5e1 !important;
}

.line-cyan {
    background-color: #06b6d4 !important;
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.tech-list {
    list-style: none;
    margin-top: 30px;
}

.tech-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: #e2e8f0;
}

.tech-img-framed {
    border: 1px solid #06b6d4;
    padding: 10px;
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* Stats Section */
.stats {
    background-color: var(--color-primary);
    color: white;
}

.stats h2 {
    color: white !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-secondary);
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #cbd5e1;
    letter-spacing: 1px;
}

/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cert-item {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #f1f5f9;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.15);
    border-color: var(--color-secondary);
}

.cert-item.full-width {
    grid-column: 1 / -1;
    max-width: 800px;
    margin: 0 auto;
}

.cert-icon {
    font-size: 3.5rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.cert-item h3 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.cert-item h4 {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-item p {
    color: var(--color-text);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cert-grid {
        grid-template-columns: 1fr;
    }
}

/* Partners Section */
.partners {
    background: white;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    align-items: center;
    justify-items: center;
    margin-bottom: 60px;
}

.partner-logo {
    max-height: 100px;
    width: auto;
    max-width: 100%;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
    object-fit: contain;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.testimonial {
    background: #f8fafc;
    padding: 40px;
    border-left: 5px solid var(--color-secondary);
    border-radius: 4px;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial blockquote {
    font-size: 1.4rem;
    font-style: italic;
    color: #334155;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.testimonial cite {
    font-weight: 700;
    color: #64748b;
    font-style: normal;
}

/* Download Section */
.downloads {
    background: #f1f5f9;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.download-item {
    background: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    color: var(--color-text);
}

.download-item:hover {
    border-color: var(--color-secondary);
    transform: translateX(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.download-item i:first-child {
    font-size: 2rem;
    color: #cbd5e1;
}

.download-item .dl-text {
    flex: 1;
    font-weight: 500;
}

.download-item .dl-icon {
    font-size: 1.2rem;
    color: var(--color-secondary);
}

@keyframes pulse {
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animations - Scroll Reveal */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ANTI-THEFT SPECIFIC OVERRIDES */
.partner-logo {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

/* Staggered Delays for Service Cards */
.service-item:nth-child(2) {
    transition-delay: 150ms;
}

.service-item:nth-child(3) {
    transition-delay: 300ms;
}

.service-item:nth-child(4) {
    transition-delay: 450ms;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .header-utils {
        display: none;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-logo-img {
        max-width: 250px;
        /* Smaller logo on tablets */
    }

    .about-grid,
    .service-item,
    .project-grid,
    .news-grid,
    .career-container,
    .footer-grid,
    .qhse-content,
    .enhanced-footer .contact-wrapper {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .fleet-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .service-item.reverse {
        direction: ltr;
    }
}

@media (max-height: 700px) {
    .hero-logo-img {
        max-height: 15vh;
        /* Reduce logo height on short screens */
        margin-top: 10px;
    }

    .hero-content {
        padding-top: 100px;
    }
}

/* === REPAIRED & RESTORED FEATURES === */

/* 1. Mobile Responsive Fixes (Hero Logo) */
@media (max-width: 768px) {
    .hero-logo-img {
        max-width: 70%;
        margin-top: 15px;
    }

    .hero-content {
        padding-top: 110px;
    }
}

/* 2. Texture Overlay (Noise/Asphalt Look) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    /* Subtle Noise Texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.12;
    mix-blend-mode: overlay;
}

/* 3. Custom Scrollbar (Restoration/Override) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-primary);
    /* Dark Blue */
}

::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    /* Orange */
    border-radius: 5px;
    border: 2px solid var(--color-primary);
    /* Contrast border */
}

::-webkit-scrollbar-thumb:hover {
    background: #ffb84d;
    /* Lighter Orange */
}

/* 4. Button Sheen Effect (Restoration) */
/* The base sheen effect is already present directly in .btn-primary CSS above. 
   This block ensures it works as intended if the above was modified. */

/* 5. Translation Localization */
.lang-switch span {
    transition: all 0.3s ease;
    padding: 2px 5px;
    border-radius: 4px;
}

.lang-switch span:hover,
.lang-switch span.active {
    color: var(--color-secondary);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
}

/* Footer Credit Link */
.footer-credit-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-credit-link:hover {
    color: white;
    text-decoration: underline;
}

/* =========================================
   MOBILE OPTIMIZATION (Hamburger & Loader)
   ========================================= */

/* 1. Hamburger Menu Wrapper */
.hamburger {
    display: none;
    /* Hidden on desktop */
    cursor: pointer;
    font-size: 1.8rem;
    color: white;
    z-index: 2001;
    /* Above mobile menu */
    padding: 10px;
}

.header.scrolled .hamburger {
    color: var(--color-primary);
}

/* 2. Mobile Navigation & Responsive Logic */
@media (max-width: 992px) {

    /* Show Hamburger */
    .hamburger {
        display: block;
    }

    /* Off-Canvas Menu */
    .main-nav {
        display: flex;
        /* Ensure display flex for centering */
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden Initially */
        width: 100%;
        /* Full Width */
        height: 100vh;
        background-color: rgba(2, 6, 23, 0.98);
        /* Deep Dark Blue */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 2000;
        padding-top: 60px;
    }

    .main-nav.active {
        right: 0;
        /* Slide In */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
        padding: 0;
        /* Reset padding */
    }

    .main-nav a {
        font-size: 1.3rem;
        color: white;
        display: block;
        padding: 10px;
    }

    /* Hide Utils on Mobile */
    .header-utils {
        display: none;
    }

    .header-container {
        justify-content: space-between;
    }
}

/* 3. Loader Fix - Absolute Centering */
#preloader {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
}

.loader-content {
    /* Reset potential margins that cause offset */
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-content .logo-img {
    margin: 0 0 20px 0 !important;
    /* Only bottom margin */
    max-width: 80vw;
    /* Responsive width */
}


/* =========================================
   ABOUT VISUAL (Tech/Blueprint Look)
   ========================================= */

.about-visual {
    width: 100%;
    min-height: 400px;
    height: 100%;
    background-color: var(--color-primary);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(255, 153, 0, 0.1) 0%, transparent 60%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    border-radius: 4px;
    box-shadow: 20px 20px 0 var(--color-secondary);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Decorative diagonal lines */
.about-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.02) 10px,
            rgba(255, 255, 255, 0.02) 20px);
    animation: pan-diag 60s linear infinite;
}

@keyframes pan-diag {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 20px);
    }
}

.visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.visual-content i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 0 20px rgba(255, 153, 0, 0.3));
    transition: all 0.5s ease;
}

.about-visual:hover .visual-content i {
    color: var(--color-secondary);
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 153, 0, 0.6));
}

/* Mobile adjust */
@media (max-width: 768px) {
    .about-visual {
        min-height: 300px;
        box-shadow: 10px 10px 0 var(--color-secondary);
    }
}


/* =========================================
   URGENT MOBILE FIXES
   ========================================= */

/* 1. Global Overflow Protection */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

/* 2. Nav Overlap Fix */
@media (max-width: 992px) {
    .main-nav {
        /* Ensure it is completely removed from flow and view when closed */
        visibility: hidden;
        opacity: 0;
        transition: right 0.4s ease-in-out, opacity 0.4s ease-in-out, visibility 0s 0.4s;
    }

    .main-nav.active {
        visibility: visible;
        opacity: 1;
        transition: right 0.4s ease-in-out, opacity 0.4s ease-in-out, visibility 0s;
        /* Re-assert right:0 from previous block if needed, but 'active' class usually handles it. 
           We will reinforce it here just in case. */
        right: 0;
    }
}


/* =========================================
   MOBILE HARD FIX (Viewport & Layout)
   ========================================= */

/* 1. Global Safety Net */
body,
html {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* 2. Mobile Specific Overrides */
@media (max-width: 768px) {

    /* Typography Control */
    h1,
    h2,
    h3 {
        word-break: break-word;
        hyphens: auto;
    }

    h1 {
        font-size: 2.2rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* Header & Logo Fix */
    .header-container {
        padding-top: 5px;
        padding-bottom: 5px;
        align-items: center;
    }

    .logo-img-header {
        max-height: 40px !important;
        width: auto !important;
    }

    /* Grid/Flex Fixes (Stats, Projects, etc.) */
    .stats-grid,
    .project-grid,
    .services-list,
    .news-grid,
    .fleet-grid,
    .cert-grid,
    .partner-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        grid-template-columns: 1fr !important;
        /* Safety for grid items */
        padding-left: 0 !important;
        padding-right: 0 !important;
        gap: 30px !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure stat items don't overflow */
    .stat-item {
        width: 100% !important;
        margin-bottom: 20px;
    }
}


/* =========================================
   MOBILE LOGO FINAL CONSTRAINT
   ========================================= */

@media (max-width: 992px) {

    /* 1. Header Container Safety */
    .header-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 20px !important;
        flex-wrap: nowrap !important;
    }

    /* 2. Logo Link Wrapper */
    .logo {
        flex-grow: 0;
        flex-shrink: 1;
        margin-right: 10px !important;
        padding: 0 !important;
        display: block;
        /* Ensure flex behavior works on parent */
    }

    /* 3. Logo Image Straitjacket */
    .logo-img-header {
        height: auto !important;
        width: auto !important;
        max-height: 50px !important;
        max-width: 70% !important;
        /* Never take more than 70% of available space */
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
}

/* Project Thumbnails */
.project-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.project-thumbnails img {
    width: 50px;
    height: 50px;
    /* Fixed height/width */
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    border: 2px solid transparent;
    margin-right: 10px;
    /* Spacing */
}

.project-thumbnails img:hover {
    opacity: 1;
    border-color: var(--color-secondary);
    transform: scale(1.05);
}

/* --- HORIZONTAL SLIDER LAYOUT --- */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}


.project-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
    width: 100%;
    cursor: grab;
    /* Enable grab cursor */
}

.project-slider:active {
    cursor: grabbing;
    /* Change cursor when dragging */
    scroll-behavior: auto;
    /* Disable smooth scroll for instant drag response */
    scroll-snap-type: none;
    /* Disable snap while dragging */
}

.project-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Override Grid to be Flex Item */
.project-slider .project-card {
    flex: 0 0 calc(33.333% - 15px);
    /* 3 items per row (Standard View) */
    scroll-snap-align: start;
    margin: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Ensure content stays in box */
    border-radius: 8px;
    /* Rounded corners */
    background: rgba(255, 255, 255, 0.05);
    /* Dark transparent bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Subtle shadow */
    color: #ffffff;
}

/* Project Card Content - Fix Text Layout */
.project-info {
    padding: 15px 20px !important;
    /* Force padding */
    box-sizing: border-box;
    text-align: left;
    flex-grow: 1;
}

.project-info h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    color: #ffffff;
    /* White Title */
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.project-info p {
    font-size: 0.9rem;
    color: #cccccc;
    /* Light gray text */
    margin-bottom: 10px;
    line-height: 1.4;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.project-info .location {
    font-weight: 500;
    color: var(--color-secondary);
    /* Accent color */
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Adjust image height in slider if needed */
.project-slider .project-img {
    height: 400px;
}

/* Navigation Buttons */
.slider-nav {
    background: var(--color-secondary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    flex-shrink: 0;
}

.slider-nav:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

@media (max-width: 1200px) {
    .project-slider .project-card {
        flex: 0 0 calc(50% - 10px);
        /* 2 items */
    }
}



@media (max-width: 900px) {
    .project-slider .project-card {
        flex: 0 0 calc(50% - 10px);
        /* 2 items */
    }
}

@media (max-width: 600px) {
    .project-slider .project-card {
        flex: 0 0 100%;
        /* 1 item */
    }

    .slider-nav {
        display: none;
        /* Hide arrows on mobile */
    }
}

/* STATS ALIGNMENT FIX (Phase 21) */
.stat-number-wrapper {
    height: 90px;
    /* Fixed height to align all labels below */
    display: flex;
    align-items: flex-end;
    /* Align numbers to bottom so they sit on same baseline */
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

.stat-number {
    margin-bottom: 0 !important;
    line-height: 1;
    display: inline-block;
}

.stat-label {
    margin-top: 0 !important;
    display: block;
}

/* --- MASTER FIX OVERRIDES --- */

/* 1. NEWS TEXT CUTOFF & SLIDER FIX */
.news-slider {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 20px !important;
    padding-bottom: 30px !important;
    scrollbar-width: none !important;
}

.news-card,
.news-item {
    flex: 0 0 calc(33.333% - 15px) !important;
    /* 3 items per row */
    width: auto !important;
    max-width: none !important;
    scroll-snap-align: start !important;
    background: white;
    padding: 20px;
    border-left: 4px solid var(--color-secondary);
    display: flex;
    flex-direction: column;
    height: auto;
}

/* Force text wrapping */
.news-card p,
.news-item p,
.news-card h3,
.news-item h3 {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
    padding-right: 0 !important;
}

@media (max-width: 1200px) {

    .news-card,
    .news-item {
        flex: 0 0 calc(33.333% - 15px) !important;
    }
}

@media (max-width: 900px) {

    .news-card,
    .news-item {
        flex: 0 0 calc(50% - 10px) !important;
        /* 2 items */
        max-width: none !important;
    }
}

@media (max-width: 600px) {

    .news-card,
    .news-item {
        flex: 0 0 100% !important;
        /* 1 item */
    }
}

/* 2. HEADER CENTERING */
.projects .section-header,
.section-header.center {
    text-align: center !important;
}

.projects .section-header h2,
.section-header h2 {
    text-align: center !important;
}

.projects .section-header .line,
.section-header .line {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --- NEWS SLIDER TRANSFORMATION --- */
.news .slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    width: 100%;
}

.news-slider {
    /* Enforce flex row for slider */
    display: flex !important;
    gap: 20px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    padding: 20px 5px !important;
    /* Padding for shadow */
    width: 100%;
    scrollbar-width: none;
    /* Hide scrollbar */
    cursor: grab;
    align-items: stretch;
    /* Ensure equal height cards */
}

.news-slider::-webkit-scrollbar {
    display: none;
}

.news-slider:active {
    cursor: grabbing;
}

/* Arrow visibility fix */
.news .slider-nav {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-width: 40px;
    /* Prevent shrink */
    z-index: 20;
}

@media (max-width: 600px) {
    .news .slider-nav {
        display: none !important;
        /* Hide on mobile like projects */
    }
}

/* --- FINAL NEWS SLIDER FIXES --- */

/* 1. Container Padding to prevent shadow/frame cutoff */
.news-slider {
    padding: 20px 0 !important;
    /* Ensure scroll snap still works well with padding */
    scroll-padding: 0 20px;
}

/* 2. Card Box Model & Overflow */
.news-card {
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow: visible !important;
    /* Allow shadow/content to show */
    margin: 0 10px !important;
    /* Spacing between cards */
    height: auto !important;
    /* Let content define height */
    min-height: 250px;
    /* Minimum height for consistency */
}

/* 3. Text Protection */
.news-card p,
.news-card h3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Remove any conflicting margins that might mess up the slider flow */
.news-slider .news-card:first-child {
    margin-left: 20px !important;
}

.news-slider .news-card:last-child {
    margin-right: 20px !important;
}