/* ======================= */
/* 0. HELPER STYLES        */
/* ======================= */
.container-sedang {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
.text-center { 
    text-align: center; 
}
.page-hero-section {
    background-image: url('../images/safety/1c1043c2729e86ac21898f9ed40e1be3b4f5d08c.png'); 
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 140px 20px 80px 20px; 
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 1;
}
.page-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 100%);
    z-index: -1;
}
.page-title {
    font-family: var(--font-montserrat);
    font-size: 44px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 10px;
}
.page-subtitle {
    font-family: var(--font-inter);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0;
    line-height: 1.6;
}
.page-hero-section .container-sedang {
    text-align: left;
    margin-left: 30px;
    margin-right: 30px;
}
.text-center { text-align: center; }

.section-tagline {
    font-family: var(--font-inter);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}
.section-title {
    font-family: var(--font-montserrat);
    font-size: 38px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* ======================== */
/* 2. PROJECTS CAROUSEL     */
/* ======================== */
.projects-carousel-section {
    padding: 80px 0;
    position: relative;
    background-color: #f8f9fa;
}
.project-carousel {
    position: relative;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden; 
}
.slides-container {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease-in-out;
}
.project-slide {
    flex: 0 0 calc((100% - 90px) / 4); 
    min-width: calc((100% - 90px) / 4); 
    height: 400px;
    cursor: pointer;
    perspective: 1000px; 
    background-color: transparent;
    border-radius: 20px;
}
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.5, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.project-slide:hover .card-inner {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
    border-radius: 20px;
}
.card-front { color: white; }
.card-front img { width: 100%; height: 100%; object-fit: cover; }
.front-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}
.front-content h3 { 
    font-family: var(--font-montserrat); 
    font-weight: 700; 
    font-size: 1.4rem;
    margin: 0; 
}
.card-back {
    background-color: #FFFFFF;
    color: #333;
    transform: rotateY(180deg); 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}
.back-content .tag-scope { 
    background-color: #e0e0e0; 
    color: #555; 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    display: inline-block; 
}
.back-content .project-title { 
    font-family: var(--font-montserrat); 
    font-weight: 700; 
    font-size: 1.3rem;
    color: var(--text-dark); 
    margin: 12px 0 8px 0; 
}
.back-content .project-client { 
    font-size: 0.85rem;
    color: #666; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 20px; 
}
.back-content .project-client svg { stroke: var(--primary-blue); }
.project-cta-button { 
    background: var(--primary-blue); 
    color: white; 
    padding: 10px 25px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 600; 
    font-family: var(--font-inter); 
    transition: all 0.3s ease;
    border: none; 
    cursor: pointer;
}
.project-cta-button:hover { transform: scale(1.05); }

.carousel-nav {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1480px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}
.nav-btn {
    pointer-events: auto;
    background: white;
    color: var(--primary-blue);
    border: none; 
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex; 
    align-items: center;
    justify-content: center;
}
.nav-btn:hover {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 147, 255, 0.3); 
    transform: scale(1.05); 
}
.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #eee; 
    color: #aaa;
}

/* ================ */
/* 3. STYLE MODAL   */
/* ================ */
.capability-modal-overlay { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.capability-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-container {
    position: relative;
    background-color: var(--bg-light);
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.capability-modal-overlay.show .modal-container {
    transform: scale(1);
}
.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
}
.modal-close-button:hover {
    color: var(--text-dark);
}
.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
}
.modal-gallery .main-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}
.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
}
.thumbnail-images .thumbnail {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: opacity 0.3s, border-color 0.3s;
}
.thumbnail-images .thumbnail:hover {
    opacity: 1;
}
.thumbnail-images .thumbnail.active {
    opacity: 1;
    border-color: var(--primary-blue);
}
.modal-description h2 {
    font-family: var(--font-montserrat);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 15px;
}
.modal-description p {
    font-family: var(--font-inter);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-gray);
}

/* ================ */
/* 4. RESPONSIF     */
/* ================ */
@media (max-width: 1200px) {
    .project-slide {
        flex-basis: calc((100% - 60px) / 3); 
        min-width: calc((100% - 60px) / 3); 
    }
}
@media (max-width: 992px) {
    .page-hero-section {
        padding: 120px 20px 70px 20px;
        min-height: 300px;
    }
    .page-title {
        font-size: 40px;
    }
    .page-hero-section .container-sedang {
        margin-left: 0;
        margin-right: 0;
    }

    .project-slide {
        flex-basis: calc((100% - 30px) / 2); 
        min-width: calc((100% - 30px) / 2); 
    }
    .front-content h3 { font-size: 1.3rem; }
    .back-content .project-title { font-size: 1.2rem; }
}
@media (max-width: 768px) {
    .projects-carousel-section {
        padding: 60px 0; 
    }
    .section-title {
        font-size: 30px;
    }

    .page-hero-section {
        padding: 100px 20px 60px 20px;
        min-height: 250px;
    }
    .page-title {
        font-size: 32px;
    }
    .page-subtitle {
        font-size: 16px;
    }

    .project-slide {
        flex-basis: 100%; 
        min-width: 100%;
        height: 380px;
    }
    .slides-container { 
        gap: 15px; 
    }
    .project-carousel { 
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box; 
    }
    .carousel-nav { 
        width: 100%; 
    }

    .modal-body {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
    .modal-description h2 {
        font-size: 24px;
    }
}