/* ================================================= */
/* 1. GLOBAL STYLES & SETUP */
/* ================================================= */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;600;700;900&display=swap');

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Lato', sans-serif;
    background-color: #f8f9fa;
    color: #495057;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1500px; /* Lebar maksimum konsisten untuk semua seksyen */
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    color: #090909;
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title span {
    color: #C8102E;
}

.title-decorator {
    width: 100px;
    height: 3px;
    margin: 0 auto 40px auto;
    background-image: linear-gradient(to right, #032054 50%, rgba(255,255,255,0) 0%);
    background-position: bottom;
    background-size: 8px 2px;
    background-repeat: repeat-x;
}

/* ================================================= */
/* 2. HEADER */
/* ================================================= */
.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-top: 3px solid #f0f2ff;
}

.header-container {
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container img {
    height: 50px;
    width: auto;
    vertical-align: middle;
}

.main-nav, .nav-links {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 25px;
    border-right: 1.8px dashed #e57373;
    opacity: 0.5;
}

.nav-link {
    display: block;
    padding: 15px 22px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #C8102E;
}

.arrow-down {
    display: inline-block;
    border-style: solid;
    border-width: 0 1.5px 1.5px 0;
    border-color: #495057;
    padding: 2.5px;
    margin-left: 6px;
    transform: rotate(45deg);
    position: relative;
    top: -2px;
    transition: border-color 0.3s ease;
}

.nav-link:hover .arrow-down,
.nav-link.active .arrow-down {
    border-color: #C8102E;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin: 5px 0 0 0;
    min-width: 220px;
    z-index: 1001;
    border-radius: 4px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: #C8102E;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle svg {
    fill: #333;
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .nav-links.is-open { display: flex; }
    .nav-item {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-item::after { display: none; }
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        min-width: 100%;
        padding: 0;
        background-color: #f9f9f9;
    }
    .dropdown:hover .dropdown-menu { display: none; }
    .dropdown.is-open .dropdown-menu { display: block; }
    .menu-toggle { display: block; }
}

/* ================================================= */
/* 3. MAIN PAGE SECTIONS (HOMEPAGE) */
/* ================================================= */

/* ========== Hero Slider Section ========== */
.hero-slider {
    width: 100%;
    height: 45vh;
    background-color: #ccc;
}

.swiper.heroSwiper {
    width: 100%;
    height: 100%;
}

.hero-slider .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.0);
    transition: transform 8s ease-out;
}

.swiper-slide-active .slide-bg {
    transform: scale(1.15);
}

.swiper-pagination-bullet {
    background-color: #ffffff;
    opacity: 0.7;
    width: 10px;
    height: 10px;
}

.swiper-pagination-bullet-active {
    background-color: #C8102E;
    opacity: 1;
}

/* ========== Info Cards Section ========== */
.info-section {
    background-color: #032054;
    padding: 40px 0 70px 0;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/operation-rotate-scaled.png'); /* Overlay bunga */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.2; /* Ditingkatkan dari 0.1 kepada 0.2 */
    z-index: 0;
}

.info-cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.info-card {
    background-color: rgba(255, 255, 255, 0.82);
    border-radius: 12px;
    padding: 18px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex: 1;
    color: #333333;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.info-card h3 {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 8px;
    color: #032054;
    font-weight: 700;
}

.info-card p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.info-card p:last-child { margin-bottom: 0; }
.info-card em { font-size: 11px; color: #555; }
.info-card strong { font-weight: 700; }

.curve-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.curve-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
}

.curve-divider .shape-fill-main {
    fill: #f8f9fa;
}

@media (max-width: 992px) {
    .info-cards-container { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .info-section { padding: 40px 0 60px 0; }
    .info-cards-container { flex-direction: column; align-items: center; }
}

/* ========== Our Services Section ========== */
.services-section {
    padding: 20px 0 60px 0;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.services-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 5px;
}

.tab-link {
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #032054;
    background-color: #e9ecef;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.tab-link:not(.active):hover {
    background-color: #ced4da;
    transform: translateY(-2px);
}

.tab-link.active {
    background-color: #032054;
    color: #ffffff;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

.service-card {
    position: relative;
    height: 380px;
    border-radius: 15px;
    overflow: hidden;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background-size: cover;
    background-position: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.service-card:hover {
    transform: scale(1.05);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
}

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, #032054 40%, rgba(3, 32, 84, 0));
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
}

.service-card:hover .card-content::before {
    opacity: 0;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.card-content p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* ========== Press Release Section ========== */
.press-section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.press-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/operation-rotate.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(2px);
    opacity: 0.5;
    z-index: -1;
}

.press-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.press-card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
}

.card-image-wrapper {
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.press-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-text-content {
    padding: 20px;
}

.card-text-content h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    height: 3.0em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.calendar-icon {
    width: 14px;
    height: 14px;
    fill: #888;
}

@media (max-width: 992px) {
    .press-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ========== See More Button Styling ========== */
.see-more-container {
    text-align: center;
    margin-top: 40px;
}

.see-more-btn {
    display: inline-block;
    background-color: #C8102E;
    color: #ffffff;
    padding: 12px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.see-more-btn:hover {
    background-color: #A80019;
    transform: translateY(-2px);
}

/* ========== MFA News Section ========== */
.mfa-news-section {
    padding: 60px 0;
    background-color: #f0f2f5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-card::before {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-48 0c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-24 40c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm24 0c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm24 0c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm24 0c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7z" fill="%23eee" fill-opacity="0.4" fill-rule="evenodd"/%3E%3C/svg%3E');
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.news-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #212529;
    z-index: 1;
}

.news-card .card-meta {
    z-index: 1;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ========== Social Media Section ========== */
.social-media-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.social-feed-card {
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    height: 800px; /* Tetapkan ketinggian seragam */
}

.facebook-feed {

}

.x-feed {
    overflow-y: auto; /* Benarkan scroll jika kandungan X panjang */
}

@media (max-width: 992px) {
    .social-grid {
        grid-template-columns: 1fr;
    }
    .social-feed-card {
        height: 600px;
    }
}

/* ========== Latest News From Mission Section ========== */
.mission-news-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.mission-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.07);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mission-card-image {
    width: 100%;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.mission-card-image img {
    width: 100%;
    display: block;
}

.mission-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mission-card-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    line-height: 1.4;
    margin: 0 0 10px 0;
    flex-grow: 1;
}

.mission-card-content .byline {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 8px 0;
}

.mission-card-content .date-stamp {
    font-size: 12px;
    color: #8a95a1;
    margin: 0;
}

@media (max-width: 1200px) {
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ========== Career Section ========== */
.career-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.career-container {
    display: flex;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.career-promo {
    flex: 0 0 25%;
    background-color: #032054;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

.career-promo h2 {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    z-index: 2;
}

.career-links {
    flex: 1;
    background: linear-gradient(90deg, #e53935, #c8102e);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 40px 20px;
    position: relative;
}

.career-promo::before, .career-links::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../images/operation-rotate-scaled.png');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
}

.career-card {
    background-color: #ffffff;
    border-radius: 20px;
    width: 160px;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.career-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.career-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.career-card:hover .career-icon {
    transform: scale(1.1);
}

.career-card p {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 992px) {
    .career-container {
        flex-direction: column;
    }
    .career-links {
        padding: 30px 15px;
        flex-wrap: wrap;
        gap: 15px;
    }
    .career-card {
        width: 45%;
        height: auto;
    }
}

@media (max-width: 767px) {
    .career-card {
        width: 100%;
    }
}

/* ========== Partners Section ========== */
.partners-section {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.partners-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/operation-rotate.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(2px);
    opacity: 0.5;
    z-index: -1;
}

.partners-swiper .swiper-wrapper {
    align-items: center;
    transition-timing-function: linear;
}

.partners-swiper .swiper-slide {
    width: auto;
    text-align: center;
    background: transparent;
}

.partners-swiper img {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.3s ease;
}

.partners-swiper img:hover {
    filter: grayscale(0%) opacity(1);
}

/* ========== Footer Section ========== */
.main-footer {
    position: relative;
    padding: 80px 0;
    color: #ffffff;
    overflow: hidden;
}

.footer-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.footer-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(3, 32, 84, 0.4), rgba(3, 32, 84, 0.6));
    z-index: 2;
}

.main-footer .container {
    position: relative;
    z-index: 3;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 40px;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 30px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;
}

.footer-title::after {
    content: '⏷';
    font-size: 20px;
    color: #C8102E;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 10px;
}
.footer-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-image: linear-gradient(to right,
    #FFC72C 45%,
    transparent 45%,
    transparent 55%,
    #FFC72C 55%
    );
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column li {
    margin-bottom: 12px;
}
.footer-column a {
    color: #e9ecef;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-column a:hover {
    color: #ffffff;
}

.quicklinks-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Stail untuk pautan Agensi dan Senarai Kenalan */
.agency-link {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.footer-column .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #e9ecef; /* Warisi warna teks pautan */
    line-height: 1.6; /* Selaraskan ketinggian baris */
}

.footer-column .contact-icon {
    flex-shrink: 0;
    width: 20px;
    margin-top: 4px; /* Selaraskan ikon dengan teks */
    fill: #C8102E;
}

/* Pastikan 'span' dalam contact-item berkelakuan betul */
.footer-column .contact-item span {
    flex-grow: 1;
    color: #e9ecef;
}

.agency-link img {
    flex-shrink: 0;
    width: 40px;
    margin-top: 2px;
}

.contact-icon {
    flex-shrink: 0;
    width: 20px;
    margin-top: 2px;
    fill: #C8102E;
}

.sub-footer {
    background-color: #021438;
    color: #adb5bd;
    padding: 15px 0;
    font-size: 13px;
}
.sub-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.sub-footer p { margin: 0; }
.sub-footer a { color: #adb5bd; text-decoration: none; }
.sub-footer a:hover { text-decoration: underline; }

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .quicklinks-container {
        grid-template-columns: 1fr;
    }
    .sub-footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== Page Content Wrapper (untuk Sticky Footer) ========== */
.page-content-wrapper {
    position: relative;
    z-index: 1;
    flex-grow: 1; /* Arahkan wrapper untuk meregang & mengisi ruang */
}

/* ========== History Page Styling ========== */

/* Latar belakang parallax kini menggunakan kelas yang spesifik */
.history-parallax-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/operation-rotate.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.15;
    z-index: -1;
}

/* Banner Halaman */
.page-banner {
    width: 100%;
    padding: 80px 0;
    background: linear-gradient(to bottom,
    rgba(200, 16, 46, 0.65),
    rgba(255, 199, 44, 0.65)
    );
    text-align: center;
    color: #032054;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/operation-rotate.png');
    background-size: cover;
    background-position: center;
    opacity: 0.34;
    z-index: 1;
}

.page-banner .container {
    position: relative;
    z-index: 2;
}

.page-banner h1 {
    font-size: 42px;
    font-weight: 900;
    margin: 0 0 10px 0;
    text-shadow: 0 1px 3px rgba(255,255,255,0.2);
}

.page-banner p {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

/* Kandungan Sejarah (Padding dikurangkan) */
.history-content-section, .locations-section {
    padding: 40px 0; /* DIKURANGKAN dari 60px */
    background-color: transparent;
}

.history-card {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.history-card h2 {
    margin-top: 0;
    font-size: 28px;
    color: #032054;
}

.history-card p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.location-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.location-card img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

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

.location-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #ffffff;
    padding: 40px 15px 15px 15px;
    text-align: center;
}

.location-caption p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Ringkasan (dibuang rupa 'kad') */
.locations-summary {
    text-align: left;
    /*max-width: 900px; !* Lebar dikekalkan untuk readability *!*/
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 40px;
    border-radius: 15px;
    box-sizing: border-box;
}

.locations-summary p {
    font-size: 16px;
    line-height: 1.8;
    color: #495057; /* Warna teks lebih gelap untuk kontras */
    margin: 0;
}

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

/* ========== History Missions Section ========== */
.missions-section {
    padding: 20px 0 60px 0;
    background-color: transparent;
}

.missions-grid {
    /* max-width dan margin dibuang untuk jadi full-width */
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mission-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.mission-card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 0 1 22%;
    min-width: 280px;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.mission-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.mission-caption {
    padding: 15px;
}

.mission-caption p {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1200px) {
    .mission-card {
        flex-basis: 40%;
    }
}

@media (max-width: 767px) {
    .mission-card {
        flex-basis: 100%;
    }
}

/* ========== Legal Framework Page Styling ========== */
.legal-content-section {
    position: relative;
    padding: 60px 0;
    background-color: #032054; /* Latar belakang biru */
    color: #ffffff; /* Teks putih */
    overflow: hidden;
}

/* Overlay gambar yang sama seperti History */
.legal-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/operation-rotate.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1; /* Opacity rendah untuk efek samar */
    z-index: 0;
}

/* Pastikan kandungan di atas overlay */
.legal-content-section .container {
    position: relative;
    z-index: 1;
}

.legal-content-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    border-left: 4px solid #C8102E; /* Garisan hiasan merah */
    padding-left: 15px;
}

.legal-content-section h2:not(:first-child) {
    margin-top: 40px; /* Jarak antara dua tajuk */
}

.legal-content-section ul {
    list-style: disc;
    padding-left: 25px;
    margin: 0;
}

.legal-content-section ul li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.7;
}

/* ========== Vision & Mission Page Styling ========== */
.vm-section {
    padding: 60px 0;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

/* Corak bunga samar di latar belakang */
.vm-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/operation-rotate.png');
    opacity: 0.12; /* Opacity rendah untuk efek samar */
    z-index: 0;
}

.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.vm-card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 40px 30px;
    text-align: center;
}

.vm-card h2 {
    margin-top: 0;
    font-size: 24px;
    font-weight: 900;
    color: #032054;
}

.vm-decorator {
    color: #C8102E;
    font-size: 24px;
    margin: 15px 0;
}

.vm-card p {
    font-size: 16px;
    line-height: 1.8;
    color: #495057;
    margin: 0;
}

/* Responsive */
@media (max-width: 767px) {
    .vm-grid {
        grid-template-columns: 1fr; /* 1 lajur pada telefon */
    }
}

/* ========== Roles & Function Page Styling ========== */

/*
   Gunakan padding yang sama seperti .vm-section atau .history-content-section
   untuk konsistensi.
*/
.page-content-section {
    padding: 60px 0;
    position: relative; /* Diperlukan supaya z-index berfungsi */
    z-index: 2; /* Pastikan kandungan di atas parallax bg */
}

/*
   Ini adalah stail utama untuk kad kandungan,
   diinspirasikan oleh .vm-card dan .history-card
*/
.content-card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 40px;
}

.content-card p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-top: 0;
    margin-bottom: 30px; /* Tambah jarak sebelum senarai */
}

.content-card ul {
    list-style: none; /* Buang bullet points default */
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* 1 lajur secara default */
    gap: 15px;
}

.content-card ul li {
    position: relative;
    padding-left: 35px; /* Ruang untuk ikon 'tick' */
    font-size: 16px;
    line-height: 1.7;
    color: #495057;
}

/* Tambah ikon 'tick' atau 'chevron' sebelum setiap item senarai
   untuk menjadikannya kelihatan lebih kemas.
*/
.content-card ul li::before {
    content: '✔'; /* Anda boleh tukar kepada '❯' atau '»' */
    position: absolute;
    left: 0;
    top: 0;
    color: #C8102E; /* Guna warna tema merah */
    font-weight: 700;
    font-size: 18px;
    line-height: 1.6; /* Selaraskan dengan teks */
}

/* Media query untuk paparan lebih besar (cth: 2 lajur pada desktop) */
@media (min-width: 768px) {
    .content-card ul {
        grid-template-columns: 1fr 1fr; /* 2 lajur */
        gap: 20px 30px; /* Jarak baris dan lajur */
    }
}

/* ========== Strategic Thrusts Page Styling ========== */

.strategic-thrust-card {
    display: flex; /* Aktifkan Flexbox untuk buat 2 kolum */
    padding: 0;    /* Buang padding asal .content-card */
    overflow: hidden; /* Pastikan gambar kekal di dalam radius */
}

/* Kolum 1: Bahagian Teks */
.strategic-thrust-content {
    flex: 1 1 55%; /* Ambil 55% lebar */
    padding: 40px; /* Letak padding di sini */
}

/* Stail senarai yang sama seperti 'roles-and-function' */
.strategic-thrust-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* 1 kolum sahaja sudah cukup */
    gap: 15px;
}

.strategic-thrust-content ul li {
    position: relative;
    padding-left: 35px;
    font-size: 16px;
    line-height: 1.7;
    color: #495057;
}

.strategic-thrust-content ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0;
    color: #C8102E;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.6;
}


/* Kolum 2: Bahagian Gambar */
.strategic-thrust-image-wrapper {
    flex: 1 1 45%; /* Ambil 45% lebar */
    position: relative; /* Diperlukan untuk kesan gradient */
}

.strategic-thrust-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Pastikan gambar isi ruang tanpa herot */
    display: block;
}

/* INI ADALAH EFEK LINEAR YANG ANDA MAHU:
   Ia adalah overlay di atas gambar, di sebelah kiri.
*/
.strategic-thrust-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Gradient: dari kiri ke kanan.
       Mula dengan putih (untuk blend dengan kolum teks)
       dan pudar ke transparent (untuk tunjuk gambar)
    */
    background: linear-gradient(
        to right,
        #ffffff 0%,  /* Mula dengan putih di tepi kiri */
        rgba(255, 255, 255, 0) 30% /* Pudar ke transparent pada 30% lebar */
    );
}

/* Stail untuk RESPONSIVE (Mobile) */
@media (max-width: 992px) {
    .strategic-thrust-card {
        flex-direction: column; /* Susun secara menegak */
    }

    .strategic-thrust-image-wrapper {
        order: -1; /* PENTING: Pindahkan gambar ke atas */
        min-height: 250px;
    }

    /* Sembunyikan kesan linear pada mobile */
    .strategic-thrust-image-wrapper::before {
        display: none;
    }
}

/* ========== Organisational Chart Page Styling ========== */

.org-chart-card {
    padding: 0; /* Buang padding 40px dari .content-card */
    overflow: hidden; /* Pastikan gambar mengikut bucu bulat (border-radius) */
}

.org-chart-card img {
    width: 100%;
    height: auto;
    display: block; /* Amalan baik untuk imej */
}

/* ========== Corporate Song Page Styling (Versi 2: Full BG) ========== */

.corporate-song-card {
    position: relative; /* Wajib untuk lapisan ::before dan ::after */
    padding: 40px; /* Kembalikan padding asal .content-card */
    overflow: hidden; /* Pastikan lapisan mematuhi border-radius */
    min-height: 500px; /* Letak ketinggian minimum */

    /* Letak semua kandungan (player, lirik) di atas lapisan */
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Lapisan 1: Gambar Latar Belakang (Paling Bawah) */
.corporate-song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-image: url('../images/corporate-song/20-3-scaled.png');
    background-size: cover;
    background-position: right 35%; /* Fokus pada bendera di sebelah kanan */

    /* Pastikan ia mematuhi bucu kad */
    border-radius: 15px;

    z-index: -2; /* Letak di lapisan paling bawah */
}

/* Lapisan 2: Efek Linear Gradient (Di atas Gambar, Di Bawah Teks) */
.corporate-song-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* EFEK YANG ANDA MAHU:
       Dari kiri (putih 90% "tak clear")
       ke kanan (transparent "clear")
    */
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.98) 30%,  /* Putih pudar di kiri (teks) */
        rgba(255, 255, 255, 0) 85%   /* Transparent di kanan (bendera) */
    );

    border-radius: 15px;
    z-index: -1; /* Letak di antara gambar dan kandungan */
}

/* Stail untuk KAD PLAYER AUDIO
   (Kita hanya perlu ubah margin)
*/
.audio-player-container {
    padding: 20px 30px;
    /* Buang margin 40px kiri kanan, ia akan ikut padding kad utama */
    margin: 0 0 30px 0;
    border-radius: 12px;
    background-color: rgba(253, 246, 247, 0.9);
    background-image: url('../images/operation-rotate.png');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(224, 204, 204, 0.7);;

    /* Pastikan ia di atas lapisan gradient */
    position: relative;
    z-index: 3;
}

.audio-player-container h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: #C8102E;
}

.audio-player-container audio {
    width: 100%;
}

/* Stail untuk LIRIK
   (Kita hanya perlu buang padding)
*/
.song-lyrics-content {
    /* Buang padding, ia akan ikut padding kad utama */
    padding: 0;

    /* Pastikan ia di atas lapisan gradient */
    position: relative;
    z-index: 3;
}

.song-lyrics-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #333; /* Teks gelap untuk kontras atas latar pudar */
    margin-top: 0;
    margin-bottom: 20px;
}

.song-lyrics-content .credits {
    font-size: 14px;
    color: #6c757d;
    border-top: 1px dashed #ddd;
    padding-top: 20px;
    margin-top: 30px;
    margin-bottom: 0;
}

.song-lyrics-content .credits em {
    font-style: italic;
}

/* Stail untuk RESPONSIVE (Mobile) */
@media (max-width: 767px) {
    .corporate-song-card {
        padding: 25px; /* Kurangkan padding pada mobile */
        min-height: 400px;
    }

    /* Jadikan gradient lebih kuat pada mobile */
    .corporate-song-card::after {
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 1) 20%,
            rgba(255, 255, 255, 0) 75%
        );
    }

    .audio-player-container {
        padding: 15px;
    }
}

/* ========== Malaysia's Foreign Policy Page Styling ========== */

/* Stailkan senarai bernombor (ol) di dalam .content-card */
.content-card ol {
    list-style: decimal;  /* Guna nombor 1., 2., 3. */
    margin: 0;

    /* Beri ruang di kiri untuk nombor */
    padding-left: 25px;
}

.content-card ol li {
    font-size: 16px;
    line-height: 1.8;
    color: #333; /* Warna teks gelap untuk mudah baca */

    /* Jarak antara setiap poin */
    margin-bottom: 20px;

    /* Jarak sikit antara nombor dan teks */
    padding-left: 10px;
}

/* Buang jarak pada poin terakhir */
.content-card ol li:last-child {
    margin-bottom: 0;
}

/* ========== Mission Search Bar Styling ========== */

.mission-search-container {
    /* Jarak antara search bar dan tab di bawah */
    margin: 0 auto 40px auto;
    max-width: 900px; /* Hadkan lebar search bar */
    position: relative;
}

.mission-search-form {
    position: relative;
}

.search-input {
    width: 100%;
    height: 70px; /* Jadikan ia besar (prominent) */
    padding: 10px 30px 10px 70px; /* Padding: atas/bawah, kanan, kiri (untuk ikon) */
    border: none;
    border-radius: 50px; /* Bucu bulat penuh */
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Shadow lembut */
    font-size: 18px; /* Saiz fon besar */
    color: #333;
    font-weight: 500;
    box-sizing: border-box; /* Elak padding 'pecahkan' lebar */
    transition: box-shadow 0.3s ease;
}

.search-input::placeholder {
    color: #999;
    font-weight: 500;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), 0 0 0 3px #032054; /* Highlight biru */
}

.search-submit-btn {
    position: absolute;
    left: 25px; /* Jarak ikon dari kiri */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.search-icon {
    width: 24px;
    height: 24px;
    fill: #6c757d; /* Warna ikon kelabu lembut */
}

/* ========== Overseas Missions Page Styling ========== */

.missions-directory-section {
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

/* Stail Navigasi Tab */
.mission-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    border-radius: 8px;
    overflow: hidden;
}

.mission-tab-link {
    padding: 18px 35px;
    border: none;
    background-color: #e9ecef;
    color: #495057;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
    text-align: center;
    border-right: 1px solid #ddd;
}
.mission-tab-link:last-child {
    border-right: none;
}

.mission-tab-link:not(.active):hover {
    background-color: #ced4da;
}

.mission-tab-link.active {
    background-color: #032054;
    color: #ffffff;
}

.mission-tab-pane {
    display: none;
}
.mission-tab-pane.active {
    display: block;
}

/* Stail Tab 1: Embassy Abroad */
.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.alphabet-filter a {
    padding: 5px 10px;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px;
    min-width: 15px;
    text-align: center;
}

.alphabet-filter a:hover {
    background-color: #f0f0f0;
    color: #C8102E;
}

.alphabet-filter a.view-all {
    background-color: #6c757d;
    color: #ffffff;
}
.alphabet-filter a.view-all.active {
    background-color: #032054;
}
.alphabet-filter a.view-all:hover {
    background-color: #032054;
}

/* === STail ACCORDION BARU === */
.embassy-accordion {
    max-height: 800px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.country-item {
    border-bottom: 1px solid #f0f0f0;
}
.country-item:last-child {
    border-bottom: none;
}

.country-trigger {
    width: 100%;
    background: #ffffff;
    border: none;
    text-align: left;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #032054;
    cursor: pointer;
    transition: background-color 0.3s ease;

    /* Ikon + / - */
    position: relative;
    padding-right: 40px;
}

.country-trigger:hover {
    background-color: #f8f9fa;
}

/* Ikon '+' (pseudo-element) */
.country-trigger::after {
    content: '+';
    font-size: 24px;
    color: #C8102E;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 400;
}

/* Tukar ikon '+' kepada '-' bila aktif */
.country-trigger.active::after {
    content: '−';
}

.mission-panel {
    display: none; /* Sembunyi secara lalai */
    padding: 25px 30px;
    background-color: #f8f9fa;
    border-top: 1px dashed #ddd;
}

/* Kelas ini akan ditambah oleh JS untuk memaparkan panel */
.mission-panel.is-open {
    display: block;
}

/* Stail .office-list, .office-entry, .office-address, .office-contact
   digunakan semula dari Tab 2 (Regional Office)
   Kita hanya perlu pastikan ia berfungsi di sini.
*/
.mission-panel .office-list {
    gap: 25px;
}
.mission-panel .office-entry {
    /* Tiada padding-bottom atau border diperlukan
       dalam panel accordion
    */
    padding-bottom: 0;
    border-bottom: none;
}


/* Stail Tab 2: Regional Office */
.directory-card-header {
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.directory-card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #495057;
}

.office-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.office-entry {
    display: flex;
    gap: 30px;
    padding-bottom: 25px;
    border-bottom: 1px dashed #ddd;
}
.office-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.office-address {
    flex: 1 1 50%;
}

.office-address h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #032054;
}

.office-address p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
}

.office-contact {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
}

.contact-item svg {
    width: 16px;
    height: 16px;
    fill: #C8102E;
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-item a,
.contact-item span {
    text-decoration: none;
    color: #333;
    line-height: 1.6;
}
.contact-item a:hover {
    text-decoration: underline;
}

/* Stail Tab 3: Foreign Embassies */
.content-card p {
    font-size: 16px;
    margin-bottom: 20px;
    margin-top: 0;
}
.content-card p a {
    color: #032054;
    font-weight: 600;
    text-decoration: none;
}
.content-card p a:hover {
    text-decoration: underline;
}

.pdf-preview-container {
    border: 1px solid #ddd;
    width: 100%;
    height: 800px; /* Boleh laras ketinggian */
    border-radius: 8px;
    overflow: hidden;
}

.pdf-preview-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive untuk Tab */
@media (max-width: 767px) {
    .mission-tabs {
        flex-direction: column;
        border-radius: 8px;
    }
    .mission-tab-link {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    .mission-tab-link:last-child {
        border-bottom: none;
    }
    .office-entry {
        flex-direction: column;
    }
}

/* ========== Organisational Structure Page Styling ========== */

.profile-group {
    margin-bottom: 25px; /* Kurangkan margin sikit */
}
/* Buang border-bottom, kita letak pada tajuk */
.profile-group:last-child {
    margin-bottom: 0;
}

/* Ini kini di dalam .sidebar-content */
.sidebar-content .content-card .profile-group-title {
    font-size: 22px;
    font-weight: 700;
    color: #032054;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: left;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee; /* Tambah garisan pemisah */
}
/* Kumpulan pertama tiada margin atas */
.sidebar-content .content-card .profile-group:first-child .profile-group-title {
    border-top: none;
    padding-top: 0;
}

.profile-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Selaraskan ke tengah jika 1 item */
    gap: 30px;
}

/* Susun atur grid 3-kolum */
.profile-grid.profile-grid-3 {
    justify-content: center; /* Biar flex uruskan */
}

/* === REKAAN KAD PROFIL BARU (PILIHAN B) === */

.profile-card {
    background-color: #032054; /* Latar biru gelap */
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Tetapkan saiz kad */
    flex-basis: 350px;
    flex-grow: 0;
    flex-shrink: 1;

    /* Kandungan diletak di tengah */
    text-align: center;
    padding: 40px 20px 30px 20px;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Lapisan corak bunga */
.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/operation-rotate-scaled.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1; /* Pudar */
    z-index: 1;
}

/* Bekas gambar (Bulat) */
.profile-image {
    width: 160px; /* Saiz bulatan */
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff; /* Bingkai putih */
    margin: 0 auto 25px auto; /* Tengahkannya */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);

    /* Letak atas corak bunga */
    position: relative;
    z-index: 2;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Pastikan imej penuh */
    display: block;
    object-position: center 10%;
}

/* Bekas teks */
.profile-info {
    position: relative;
    z-index: 2; /* Letak atas corak bunga */
    color: #ffffff;
    /* Buang stail overlay lama */
    background: none;
    padding: 0;
}

.profile-info h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.4;
    color: #ffffff; /* Teks putih */
}

.profile-info .title {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: #e0e0e0; /* Putih pudar */
    line-height: 1.5;
}

.profile-info .subtitle {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    color: #ccc; /* Putih pudar (lebih pudar) */
    line-height: 1.5;
}

/* Responsive (Kekal Sama) */
@media (max-width: 1200px) {
    .profile-card {
        flex-basis: 300px;
    }
    .profile-image {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 767px) {
    .profile-card {
        flex-basis: 350px;
    }
    .profile-image {
        width: 160px;
        height: 160px;
    }
}

/* ========== Page with Sidebar Layout ========== */

.page-with-sidebar {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* Kolum Sidebar (Kiri) */
.page-with-sidebar .inner-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 100px;
}

/* Kolum Kandungan (Kanan) */
.sidebar-content {
    flex: 1;
    min-width: 0;
}

/* Breadcrumbs */
.sidebar-content .breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
    color: #6c757d;
    background-color: rgba(255,255,255,0.7);
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
}

.sidebar-content .breadcrumbs a {
    color: #032054;
    text-decoration: none;
}

.sidebar-content .breadcrumbs a:hover {
    text-decoration: underline;
}

.sidebar-content .breadcrumbs span {
    margin: 0 5px;
}

.sidebar-content .breadcrumbs strong {
    color: #C8102E;
    font-weight: 600;
}

/* Stail Kandungan Profil (Kekal Sama) */
.sidebar-content .content-card .profile-group-title {
    text-align: left;
    font-size: 22px;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
}


/* === KOD BARU (DARI RUJUKAN ANDA) UNTUK STAIL SIDEBAR === */

.inner-sidebar .sidebar-menu {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    overflow: hidden; /* Untuk pastikan border-radius cantik */
    border: 1px solid #e9ecef;
}

.inner-sidebar .sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    background-color: #032054; /* Guna warna utama portal */
    padding: 18px 20px;
    margin: 0;
}

.inner-sidebar .sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Stail untuk SEMUA pautan dalam sidebar */
.inner-sidebar .sidebar-menu li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 20px;
    text-decoration: none;
    color: #495057;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent; /* Sediakan ruang untuk 'active' */
}

.inner-sidebar .sidebar-menu li:last-child a {
    border-bottom: none;
}

/* Efek 'arrow' ❯ seperti dalam gambar rujukan */
.inner-sidebar .sidebar-menu li a::before {
    content: '❯';
    margin-right: 12px;
    font-size: 10px;
    color: #C8102E; /* Guna warna merah tema */
    transition: transform 0.3s ease;
}

.inner-sidebar .sidebar-menu li a:hover {
    background-color: #f8f9fa;
    color: #C8102E;
}

.inner-sidebar .sidebar-menu li a:hover::before {
    transform: translateX(3px);
}

/* Stail untuk item aktif (cth: MySafe Travel) */
.inner-sidebar .sidebar-menu li a.active {
    background-color: #fdf0f2; /* Latar belakang merah jambu lembut */
    color: #C8102E;
    font-weight: 700;
    border-left: 4px solid #C8102E; /* Garisan merah di kiri */
    padding-left: 16px; /* Tolak teks ke kanan sikit (20px - 4px) */
}

/* --- Stail untuk Sub-menu --- */

/* Sembunyikan sub-menu secara lalai */
.inner-sidebar .sub-menu {
    display: none;
    background-color: #f8f9fa; /* Latar kelabu pudar */
}

/* Tunjukkan sub-menu bila 'is-open' */
.inner-sidebar li.has-children.is-open > .sub-menu {
    display: block;
}

/* Stail pautan sub-menu */
.inner-sidebar .sub-menu li a {
    padding-left: 35px; /* Inden lebih ke dalam */
    font-size: 13px;
    color: #555;
    border-color: #e9ecef;
}
.inner-sidebar .sub-menu li a::before {
    opacity: 0.7;
}

/* Stail pautan sub-menu yg aktif */
.inner-sidebar .sub-menu li a.active {
    background-color: #fdf0f2;
    color: #C8102E;
    font-weight: 700;
    border-left-color: transparent; /* Sub-menu tak perlu border kiri */
    padding-left: 35px; /* Kekalkan inden */
}
.inner-sidebar .sub-menu li a.active::before {
    opacity: 1;
}

/* Anak panah Dropdown '▼' */
.inner-sidebar li.has-children > a::after {
    content: '▼';
    margin-left: auto;
    font-size: 10px;
    color: #495057;
    transition: transform 0.3s ease;
    transform: rotate(0deg); /* Menghala ke bawah */
}

.inner-sidebar li.has-children > a:hover::after {
    color: #C8102E;
}

/* Pusingkan anak panah bila 'is-open' */
.inner-sidebar li.has-children.is-open > a::after {
    transform: rotate(-180deg);
    color: #C8102E;
}

/* Stail pautan induk bila 'is-open' atau 'active-parent' */
.inner-sidebar li.has-children.is-open > a,
.inner-sidebar li.has-children.active-parent > a {
    background-color: #fdf0f2;
    color: #C8102E;
    font-weight: 700;
    border-left: 4px solid #C8102E;
    padding-left: 16px;
}

/* ========== Data Table Styles ========== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

table.data-table thead th {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    font-weight: 700;
    color: #343a40;
    text-align: left;
    vertical-align: bottom;
}

table.data-table tbody td {
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    color: #495057;
    vertical-align: top;
}

table.data-table tbody tr:nth-of-type(even) {
    background-color: #fdfdfd;
}

table.data-table tbody tr:hover {
    background-color: #f1f6fc;
}

table.data-table .col-no {
    width: 50px;
    text-align: center;
}

.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.pagination-nav .page-info {
    color: #555;
}

.pagination-nav .page-links {
    display: flex;
    gap: 5px;
}

.pagination-nav .page-link {
    display: inline-block;
    padding: 6px 12px;
    text-decoration: none;
    color: #032054;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-nav .page-link:hover {
    background-color: #f4f4f4;
    border-color: #ccc;
}

.pagination-nav .page-link.active {
    background-color: #032054;
    color: #ffffff;
    border-color: #032054;
}

.pagination-nav .page-link.disabled {
    color: #aaa;
    pointer-events: none;
    background-color: #f9f9f9;
}
