/* =========================================================
   SMART PEKUA
   UNION DETAILS
   Premium Mobile UI
========================================================= */


/* =========================================================
   GLOBAL
========================================================= */

.page-content {
    width: 100%;
    box-sizing: border-box;

    padding: 18px;

    overflow-x: hidden;
}

.page-content *,
.union-details-card * {
    box-sizing: border-box;
}


/* =========================================================
   MAIN UNION CARD
========================================================= */

.union-details-card {
    width: 100%;
    max-width: 100%;

    background: #ffffff;

    border-radius: 24px;

    overflow: hidden;

    margin: 0 0 30px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.10);

    border: 1px solid rgba(
        30,
        136,
        229,
        0.08
    );
}


/* =========================================================
   COVER IMAGE
========================================================= */

.union-cover {
    width: 100%;
    height: 240px;

    display: block;

    object-fit: cover;

    background: #e3f2fd;
}


/* =========================================================
   UNION PROFILE
========================================================= */

.union-profile {
    position: relative;

    text-align: center;

    margin-top: -55px;

    z-index: 2;
}

.union-avatar {
    width: 110px;
    height: 110px;

    display: inline-block;

    object-fit: cover;

    border-radius: 50%;

    border: 5px solid #ffffff;

    background: #ffffff;

    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.20);
}


/* =========================================================
   UNION NAME
========================================================= */

.union-name {
    width: 100%;

    margin: 18px auto 10px;

    padding: 0 15px;

    text-align: center;

    color: #1f2937;

    font-size: 30px;
    font-weight: 700;

    line-height: 1.35;

    word-break: break-word;
}


/* =========================================================
   UNION BADGE
========================================================= */

.union-badge {
    width: max-content;
    max-width: calc(100% - 30px);

    margin: 0 auto 25px;

    padding: 8px 18px;

    background:
        linear-gradient(
            135deg,
            #e3f2fd,
            #f5fbff
        );

    color: #1976d2;

    border: 1px solid rgba(
        25,
        118,
        210,
        0.12
    );

    border-radius: 30px;

    font-size: 15px;
    font-weight: 700;

    box-shadow:
        0 4px 12px rgba(
            25,
            118,
            210,
            0.08
        );
}


/* =========================================================
   GENERAL INFORMATION
========================================================= */

.info-box {
    width: 100%;

    padding: 0 18px 10px;
}

.info-item {
    width: 100%;

    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 16px;

    margin-bottom: 14px;

    background:
        linear-gradient(
            135deg,
            #f8fbff,
            #ffffff
        );

    border: 1px solid rgba(
        30,
        136,
        229,
        0.08
    );

    border-left: 5px solid #1976d2;

    border-radius: 16px;

    box-shadow:
        0 4px 14px rgba(
            0,
            0,
            0,
            0.045
        );
}

.info-icon {
    flex: 0 0 38px;

    width: 38px;

    text-align: center;

    font-size: 27px;

    line-height: 1.3;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-title {
    margin-bottom: 4px;

    color: #1976d2;

    font-size: 16px;
    font-weight: 700;
}

.info-text {
    color: #444444;

    font-size: 15px;

    line-height: 1.65;

    word-break: break-word;
}


/* =========================================================
   MAIN CALL / MAP BUTTONS
========================================================= */

.button-group {
    width: 100%;

    display: flex;

    gap: 12px;

    margin-top: 32px;

    padding: 0 18px 24px;
}

.call-btn,
.map-btn {
    flex: 1;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;

    padding: 13px 12px;

    border-radius: 14px;

    color: #ffffff;

    text-decoration: none;

    text-align: center;

    font-size: 16px;
    font-weight: 700;

    box-shadow:
        0 5px 14px rgba(
            0,
            0,
            0,
            0.10
        );

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.call-btn {
    background:
        linear-gradient(
            135deg,
            #43a047,
            #2e7d32
        );
}

.map-btn {
    background:
        linear-gradient(
            135deg,
            #2196f3,
            #1565c0
        );
}

.call-btn:active,
.map-btn:active {
    transform: scale(0.97);
}


/* =========================================================
   LOADING
========================================================= */

.loading-box {
    width: 100%;

    padding: 60px 20px;

    text-align: center;

    background: #ffffff;

    border-radius: 20px;

    box-shadow:
        0 6px 20px rgba(
            0,
            0,
            0,
            0.08
        );

    color: #666666;

    font-size: 18px;
}


/* =========================================================
   STAFF AREA
   Secretary / Members / Village Police
========================================================= */

.staff-section {
    width: 100%;
    max-width: 100%;

    margin-top: 34px;

    box-sizing: border-box;
}


/* =========================================================
   SECTION HEADER
   Completely different from person cards
========================================================= */

.staff-section-title {
    width: 100%;
    min-height: 58px;

    display: flex;
    align-items: center;

    margin: 0 0 15px;

    padding: 13px 17px;

    border-radius: 15px;

    font-size: 19px;
    font-weight: 700;

    line-height: 1.35;

    box-shadow:
        0 5px 15px rgba(
            0,
            0,
            0,
            0.06
        );

    position: relative;

    overflow: hidden;
}


/* Decorative shine */

.staff-section-title::after {
    content: "";

    position: absolute;

    top: 0;
    right: -45px;

    width: 100px;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.45),
            transparent
        );

    transform: skewX(-20deg);
}


/* =========================================================
   SECRETARY SECTION
========================================================= */

.staff-section:first-of-type {
    margin-top: 28px;

    margin-bottom: 40px;
}

.staff-section:first-of-type
.staff-section-title {

    background:
        linear-gradient(
            135deg,
            #e8f5e9,
            #f8fff9
        );

    color: #2e7d32;

    border-left: 6px solid #43a047;
}


/* =========================================================
   MEMBER SECTION
========================================================= */

.staff-section:nth-of-type(2) {

    margin-bottom: 42px;
}

.staff-section:nth-of-type(2)
.staff-section-title {

    background:
        linear-gradient(
            135deg,
            #e3f2fd,
            #f8fcff
        );

    color: #1565c0;

    border-left: 6px solid #1e88e5;
}


/* =========================================================
   VILLAGE POLICE SECTION
========================================================= */

.staff-section:nth-of-type(3)
.staff-section-title {

    background:
        linear-gradient(
            135deg,
            #fff3e0,
            #fffaf5
        );

    color: #e65100;

    border-left: 6px solid #fb8c00;
}


/* শেষ Section-এর নিচেও জায়গা থাকবে */
.staff-section:last-of-type {
    margin-bottom: 34px;
}


/* =========================================================
   STAFF LIST
========================================================= */

.staff-list {
    width: 100%;
    max-width: 100%;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* =========================================================
   PERSON CARD
========================================================= */

.staff-card {
    width: 100%;
    max-width: 100%;

    min-width: 0;

    min-height: 78px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 12px 12px 14px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #f4faff,
            #ffffff
        );

    border: 1px solid rgba(
        30,
        136,
        229,
        0.12
    );

    box-shadow:
        0 5px 16px rgba(
            0,
            0,
            0,
            0.07
        );

    position: relative;

    overflow: hidden;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}


/* Left accent */

.staff-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;

    background:
        linear-gradient(
            to bottom,
            #42a5f5,
            #1976d2
        );
}


/* Card touch */

.staff-card:active {
    transform: scale(0.99);
}


/* =========================================================
   SECRETARY PERSON CARD
========================================================= */

.staff-section:first-of-type
.staff-card {

    background:
        linear-gradient(
            135deg,
            #f1fff3,
            #ffffff
        );

    border-color:
        rgba(
            67,
            160,
            71,
            0.15
        );
}

.staff-section:first-of-type
.staff-card::before {

    background:
        linear-gradient(
            to bottom,
            #66bb6a,
            #2e7d32
        );
}


/* =========================================================
   MEMBER PERSON CARD
========================================================= */

.staff-section:nth-of-type(2)
.staff-card {

    background:
        linear-gradient(
            135deg,
            #f3faff,
            #ffffff
        );
}

.staff-section:nth-of-type(2)
.staff-card::before {

    background:
        linear-gradient(
            to bottom,
            #64b5f6,
            #1976d2
        );
}


/* =========================================================
   VILLAGE POLICE PERSON CARD
========================================================= */

.staff-section:nth-of-type(3)
.staff-card {

    background:
        linear-gradient(
            135deg,
            #fffaf4,
            #ffffff
        );

    border-color:
        rgba(
            251,
            140,
            0,
            0.15
        );
}

.staff-section:nth-of-type(3)
.staff-card::before {

    background:
        linear-gradient(
            to bottom,
            #ffb74d,
            #ef6c00
        );
}


/* =========================================================
   PERSON ICON
========================================================= */

.staff-icon {

    flex: 0 0 50px;

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #e3f2fd,
            #bbdefb
        );

    border: 2px solid #90caf9;

    font-size: 24px;

    box-shadow:
        0 4px 10px rgba(
            30,
            136,
            229,
            0.14
        );
}


/* Secretary icon */

.staff-section:first-of-type
.staff-icon {

    background:
        linear-gradient(
            135deg,
            #e8f5e9,
            #c8e6c9
        );

    border-color: #a5d6a7;
}


/* Village police icon */

.staff-section:nth-of-type(3)
.staff-icon {

    background:
        linear-gradient(
            135deg,
            #fff3e0,
            #ffe0b2
        );

    border-color: #ffcc80;
}


/* =========================================================
   PERSON INFORMATION
========================================================= */

.staff-info {

    flex: 1;

    min-width: 0;

    overflow: hidden;
}

.staff-name {

    margin: 0;

    color: #17202a;

    font-size: 17px;

    font-weight: 700;

    line-height: 1.4;

    word-break: break-word;
}

.staff-designation {

    margin-top: 3px;

    color: #78909c;

    font-size: 13px;

    line-height: 1.4;

    word-break: break-word;
}

.staff-phone {

    margin-top: 5px;

    color: #1565c0;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.3;

    letter-spacing: 0.2px;
}


/* =========================================================
   STAFF CALL BUTTON
========================================================= */

.staff-call {

    flex: 0 0 46px;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #00c853,
            #00a83b
        );

    color: #ffffff;

    text-decoration: none;

    font-size: 20px;

    box-shadow:
        0 5px 13px rgba(
            0,
            200,
            83,
            0.28
        );

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.staff-call:active {

    transform: scale(0.91);

    box-shadow:
        0 2px 7px rgba(
            0,
            200,
            83,
            0.25
        );
}


/* =========================================================
   STAFF CARD ANIMATION
========================================================= */

.staff-card {
    animation:
        staffCardAppear
        0.45s
        ease
        both;
}

.staff-card:nth-child(1) {
    animation-delay: 0.03s;
}

.staff-card:nth-child(2) {
    animation-delay: 0.07s;
}

.staff-card:nth-child(3) {
    animation-delay: 0.11s;
}

.staff-card:nth-child(4) {
    animation-delay: 0.15s;
}

.staff-card:nth-child(5) {
    animation-delay: 0.19s;
}

.staff-card:nth-child(6) {
    animation-delay: 0.23s;
}

.staff-card:nth-child(7) {
    animation-delay: 0.27s;
}

.staff-card:nth-child(8) {
    animation-delay: 0.31s;
}

.staff-card:nth-child(9) {
    animation-delay: 0.35s;
}

.staff-card:nth-child(10) {
    animation-delay: 0.39s;
}

@keyframes staffCardAppear {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

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


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .page-content {
        padding: 14px;
    }

    .union-details-card {
        border-radius: 20px;
    }

    .union-cover {
        height: 200px;
    }

    .union-profile {
        margin-top: -48px;
    }

    .union-avatar {
        width: 96px;
        height: 96px;

        border-width: 4px;
    }

    .union-name {
        font-size: 25px;

        margin-top: 15px;
    }

    .union-badge {
        font-size: 14px;

        padding: 7px 15px;

        margin-bottom: 21px;
    }

    .info-box {
        padding-left: 13px;
        padding-right: 13px;
    }

    .info-item {
        gap: 10px;

        padding: 13px;

        border-radius: 14px;
    }

    .info-icon {
        flex-basis: 34px;

        width: 34px;

        font-size: 24px;
    }

    .info-title {
        font-size: 15px;
    }

    .info-text {
        font-size: 14px;

        line-height: 1.55;
    }


    /* -----------------------------------------
       MAIN BUTTONS
    ----------------------------------------- */

    .button-group {
        flex-direction: column;

        gap: 10px;

        margin-top: 34px;

        padding-left: 13px;
        padding-right: 13px;
        padding-bottom: 22px;
    }

    .call-btn,
    .map-btn {
        width: 100%;

        min-height: 48px;

        font-size: 15px;
    }


    /* -----------------------------------------
       STAFF SECTION
    ----------------------------------------- */

    .staff-section {
        margin-top: 30px;
    }

    .staff-section:first-of-type {
        margin-top: 24px;

        margin-bottom: 38px;
    }

    .staff-section:nth-of-type(2) {
        margin-bottom: 40px;
    }

    .staff-section:last-of-type {
        margin-bottom: 36px;
    }


    /* -----------------------------------------
       SECTION HEADER
    ----------------------------------------- */

    .staff-section-title {
        min-height: 54px;

        margin-bottom: 13px;

        padding: 11px 13px;

        border-radius: 14px;

        border-left-width: 5px;

        font-size: 18px;
    }


    /* -----------------------------------------
       STAFF CARD
    ----------------------------------------- */

    .staff-list {
        gap: 10px;
    }

    .staff-card {
        min-height: 74px;

        gap: 9px;

        padding: 10px 10px 10px 12px;

        border-radius: 16px;
    }

    .staff-icon {
        flex-basis: 44px;

        width: 44px;
        height: 44px;

        font-size: 21px;
    }

    .staff-name {
        font-size: 15px;
    }

    .staff-designation {
        font-size: 12px;
    }

    .staff-phone {
        font-size: 13px;

        margin-top: 3px;
    }

    .staff-call {
        flex-basis: 41px;

        width: 41px;
        height: 41px;

        font-size: 18px;
    }

}


/* =========================================================
   EXTRA SMALL DEVICES
========================================================= */

@media (max-width: 380px) {

    .page-content {
        padding: 10px;
    }

    .union-cover {
        height: 180px;
    }

    .union-name {
        font-size: 22px;
    }

    .staff-section-title {
        font-size: 17px;
    }

    .staff-card {
        gap: 7px;

        padding-left: 10px;
        padding-right: 8px;
    }

    .staff-icon {
        flex-basis: 40px;

        width: 40px;
        height: 40px;

        font-size: 19px;
    }

    .staff-name {
        font-size: 14px;
    }

    .staff-designation {
        font-size: 11px;
    }

    .staff-phone {
        font-size: 12px;
    }

    .staff-call {
        flex-basis: 38px;

        width: 38px;
        height: 38px;

        font-size: 17px;
    }

}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .union-details-card,
.dark-mode .union-details-card {

    background: #1e1e1e;

    border-color:
        rgba(255,255,255,0.06);

    box-shadow:
        0 10px 30px rgba(
            0,
            0,
            0,
            0.35
        );
}

body.dark-mode .union-name,
.dark-mode .union-name {

    color: #f5f5f5;
}

body.dark-mode .union-badge,
.dark-mode .union-badge {

    background:
        rgba(
            30,
            136,
            229,
            0.16
        );

    color: #90caf9;

    border-color:
        rgba(
            144,
            202,
            249,
            0.12
        );
}

body.dark-mode .info-item,
.dark-mode .info-item {

    background:
        linear-gradient(
            135deg,
            #252525,
            #1f1f1f
        );

    border-color:
        rgba(
            255,
            255,
            255,
            0.06
        );
}

body.dark-mode .info-title,
.dark-mode .info-title {

    color: #64b5f6;
}

body.dark-mode .info-text,
.dark-mode .info-text {

    color: #d0d0d0;
}


/* Staff titles */

body.dark-mode .staff-section-title,
.dark-mode .staff-section-title {

    background:
        linear-gradient(
            135deg,
            #263238,
            #1f1f1f
        );

    color: #90caf9;
}


/* Staff cards */

body.dark-mode .staff-card,
.dark-mode .staff-card {

    background:
        linear-gradient(
            135deg,
            #263238,
            #202020
        );

    border-color:
        rgba(
            255,
            255,
            255,
            0.07
        );
}

body.dark-mode .staff-name,
.dark-mode .staff-name {

    color: #f5f5f5;
}

body.dark-mode .staff-designation,
.dark-mode .staff-designation {

    color: #b0bec5;
}

body.dark-mode .staff-phone,
.dark-mode .staff-phone {

    color: #64b5f6;
}

body.dark-mode .staff-icon,
.dark-mode .staff-icon {

    background:
        rgba(
            30,
            136,
            229,
            0.15
        );

    border-color:
        rgba(
            100,
            181,
            246,
            0.28
        );
}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .staff-card {
        animation: none;
        transition: none;
    }

    .call-btn,
    .map-btn,
    .staff-call {
        transition: none;
    }
}