@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-soft: #f0f3f8;
    --text: #1e2430;
    --muted: #5f6b7a;
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --border: #dce3ee;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    --header-bg: #101827;
    --header-text: #ffffff;
    --footer-bg: #101827;
    --footer-text: #ffffff;
}

body.dark-mode {
    --bg: #0f1724;
    --surface: #162132;
    --surface-soft: #1d2a3d;
    --text: #f4f7fb;
    --muted: #b8c3d1;
    --primary: #5aa0ff;
    --primary-dark: #82b7ff;
    --border: #2b3a50;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --header-bg: #0b1220;
    --header-text: #ffffff;
    --footer-bg: #0b1220;
    --footer-text: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    color: var(--header-text);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
}

.brand {
    flex-shrink: 0;
}

#logo {
    width: 132px;
    height: auto;
    object-fit: contain;
}

.nav {
    margin-left: auto;
}

.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav a {
    color: var(--header-text);
    font-weight: 700;
    font-size: 0.98rem;
    padding: 8px 0;
}

.nav a.active,
.nav a:hover {
    color: #8bb9ff;
}

.dark-mode-toggle,
.mobile-menu {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.dark-mode-toggle:hover,
.mobile-menu:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
}

.dark-mode-toggle {
    font-size: 1.15rem;
    padding: 10px 12px;
    line-height: 1;
    flex-shrink: 0;
}

.mobile-menu {
    display: none;
    font-size: 1.25rem;
    padding: 8px 12px;
    line-height: 1;
}

.hero {
    padding: 28px 0 20px;
}

.slideshow-container {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow);
    background: #000;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: clamp(280px, 58vw, 620px);
    object-fit: cover;
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.15));
}

.caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    color: #ffffff;
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    font-weight: 700;
    text-align: left;
    max-width: 700px;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    cursor: pointer;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 1.5rem;
    display: grid;
    place-items: center;
}

.prev { left: 16px; }
.next { right: 16px; }

section {
    padding: 72px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 36px;
}

.section-heading h2,
.services-page h2,
.jobs h2,
.about h2,
.mission h2,
.why-choose h2,
.team h2,
.contact h2 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 3vw, 2.7rem);
    line-height: 1.2;
}

.section-heading p,
.services-page p,
.intro-text,
.about p,
.mission p,
.why-choose p,
.contact p {
    color: var(--muted);
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.section-action {
    margin-top: 28px;
    text-align: center;
}

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

.service-item,
.service,
.job-card,
.reason,
.team-member,
.contact-info,
.contact-form,
.careers-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.service-item,
.service {
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.12);
}

body.dark-mode .service-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-item img,
.service img,
.reason img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto 16px;
}

.service-item h3,
.service h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.service-item p,
.service p,
.service-item ul li,
.job-card p,
.job-card li,
.reason p,
.team-member p {
    color: var(--muted);
}

.service-item ul {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

.service-item ul li {
    padding: 6px 0;
}

.careers-box {
    padding: 42px 24px;
    text-align: center;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 34px;
}

.portfolio-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.12);
}

body.dark-mode .portfolio-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--surface-soft);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-info {
    padding: 20px 22px 24px;
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--surface-soft);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.portfolio-info h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.portfolio-info p {
    color: var(--muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Testimonials */
.testimonials {
    text-align: center;
}

.testimonial-carousel {
    max-width: 700px;
    margin: 34px auto 0;
    position: relative;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-card {
    min-width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
    margin: 0;
    text-align: left;
    box-sizing: border-box;
}

.testimonial-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
    margin: 0 0 16px;
}

.testimonial-card footer {
    color: var(--muted);
    font-size: 0.95rem;
    font-style: normal;
    background: none;
    margin: 0;
    padding: 0;
}

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

.testimonial-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.testimonial-dots button.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
    margin-top: 34px;
    align-items: start;
}

.contact-info,
.contact-form {
    padding: 24px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1rem;
    outline: none;
}

.map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 18px;
    margin-top: 28px;
    box-shadow: var(--shadow);
}

/* Jobs / About / Team */
.jobs {
    text-align: center;
}

.job-listings,
.reasons-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 34px;
}

.job-card,
.reason,
.team-member {
    padding: 24px;
}

.job-card {
    text-align: left;
}

.team-member img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
}

.about,
.mission,
.why-choose,
.team {
    text-align: center;
}

/* Footer */
footer {
    margin-top: 48px;
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 28px 0;
}

footer p {
    margin: 0;
}

footer a {
    color: #8bb9ff;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

/* Safe fade-in so page still shows even if JS fails */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.ready {
    opacity: 0;
    transform: translateY(22px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .nav {
        order: 4;
        width: 100%;
        display: none;
        margin-left: 0;
    }

    .nav.open {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 12px;
    }

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

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

    #logo {
        width: 112px;
    }

    .caption {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .prev,
    .next {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }

    .container {
        width: min(1120px, calc(100% - 24px));
    }
}

@media (max-width: 520px) {
    .header-inner {
        gap: 12px;
    }

    .dark-mode-toggle,
    .mobile-menu {
        padding: 9px 10px;
    }

    .slide img {
        height: 260px;
    }

    .service-item,
    .service,
    .job-card,
    .reason,
    .team-member,
    .contact-info,
    .contact-form,
    .careers-box {
        padding: 20px;
    }
}
