/*
Mis 2.0 fe*/
/*Setting to change global font*/
/*@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');
body {
    font-family: "Nunito", sans-serif;
}*/
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');
@import './react-theme.css';

/****************Global Enhanced Styles***********/
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

vaadin-app-layout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-attachment: fixed;
}

/****************Enhanced Main Content***********/
.enhanced-main-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-attachment: fixed;
    min-height: 100vh;
    height: 100%;
    padding: 20px;
    padding-top: 0px !important;
    background-attachment: fixed;
    margin: 0 !important;
}

/****************Enhanced Header***********/
.enhanced-header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 0px !important;
    padding: 30px !important;
    height: 70px;
}

.logo-enhanced {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.header-title-enhanced {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 30px;
    font-weight: 600;
    margin: 0 !important;
}

.user-menu-enhanced {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 50px !important;
    color: white !important;
    padding: 2px 16px !important;
}

/****************Search and Filter Components***********/
.search-container {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 5px 25px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-left: auto;
    margin-right: auto;
    width: 300px;
    max-width: 90%;
    height: 30px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn-inactive {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: 25px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn-inactive:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #667eea !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.filter-btn-active {
    background: white !important;
    color: #667eea !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

/****************Main Title***********/
.main-title-enhanced {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 40px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/****************Services Grid***********/
.services-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    width: 100%;
    justify-content: center;
    /* TUKAR: stretch supaya semua kad sama tinggi & boleh mengembang ke bawah */
    align-items: stretch;
}

/****************Enhanced Service Cards***********/
.app-card-enhanced {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    min-width: 280px;
    max-width: 100%;

    min-height: 250px;
    height: 100%;

    /* Use flexbox for content layout */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.app-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    transition: all 0.3s ease;
    /* The background will be set dynamically via JavaScript */
}

.app-card-enhanced:hover::before {
    height: 8px;
    /* Add a subtle glow effect on hover */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.app-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.app-icon-enhanced {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.app-title-enhanced {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.3;
}

.app-description-enhanced {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;

    /* Handle text overflow for fixed height cards */
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/****************Service Gradients***********/
/* These will be applied via JavaScript to individual cards */
.service-gradient-eparlimen::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-gradient-spln::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.service-gradient-meja-bantuan::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.service-gradient-e-tempah::before {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.service-gradient-pinict::before {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.service-gradient-e-psikologi::before {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.service-gradient-kehadiran::before {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.service-gradient-sppp::before {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.service-gradient-pelekat-kenderaan::before {
    background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%);
}

.service-gradient-pas-keselamatan::before {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.service-gradient-e-jemputan::before {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.service-gradient-e-undian::before {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
}

.service-gradient-default::before {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

/****************Responsive Design***********/
@media (max-width: 768px) {
    .services-grid-enhanced {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .main-title-enhanced {
        font-size: 1.8rem;
    }
}

/****************Original EServicesListView.java Styles***********/
.logo-container {
    display: flex;
    align-items: center;
    flex-grow: 0;
    flex-shrink: 0;
    margin-right: auto;
    /*This pushes other items to the right*/
    padding-left: 16px;
    /*Add some padding to the left*/
}

/*To style the MOSTI Logo*/
.logo {
    flex-grow: 0;
    flex-shrink: 0;
    max-height: 70px;
    /*Ensure it doesn't grow beyond this height*/
    width: auto;
    object-fit: contain;
    padding: 3px;
}

/*To style the text color to white for better contrast in header*/
.header {
    color: #012970;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    justify-content: center;
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: left;
    text-align: left;
    word-wrap: break-word;
    hyphens: auto;
    width: 100%;
    height: 100%;
    margin: 30px;
    margin-right: 10px;
}

.app-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    hyphens: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    height: 150px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background: linear-gradient(135deg, var(--lumo-primary-color) 0%, var(--lumo-primary-color-50pct) 100%);
    background-color: var(--lumo-primary-color);
    color: var(--lumo-primary-contrast-color);
}

.app-button:hover {
    transform: scale(0.95);
    /* Zoom out the button */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #0056b3;
    /* Darker shade of primary color */
    background: linear-gradient(135deg, var(--lumo-primary-color-50pct) 0%, var(--lumo-primary-color) 100%);
}

.app-title {
    font-size: 24px;
    font-weight: 500;
    /*font-weight: bold;*/
    margin-bottom: 0.5rem;
}

.app-description {
    /*font-size: 0.8em;*/
    font-size: 12px;
    color: #f5f5f5;
}

/* Media queries for responsive grid */
@media (max-width: 599px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 960px) {
    .button-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.standard-font {
    color: #012970;
}

.standard-font-white {
    color: white;
}

.white-background::part(input-field) {
    height: 20px;
    background-color: white;
}

/* 1. Container Kad Offline - JANGAN letak opacity di sini */
.card-offline {
    position: relative;
    cursor: not-allowed !important;
    /* Kita buang opacity: 0.9 di sini supaya Badge tak terikut pudar */
    background-color: #f8f9fa;
    /* Optional: Tukar background jadi kelabu cerah sikit */
}

/* Matikan hover effect untuk kad offline */
.card-offline:hover {
    transform: none !important;
    box-shadow: var(--lumo-box-shadow-xs) !important;
}

/* 2. PUDARKAN content di dalam kad sahaja (Icon, Tajuk, Deskripsi) */
/* Badge tak termasuk dalam list ini, jadi badge tak akan pudar */
.card-offline .app-icon-enhanced,
.card-offline .app-title-enhanced,
.card-offline .app-description-enhanced {
    opacity: 0.5;
    /* Content nampak pudar/disabled */
    filter: grayscale(100%);
    /* Optional: Jadikan icon hitam putih supaya nampak betul2 offline */
}

/* 3. Styling Badge "Akan Datang" - Kekal Solid & Jelas */
.coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;

    background-color: #FFD900;
    /* Kuning */
    color: black;

    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;

    z-index: 20;
    /* Pastikan dia duduk paling atas */
    opacity: 1 !important;
    /* Pastikan badge ni tak pudar langsung */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/****************LandingPageView.java*************/
.landing-page-background {
    background-image: url('./images/landing-page-bg.png');
    /* put your image in frontend/images/ */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 100px;
    /* Make room for the fixed header */
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/*========Header========*/
.transparent-header {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: start;
    align-items: center;
    padding: 10px;
    height: 70px;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.transparent-header.scrolled {
    background-color: white;
    box-shadow: 0px 0 18px rgba(0, 0, 0, 0.1);
}

.page-header-horizontal-layout {
    padding: var(--lumo-space-xl);
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center !important;
}

.landing-page-title-logo {
    flex-grow: 0;
    flex-shrink: 0;
    max-height: 60px;
    /*Ensure it doesn't grow beyond this height*/
    width: auto;
    object-fit: contain;
    padding: 3px;
}

.landing-page-title {
    color: #012970;
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    font-family: "Nunito", sans-serif;
}

/*========Header========*/

/*========Body========*/
/*Animation*/
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in-wrapper {
    animation: zoomIn 0.8s ease-in-out;
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating-image {
    animation: floatAnimation 3s ease-in-out infinite;
    max-width: 100%;
    height: auto;
}

/*Animation*/

.sso-main-layout {
    display: flex;
    width: 100%;
    height: 100%;
    padding: var(--lumo-space-m);
    gap: var(--lumo-space-m);
    /* Matches setSpacing(true) */
}

.sso-left-layout {
    width: 50%;
    padding: var(--lumo-space-xl);
    display: flex;
    font-size: 17px;
    font-family: "Nunito", sans-serif;
    color: #6c6a6a;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--lumo-space-m);
    /* Matches setSpacing(true) */
}

.sso-right-layout {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.landing-page-subtitle {
    color: #012970;
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    line-height: 56px;
}

.justify-text {
    text-align: justify;
}

.login-button {
    background-color: #4154f1;
    color: white;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.35;
    width: 170px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Space between text and icon */
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: #003f84;
}

/* Animate the arrow on hover */
.login-button:hover .arrow-icon {
    transform: translateX(6px);
    transition: transform 0.3s ease;
}

/*========Floating Button (Maybank Style)========*/
.classic-floating-button {
    position: fixed;
    bottom: 80px;
    right: 40px;
    background-color: #FFD900;
    /* Warna Kuning Maybank */
    color: black;
    border-radius: 30px;
    /* Bentuk Kapsul */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    z-index: 100;
    /* Lapisan paling atas */
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    /* Animasi lembut */
}

/* Tambahan: Effect bila user hover mouse */
.classic-floating-button:hover {
    transform: translateY(-3px);
    /* Naik sikit ke atas */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    /* Bayang makin jelas */
    background-color: #e6c300;
    /* Gelap sikit bila hover */
}

/* Tambahan: Responsive untuk mobile (supaya tak ganggu paparan skrin kecil) */
@media (max-width: 600px) {
    .classic-floating-button {
        bottom: 20px;
        right: 20px;
        font-size: 14px;
        padding: 10px 20px;
    }
}

/*========End Floating Button========*/

/*========Body========*/


/*========Footer========*/
.page-footer {
    background-color: #ffffff;
    padding: 16px;
    text-align: center;
    font-size: 14px;
    color: #444;
    padding-top: 50px;
    padding-bottom: 50px;
}

.footer-policies {
    margin-bottom: 4px;
}

.footer-department {
    white-space: pre-line;
    /* to preserve line breaks */
}

/*========Footer========*/


/*========ContactUsView.java========*/
/* Contact Page Styles */
.contact-content-layout {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-title {
    color: #005FDB;
    text-align: center;
    margin-bottom: 20px;
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #333;
}

.contact-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    /* Bagi sama width untuk kedua-dua section */
}

.contact-icon {
    width: 48px;
    height: 48px;
    color: #005FDB;
    margin-bottom: 15px;
}

.contact-section-title {
    color: #005FDB;
    margin-bottom: 15px;
}

.contact-email {
    font-size: 1.2rem;
    color: #005FDB;
    text-decoration: none;
    font-weight: 500;
}

.contact-email:hover {
    text-decoration: underline;
}

.contact-person {
    margin: 20px 0;
}

.contact-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.contact-phone {
    font-size: 1.1rem;
    color: #005FDB;
    text-decoration: none;
}

.contact-phone:hover {
    text-decoration: underline;
}

.back-button {
    margin-top: 30px;
    background-color: #005FDB;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
}

.back-button:hover {
    background-color: #0047A8;
}

/* Responsive - Stack kalau screen kecil */
@media (max-width: 768px) {
    .contact-sections-horizontal {
        flex-direction: column;
    }
}