:root {
    --brand-orange: #F5821F;
    --brand-orange-dark: #D96D0F;
    --brand-purple: #5B2C82;
    --brand-purple-dark: #452066;
    --text-dark: #2b2b2b;
    --bg-light: #f7f5f3;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    position: relative;
    z-index: 1000;   /* much higher than anything else on the page */
    background: #1a1a2e;
    padding: 16px 0;
    border-bottom: 3px solid var(--brand-orange);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { color: #fff; font-size: 22px; font-weight: 700; text-decoration: none; display: flex; align-items: center; }
.logo img { height: 48px; }
.main-nav a { color: #e6d9f0; text-decoration: none; margin-left: 22px; font-size: 14px; }
.main-nav a:hover { color: var(--brand-orange); }

/* Hero with background image + dark overlay */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 110px 20px;
    text-align: center;
    color: #fff;
    min-height: 700px;
    display: flex;
    align-items: flex-end;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30,20,45,0.85) 0%, rgba(30,20,45,0.15) 60%, transparent 100%);
}
.hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 20px;
}
.hero-eyebrow { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-orange); font-weight: 600; }
.hero h1 { font-size: 42px; margin: 14px 0; color: #fff; }
.hero-sub { color: #e5d9ee; font-size: 16px; margin-bottom: 25px; }
.hero-btn {
    display: inline-block;
    background: var(--brand-orange);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}
.hero-btn:hover { background: var(--brand-orange-dark); transform: translateY(-2px); }

/* .hero-slider {
    position: relative;
    min-height: 75vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
} */

.hero-slider {
    position: relative;
    z-index: 1;   /* explicitly low, contained below header */
    min-height: 75vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.slide.active { opacity: 1; }

.hero-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30,20,45,0.85) 0%, rgba(30,20,45,0.15) 60%, transparent 100%);
    z-index: 1;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 750px;
    text-align: center;
    padding: 0 20px;
}
.hero-eyebrow { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-orange); font-weight: 600; }
.hero-overlay h1 { font-size: 42px; margin: 14px 0; color: #fff; }
.hero-sub { color: #e5d9ee; font-size: 16px; margin-bottom: 25px; }
.hero-btn {
    display: inline-block;
    background: var(--brand-orange);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}
.hero-btn:hover { background: var(--brand-orange-dark); transform: translateY(-2px); }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}
.dot.active { background: var(--brand-orange); }

@media (max-width: 600px) {
    .hero-slider { min-height: 400px; }
    .hero-overlay h1 { font-size: 26px; }
}

.hero-slider {
    position: relative;
    min-height: 75vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide.active { opacity: 1; z-index: 1; }

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30,20,45,0.85) 0%, rgba(30,20,45,0.15) 60%, transparent 100%);
    z-index: 0;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 750px;
    text-align: center;
    padding: 0 20px;
}

.about-section {
    padding: 70px 0;
    background: #fff;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 55px;
    align-items: center;
}

.about-eyebrow {
    color: #999;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
}
.about-heading {
    font-size: 32px;
    color: var(--brand-purple);
    line-height: 1.3;
    margin-bottom: 20px;
}
.about-text p {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
    text-align: justify;
}

.video-wrapper {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.video-wrapper img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--brand-orange);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(245,130,31,0.6);
    animation: pulse 2s infinite;
    transition: background 0.2s;
}
.play-btn:hover { background: var(--brand-orange-dark); }

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(245,130,31,0.55); }
    70%  { box-shadow: 0 0 0 18px rgba(245,130,31,0); }
    100% { box-shadow: 0 0 0 0 rgba(245,130,31,0); }
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-heading { font-size: 26px; }
}

.chairman-section {
    background: #4a5259;
    padding: 60px 0;
}
.chairman-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 45px;
    align-items: center;
}
.chairman-photo img {
    width: 100%;
    border-radius: 4px;
    display: block;
}
.chairman-info h2 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 8px;
}
.chairman-title, .chairman-company {
    color: var(--brand-orange);
    font-size: 15px;
    margin-bottom: 2px;
}
.chairman-message {
    color: #d5d8da;
    font-size: 15px;
    margin-top: 18px;
    line-height: 1.8;
}

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

/* Section */
.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 26px; margin-bottom: 35px; color: var(--brand-purple); }

/* Project cards grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--brand-purple);
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    border-bottom: 4px solid var(--brand-orange);
    transition: transform 0.2s;
}
.project-card:hover { transform: translateY(-4px); }
.project-card img { width: 100%; height: 220px; object-fit: cover; }
.project-card .card-body { padding: 22px; }
.project-card h3 { font-size: 17px; margin-bottom: 6px; color: var(--brand-orange); }
.project-card .location { font-size: 13px; color: #d9c8e5; }

.project-card {
    background: #fff;
    color: var(--text-dark);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.project-card .img-wrap { height: 280px; }
.project-card img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s;
}
.project-card:hover img { transform: scale(1.08); }

.project-card .status-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--brand-orange);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
    letter-spacing: 0.5px; z-index: 2;
}
.project-card .card-body { padding: 22px; }
.project-card h3 { font-size: 18px; margin-bottom: 6px; color: var(--brand-purple); }
.project-card .location { font-size: 13px; color: #777; }
.project-card .location { font-size: 14px; }
.project-card h3 { font-size: 20px; }

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
}

/* Filters */
.filter-bar { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}
.filter-bar button {
    padding: 8px 18px;
    background: var(--brand-orange);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
.filter-bar button:hover { background: var(--brand-orange-dark); }

/* Project detail */
.project-detail-header { background: var(--brand-purple); color: #fff; padding: 40px 0; }
.project-detail-header h1 { color: var(--brand-orange); }
.spec-list { list-style: none; margin-top: 20px; }
.spec-list li { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.spec-list li strong { display: inline-block; width: 160px; color: var(--brand-purple); }

/* Inquiry form */
.inquiry-form {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    border-top: 4px solid var(--brand-orange);
}
.inquiry-form h3 { color: var(--brand-purple); margin-bottom: 15px; }
.inquiry-form .form-group { margin-bottom: 14px; }
.inquiry-form label { display: block; font-size: 13px; margin-bottom: 5px; font-weight: 600; }
.inquiry-form input, .inquiry-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}
.inquiry-form button {
    background: var(--brand-orange);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
.inquiry-form button:hover { background: var(--brand-orange-dark); }

/* Footer */
.site-footer {
    background: var(--brand-purple-dark);
    color: #d9c8e5;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}

/* Status / error messages */
.status-msg {
    background: #d4edda;
    color: #155724;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 13px;
}
.error-text { color: #e3342f; font-size: 12px; margin-top: 4px; }

.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}
@media (max-width: 768px) {
    .contact-split { grid-template-columns: 1fr; }
}

.info-item { margin-bottom: 18px; }
.info-item strong { color: var(--brand-purple); font-size: 14px; display: block; margin-bottom: 3px; }
.info-item p { color: #555; font-size: 14px; }

.why-us {
    display: flex;
    gap: 35px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}
.why-item { display: flex; flex-direction: column; }
.why-num { font-size: 30px; font-weight: 700; color: var(--brand-orange); }
.why-item span:last-child { font-size: 13px; color: #777; }

.inquiry-form { max-width: none; } /* let grid column control width now, not fixed px */

/* ===== Responsive ===== */

/* Header - stack nav on mobile */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 12px;
    }
    .main-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .main-nav a { margin-left: 0; }
}

/* Hero scales down */
@media (max-width: 600px) {
    .hero { padding: 60px 16px; }
    .hero h1 { font-size: 26px; }
    .hero-sub { font-size: 14px; }
    .hero-btn { padding: 10px 22px; font-size: 14px; }
}

/* Spec list - stop fixed label width from cramping */
@media (max-width: 600px) {
    .spec-list li strong { display: block; width: auto; margin-bottom: 2px; }
}

/* Section title / padding tighten on mobile */
@media (max-width: 600px) {
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }
}

/* Tablet - 2 per row */
@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile - 1 per row */
@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.carousel-wrapper {
    position: relative;
    padding: 0 55px;
}

.carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
    flex: 0 0 340px;
    scroll-snap-align: start;
}

.carousel-slide .img-wrap { height: 340px; } /* taller image now */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-purple);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.carousel-arrow:hover { background: var(--brand-orange); }
.carousel-arrow.prev { left: 0; }
.carousel-arrow.next { right: 0; }

@media (max-width: 600px) {
    .carousel-slide { flex: 0 0 260px; }
    .carousel-slide .img-wrap { height: 220px; }
    .carousel-wrapper { padding: 0 45px; }
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.carousel-slide {
    flex: 0 0 420px;
}

.carousel-slide .img-wrap {
    height: 480px;
}

.carousel-slide .card-body {
    padding: 24px;
}
.carousel-slide h3 {
    font-size: 21px;
}

@media (max-width: 900px) {
    .container-wide { padding: 0 45px; }
    .carousel-slide { flex: 0 0 280px; }
    .carousel-slide .img-wrap { height: 340px; }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    position: relative;
    color: #cfd2e0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 16px;
    margin-left: 0;
    transition: color 0.2s;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 2px;
    background: var(--brand-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover {
    color: #fff;
}
.main-nav a:hover::after {
    transform: scaleX(1);
}

/* Optional: mark current page active */
.main-nav a.active {
    color: var(--brand-orange);
}
.main-nav a.active::after {
    transform: scaleX(1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Hamburger button - hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 20;
}
.nav-toggle span {
    width: 26px;
    height: 2px;
    background: #fff;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a2e;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .main-nav.open {
        max-height: 400px;
    }
    .main-nav a {
        width: 100%;
        padding: 14px 24px;
        margin: 0;
        text-transform: none;
        font-size: 15px;
    }
    .main-nav a::after { display: none; }
}

.main-nav {
    z-index: 1001;   /* sits above the header itself too */
}

@media (max-width: 600px) {
    .filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    .filter-bar select,
    .filter-bar input,
    .filter-bar button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .project-card .img-wrap {
        height: 200px;   /* shorter than desktop's 260-340px */
    }
    .project-card h3 {
        font-size: 17px;
    }
    .project-card .location {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .section { padding: 30px 0; }
    .section-title { font-size: 22px; margin-bottom: 20px; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .project-card { border-radius: 10px; }
}

/* ===== Project detail page - mobile polish ===== */
@media (max-width: 600px) {
    .project-detail-header { padding: 25px 0; }
    .project-detail-header h1 { font-size: 22px; }
    .project-detail-header p { font-size: 13px; }

    .container.section { padding: 20px 16px; }

    .detail-hero-img {
        max-height: 240px;
    }

    .detail-grid h2 { font-size: 20px; margin-top: 25px; }
    .spec-list li { padding: 10px 0; font-size: 13px; }
}

/* Base rule (all screens) - give the main image a proper class instead of inline style */
.detail-hero-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 25px;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .carousel-wrapper {
        padding: 0 42px;   /* room for arrows without cutting the card */
    }

    .carousel-slide {
        flex: 0 0 calc(100% - 0px);   /* one full-width card per view */
    }

    .carousel-slide .img-wrap {
        height: 220px;
    }

    .carousel-slide h3 {
        font-size: 17px;
    }

    .carousel-arrow {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    .carousel-arrow.prev { left: 4px; }
    .carousel-arrow.next { right: 4px; }
}