.dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    min-width: 100px;
    z-index: 1;
    border-radius: 4px;
}

.dropdown-menu a {
    color: #333;
    padding: 10px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: #ddd;
}

/* Show dropdown when open */
.dropdown.open .dropdown-menu {
    display: block;
}

/* ID card preview */

.id-card-preview-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 15px;
    background: #eeeeee;
    overflow: hidden;
}

.id-card-container {
    width: min(856px, 100%);
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: stretch;
}

.member-id-card {
    position: relative;
    width: 100%;
    aspect-ratio: 85.6 / 53.98;
    overflow: hidden;
    border-radius: clamp(8px, 1.5vw, 18px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.20);
    font-family: Arial, Helvetica, sans-serif;
    flex-shrink: 0;
}

/* Card side switching */

.id-card-front,
.id-card-back {
    display: none;
}

.id-card-front.active,
.id-card-back.active {
    display: block;
}

/* Front */

.id-card-front {
    background:
        linear-gradient(135deg,
            #075985 0%,
            #0E7490 45%,
            #1D4ED8 100%);

    color: #ffffff;
}

/* Front decorative shapes */

.front-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.8;
}

.front-shape-one {
    width: 55%;
    aspect-ratio: 1 / 1;
    right: -22%;
    top: -35%;
    border-radius: 50%;

    background:
        radial-gradient(circle,
            rgba(125, 211, 252, 0.35) 0%,
            rgba(125, 211, 252, 0) 70%);
}

.front-shape-two {
    width: 60%;
    height: 55%;
    left: -30%;
    bottom: -38%;
    transform: rotate(-25deg);

    background:
        linear-gradient(135deg,
            rgba(14, 165, 233, 0.35),
            rgba(246, 184, 75, 0.25));
}

/* Front logo */

.front-logo {
    position: absolute;
    top: 10%;
    left: 7%;
    width: 35%;
    z-index: 2;
}

.front-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
}

/* Front member information */

.front-member-info {
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: 20%;
    z-index: 3;
}

.front-member-name {
    font-size: clamp(18px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 4%;
    max-width: 85%;
    word-wrap: break-word;
}

.front-member-id {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.front-member-id span {
    font-size: clamp(7px, 1.1vw, 13px);
    font-weight: 600;
    letter-spacing: 2px;
    color: #bdbdbd;
}

.front-member-id strong {
    font-size: clamp(13px, 2.2vw, 26px);
    font-weight: 700;
    letter-spacing: 2px;
    color: #f6b84b;
}

/* Front footer */

.front-footer {
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: 6.5%;
    z-index: 3;
    font-size: clamp(6px, 0.9vw, 11px);
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

/* Back */

.id-card-back {
    background: #ffffff;
    color: #1b1b1b;
    border: 1px solid #dddddd;
}

/* Back header */

.back-header {
    height: 23%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    background:
        linear-gradient(135deg,
            #075985 0%,
            #0E7490 45%,
            #1D4ED8 100%);
    border-bottom: 4px solid #f6b84b;
}

.back-header img {
    width: 24%;
    max-height: 70%;
    object-fit: contain;
}

.back-title {
    font-size: clamp(9px, 1.6vw, 20px);
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
}

/* Back details */

.back-details {
    padding: 6% 6% 0;
}

.back-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 7%;
    margin-top: 5%;
}

.detail-item {
    min-width: 0;
}

.detail-address {
    width: 100%;
}

.detail-label {
    font-size: clamp(6px, 0.85vw, 11px);
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #888888;
    margin-bottom: 4px;
}

.detail-value {
    font-size: clamp(8px, 1.25vw, 18px);
    font-weight: 600;
    color: #222222;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Back footer */

.back-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 11%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    background: #f5f5f5;
    border-top: 1px solid #dddddd;
    color: #777777;
    font-size: clamp(5px, 0.75vw, 10px);
    letter-spacing: 1px;
}

/* Card side buttons */

.id-card-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.id-card-switcher button {
    min-width: 110px;
    border-radius: 5px;
    font-size: 14px;
}

/* Modal */

#idCardModal .modal-dialog {
    width: calc(100% - 30px);
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

#idCardModal .modal-body {
    padding: 0;
}

/* Tablet */

@media (max-width: 768px) {

    .id-card-preview-wrapper {
        padding: 20px 10px;
    }

    .id-card-container {
        width: 100%;
        gap: 20px;
    }

    .front-member-name {
        max-width: 90%;
    }

    .back-details {
        padding-top: 5%;
    }
}

/* Mobile */

@media (max-width: 576px) {

    #idCardModal .modal-dialog {
        width: calc(100% - 10px);
        max-width: none;
        margin: 5px auto;
    }

    #idCardModal .modal-content {
        border-radius: 8px;
    }

    #idCardModal .modal-header {
        padding: 10px 15px;
    }

    #idCardModal .modal-title {
        font-size: 15px;
    }

    .id-card-preview-wrapper {
        padding: 15px 8px;
    }

    .id-card-container {
        width: 100%;
        gap: 15px;
    }

    .member-id-card {
        border-radius: 7px;
    }

    .front-member-name {
        font-size: clamp(15px, 5vw, 28px);
        margin-bottom: 3%;
    }

    .front-member-id span {
        font-size: 7px;
        letter-spacing: 1px;
    }

    .front-member-id strong {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .front-footer {
        font-size: 5px;
        letter-spacing: 1px;
    }

    .back-title {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .detail-label {
        font-size: 6px;
        letter-spacing: 0.7px;
    }

    .detail-value {
        font-size: 8px;
        line-height: 1.15;
    }

    .back-detail-row {
        column-gap: 5%;
        margin-top: 4%;
    }

    .back-footer {
        font-size: 5px;
        letter-spacing: 0.5px;
    }
}

/* Very small phones */

@media (max-width: 380px) {

    .id-card-preview-wrapper {
        padding: 10px 5px;
    }

    .id-card-container {
        gap: 10px;
    }

    .front-member-name {
        font-size: 14px;
    }

    .front-member-id strong {
        font-size: 11px;
    }

    .detail-label {
        font-size: 5px;
    }

    .detail-value {
        font-size: 7px;
    }
}

/* Site header */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    background: #101010;
    border-bottom: 1px solid rgba(246, 184, 75, 0.45);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.site-header-inner {
    width: min(1400px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
}


/* Logo */

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.site-brand img:first-child {
    display: block;
    width: 105px;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

.site-brand .pagcor-logo {
    display: block;
    width: 48px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}


/* Navigation */

.site-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.site-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-list li {
    margin: 0;
    padding: 0;
}

.site-nav-list li a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 7px;
    color: #c8cdd5;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1px;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.site-nav-list li a i {
    color: #7e8997;
    font-size: 12px;
    transition: color 0.2s ease;
}

.site-nav-list li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.site-nav-list li a:hover i {
    color: #f6b84b;
}


/* Active navigation */

.site-nav-list li a.active {
    color: #ffffff;
    background: rgba(14, 116, 144, 0.20);
}

.site-nav-list li a.active i {
    color: #f6b84b;
}

.site-nav-list li a.active::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: #f6b84b;
}


/* Header actions */

.site-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}


/* Register */

.register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 7px;
    background: #f6b84b;
    color: #172033;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(246, 184, 75, 0.18);
    transition: all 0.2s ease;
}

.register-button i {
    font-size: 11px;
}

.register-button:hover {
    background: #ffc75e;
    color: #172033;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(246, 184, 75, 0.25);
}


/* User account */

.user-account {
    position: relative;
}

.user-account-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-account-button:hover,
.user-account.open .user-account-button {
    background: rgba(14, 116, 144, 0.25);
    border-color: rgba(14, 116, 144, 0.45);
}

.user-account-button>i:first-child {
    font-size: 17px;
}

.user-chevron {
    color: #9da5b0;
    font-size: 7px;
    transition: transform 0.2s ease;
}

.user-account.open .user-chevron {
    transform: rotate(180deg);
}


/* User dropdown */

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e5e9ef;
    border-radius: 9px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.user-account.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* Dropdown header */

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
}

.user-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 7px;
    background: #eef8fb;
    color: #0e7490;
    font-size: 13px;
}

.user-dropdown-header strong {
    display: block;
    color: #172033;
    font-size: 12px;
    font-weight: 700;
}

.user-dropdown-header small {
    display: block;
    margin-top: 2px;
    color: #8a94a6;
    font-size: 10px;
}


/* Dropdown divider */

.user-dropdown-divider {
    height: 1px;
    margin: 4px 0;
    background: #edf0f4;
}


/* Dropdown item */

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 9px;
    border-radius: 6px;
    color: #4b5565;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.user-dropdown-item i {
    width: 16px;
    color: #7a8496;
    text-align: center;
}

.user-dropdown-item:hover {
    background: #fff1f2;
    color: #dc3545;
    text-decoration: none;
}

.user-dropdown-item:hover i {
    color: #dc3545;
}


/* Mobile menu button */

.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.mobile-menu-button.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Tablet */

@media (max-width: 1100px) {

    .site-header-inner {
        width: min(100% - 30px, 1200px);
        gap: 15px;
    }

    .site-brand {
        gap: 8px;
    }

    .site-brand img:first-child {
        width: 90px;
    }

    .site-brand .pagcor-logo {
        width: 42px;
    }

    .site-nav-list {
        gap: 1px;
    }

    .site-nav-list li a {
        gap: 6px;
        padding: 0 10px;
        font-size: 11px;
    }

    .site-nav-list li a.active::after {
        left: 10px;
        right: 10px;
    }

    .register-button {
        padding: 0 12px;
    }

}


/* Tablet / small laptop */

@media (max-width: 900px) {

    .site-header-inner {
        min-height: 68px;
    }

    .site-navigation {
        justify-content: flex-end;
    }

    .site-nav-list li a {
        padding: 0 8px;
        font-size: 10px;
    }

    .site-nav-list li a i {
        display: none;
    }

    .register-button span {
        display: none;
    }

    .register-button {
        width: 38px;
        padding: 0;
    }

}

/* Mobile */

@media (max-width: 900px) {

    .content {
        padding-top: 68px;
    }

}

@media (max-width: 768px) {

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    .content {
        padding-top: 64px;
    }


    .site-header-inner {
        width: calc(100% - 24px);
        min-height: 64px;
        gap: 10px;
    }

    .site-brand {
        flex: 1;
        min-width: 0;
    }

    .site-brand img:first-child {
        width: 88px;
        max-height: 42px;
    }

    .site-brand .pagcor-logo {
        width: 38px;
        max-height: 38px;
    }


    /* Hide desktop nav */

    .site-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
        padding: 0 12px 12px;
        background: #101010;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;
    }

    .site-navigation.mobile-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }

    .site-nav-list li {
        width: 100%;
    }

    .site-nav-list li a {
        display: flex;
        justify-content: flex-start;
        width: 100%;
        min-height: 46px;
        padding: 0 14px;
        border-radius: 7px;
        font-size: 12px;
    }

    .site-nav-list li a i {
        display: inline-block;
        width: 18px;
        color: #7e8997;
        text-align: center;
    }

    .site-nav-list li a.active {
        background: rgba(14, 116, 144, 0.22);
    }

    .site-nav-list li a.active::after {
        top: 8px;
        right: auto;
        bottom: 8px;
        left: 0;
        width: 3px;
        height: auto;
    }


    /* Header actions */

    .site-header-actions {
        gap: 7px;
    }

    .register-button {
        display: none;
    }

    .user-account-button {
        width: 38px;
        height: 38px;
    }

    .mobile-menu-button {
        display: flex;
    }

}


/* Small mobile */

@media (max-width: 480px) {

    .site-header-inner {
        width: calc(100% - 16px);
    }

    .site-brand img:first-child {
        width: 80px;
    }

    .site-brand .pagcor-logo {
        width: 34px;
    }

    .user-dropdown-menu {
        right: -4px;
        width: 210px;
    }

}


/* Very small phones */

@media (max-width: 360px) {

    .site-brand img:first-child {
        width: 72px;
    }

    .site-brand .pagcor-logo {
        width: 30px;
    }

    .user-account-button {
        width: 35px;
        height: 35px;
    }

    .mobile-menu-button {
        width: 35px;
        height: 35px;
    }

}
