
/* Logo styling */
.logo-img {
    height: 45px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Adjust logo for mobile */
@media (max-width: 768px) {
    .logo-img {
        height: 38px;
        max-width: 160px;
    }
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    height: 80px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

@media (max-width: 768px) {
    .hero-logo-img {
        height: 60px;
        max-width: 200px;
    }
}
.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 35px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}



/* ===== RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2980b9;
    --accent-color: #e67e22;
    --light-gray: #f8f9fa;
    --medium-gray: #7f8c8d;
    --dark-gray: #34495e;
    --text-light: #bdc3c7;
    --rail-blue: #003d7a;
    --infrastructure-orange: #ff6b35;
}


body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
}


/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(41, 128, 185, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0 2rem;
    transition: all 0.3s ease;
}


.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
}

.logo {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}


.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}


.nav-menu a:hover {
    color: var(--secondary-color);
}

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

.nav-menu a:hover::after {
    width: 100%;
}


/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}


/* Search Bar */
.search-container {
    position: relative;
    margin-left: auto;
    margin-right: 1rem;
}

.search-input {
    padding: 8px 35px 8px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    width: 200px;
}

.search-input:focus {
    border-color: var(--secondary-color);
    width: 250px;
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
}

/* Services Overlay */
.services-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(30, 58, 95, 0.95);
    color: white;
    overflow: hidden;
    transition: height 0.4s ease;
    z-index: 999;
}

.services-overlay.active {
    height: 60vh;
}

.services-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-item {
    padding: 1.5rem;
    border-left: 3px solid var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(52, 73, 94, 0.8) 100%);
    color: white;
    padding: 150px 2rem 100px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-bg.active {
    opacity: 1;
}

/* Rail and Infrastructure Images */
.hero-bg:nth-child(1) {
    background-image: url('./images/Locomotive.jpg');
}

.hero-bg:nth-child(2) {
    background-image: url('./images/transit.jpg');
}

.hero-bg:nth-child(3) {
    background-image: url('./images/transport.jpg');
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

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

.hero-slide {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: var(--secondary-color);
    transform: scale(1.2);
}

.cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
}

.cta-button:hover {
    background: transparent;
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT SECTIONS ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 2rem;
}

.section {
    margin-bottom: 80px;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 300;
}


/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.service-card {
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(41,128,185,0.1)" stroke-width="2"/><circle cx="50" cy="50" r="25" fill="none" stroke="rgba(41,128,185,0.1)" stroke-width="1"/></svg>');
    opacity: 0.5;
    transition: all 0.3s ease;
}

.service-card:hover::after {
    transform: scale(1.2) rotate(45deg);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}


.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
    transition: left 0.3s ease;
}

.service-card:hover::before {
    left: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}


.service-card p {
    color: var(--medium-gray);
    line-height: 1.8;
}

/* ===== CASE STUDIES ===== */
.case-studies {
    background: var(--light-gray);
    padding: 80px 2rem;
}


.case-studies-container {
    max-width: 1200px;
    margin: 0 auto;
}

.case-study-slider {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.case-study-slide {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.case-study-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.case-study-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.8), rgba(30, 58, 95, 0.8));
}

.case-study-content {
    padding: 3rem;
}

/* Rail Project Images */
.case-study-slide.metro .case-study-image {
    background-image: url('./images/Locomotive.jpg');
}

.case-study-slide.freight .case-study-image {
    background-image: url('./images/Locomotive.jpg');
}

.case-study-slide.highspeed .case-study-image {
    background-image: url('./images/Locomotive.jpg');
}


.case-study-slide.active {
    display: block;
    animation: slideIn 0.5s ease;
}

.slider-controls {
    text-align: center;
    margin-top: 2rem;
}

.slider-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== TEAM SECTION ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}


.team-member:hover {
    transform: translateY(-10px);
}

.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border: 3px solid var(--secondary-color);
}

/* Professional headshots for rail industry team */
.team-avatar.gr {
    background-image: url("./images/graham.jpg");
}

.team-avatar.cp {
    background-image: url('./images/claire.jpg');
}

.team-avatar.dn {
    background-image: url('./images/dan.jpg');
}
.team-avatar.sh {
    background-image: url('./images/shane.jpeg');
}
.team-avatar.lr {
    background-image: url('https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&auto=format&fit=crop&w=300&q=80');
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9), rgba(52, 73, 94, 0.9)),
                url('./images/Locomotive.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 80px 2rem;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-slider {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.testimonial {
    display: none;
    padding: 2rem;
}

.testimonial.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.client-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: bold;
    color: var(--secondary-color);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: var(--secondary-color);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: var(--light-gray);
    padding: 80px 2rem;
}


.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    width: 100%;
    height: 400px;
    background-image: url('./images/Locomotive.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.1), rgba(30, 58, 95, 0.1));
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 300;
}


.about-text p {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}


.stat:hover {
    transform: translateY(-5px);
}


.stat-label {
    color: var(--medium-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== FORMS & INTERACTION ===== */
.contact-section {
    background: var(--light-gray);
    padding: 80px 2rem;
}


.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}


.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
    background: white;
}


.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
}

.submit-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Newsletter */
.newsletter {
    background: var(--secondary-color);
    color: white;
    padding: 60px 2rem;
    text-align: center;
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.newsletter-input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    outline: none;
}

.newsletter-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.newsletter-btn:hover {
    background: var(--dark-gray);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 60px 2rem 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: white;
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-gray);
    text-align: center;
    color: #95a5a6;
}

/* ===== UTILITY COMPONENTS ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 1rem;
}

/* Animated Counter */
.counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    display: block;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }


    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-container {
        display: none;
    }

    /* Hero */
    .hero {
        background-attachment: scroll;
        padding: 120px 1rem 80px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* Layout adjustments */
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        height: 250px;
        order: -1;
    }

    .services-content {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .testimonials {
        background-attachment: scroll;
    }

    .case-study-slide {
        margin: 0 1rem;
    }

    .case-study-image {
        height: 150px;
    }

    .case-study-content {
        padding: 2rem;
    }
}
