/* Final Refined Portal Styling - Mobile & Desktop Optimized */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --portal-blue: #002b5c;
    --portal-yellow: #ffcf00;
    --portal-gray: #f8f9fa;
    --portal-text: #33475b;
    --portal-accent: #e67e22;
}

.dab-portal-wrapper {
    max-width: 100%;
    margin: 20px auto;
    font-family: 'Poppins', sans-serif;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow-x: hidden;
    /* Disable side scroll */
    box-sizing: border-box;
}

/* Header Titles - Responsive */
.dab-portal-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--portal-yellow);
    padding-bottom: 20px;
}

.dab-title-1,
.dab-title-2,
.dab-title-address,
.dab-title-3 {
    text-shadow: none !important;
    quotes: none !important;
}

.dab-title-1::before,
.dab-title-1::after,
.dab-title-2::before,
.dab-title-2::after,
.dab-title-address::before,
.dab-title-address::after,
.dab-title-3::before,
.dab-title-3::after {
    content: none !important;
    display: none !important;
}

.dab-title-1 {
    color: var(--portal-blue);
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.dab-title-2 {
    color: var(--portal-accent);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 600;
    margin: 8px 0;
}

.dab-title-address {
    color: var(--portal-text);
    font-size: clamp(0.85rem, 3.5vw, 1rem);
    font-weight: 500;
    margin: 5px 0 15px 0;
}

.dab-title-3 {
    display: inline-block;
    background: var(--portal-blue);
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    font-weight: 600;
    margin-top: 5px;
    text-transform: uppercase;
}

/* Grid Container */
.dab-member-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dab-member-card {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

/* Image Container - Showing full image without cropping */
.dab-image-container {
    width: 100%;
    max-width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f2f5;
    /* Clean light gray background */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--portal-yellow);
}

.dab-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Shows full image without cutting sides/top */
}

.dab-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dab-name {
    color: var(--portal-blue);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.dab-designation {
    color: #cb9b00;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.dab-details {
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.dab-row {
    display: flex;
    font-size: 0.75rem;
    margin-bottom: 6px;
    line-height: 1.4;
}

.dab-label {
    width: 95px;
    /* Adjusted for better mobile fit */
    color: #777;
    font-weight: 600;
    flex-shrink: 0;
}

.dab-value {
    color: #333;
    font-weight: 600;
    word-break: break-word;
}

/* Badge with Background Color (As requested) */
.dab-type-badge {
    margin-top: auto;
    text-align: right;
    padding-top: 15px;
}

.dab-type-badge span {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid #dcdde1;
}

/* Modern Sleek Pagination */
.dab-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0 20px 0;
    flex-wrap: wrap;
}

.dab-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-width: 42px;
    padding: 0 15px;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    color: var(--portal-blue);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.dab-page-link:hover {
    border-color: var(--portal-blue);
    background: #f4f6f8;
    transform: translateY(-2px);
}

.dab-page-link.active {
    background: var(--portal-blue);
    color: #ffffff;
    border-color: var(--portal-blue);
    box-shadow: 0 4px 10px rgba(0, 43, 92, 0.2);
}

.dab-page-link.prev-next {
    background: #fff;
    border: 2px solid var(--portal-blue);
    color: var(--portal-blue);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 0 20px;
}

.dab-page-link.prev-next:hover {
    background: var(--portal-blue);
    color: #fff;
}

.dab-page-dots {
    color: #919eab;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 0 5px;
}

/* Mobile Pagination Fix */
@media (max-width: 600px) {
    .dab-pagination {
        gap: 6px;
    }

    .dab-page-link {
        height: 38px;
        min-width: 38px;
        padding: 0 10px;
        font-size: 0.85rem;
    }

    .dab-page-link.prev-next {
        padding: 0 12px;
        font-size: 0.65rem;
    }
}

/* Mobile Responsive Fixes */
@media (max-width: 1100px) {
    .dab-member-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .dab-member-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dab-portal-wrapper {
        padding: 10px;
    }

    .dab-member-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dab-image-container {
        height: 280px;
    }

    .dab-label {
        width: 85px;
        font-size: 0.7rem;
    }

    .dab-value {
        font-size: 0.7rem;
    }
}

/* Prevent image from breaking layout */
img {
    max-width: 100%;
    height: auto;
}