/* Grid System */
.dac-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    clear: both;
}

/* Column Classes */
[class*="dac-col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 20px;
}

/* Extra small devices (phones) */
.dac-col-xs-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Small devices (tablets) */
@media (min-width: 576px) {
    .dac-col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .dac-col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Medium devices (desktops) */
@media (min-width: 768px) {
    .dac-col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .dac-col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Large devices (large desktops) */
@media (min-width: 992px) {
    .dac-col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Member Cards */
.members {
    margin-bottom: 20px;
}

.members table {
    width: 100%;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.members table:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.members img {
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 4/5;
}

.members td {
    vertical-align: top;
    padding: 10px !important;
}

/* Committee List Table */
table.dcc {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
}

table.dcc td {
    padding: 12px !important;
    border-bottom: 1px solid #eee;
}

table.dcc tr:hover td {
    background-color: #f8f9fa;
}

/* Links */
.members a, table.dcc a {
    /* color: #0056b3; */
    text-decoration: none;
    transition: color 0.2s ease;
}

.members a:hover, table.dcc a:hover {
    /* color: #003d82; */
    text-decoration: underline;
}

/* Club Name */
.clubname {
    /* color: #666; */
    font-size: 0.95em;
}

/* ColorBox Integration */
.iframe3 {
    max-width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 575.98px) {
    .members table td {
        display: block;
        width: 100% !important;
        max-width: none !important;
        text-align: center;
    }
    
    .members table td:first-child {
        padding-bottom: 0 !important;
    }
    
    .members img {
        max-width: 200px;
        margin: 0 auto;
    }
}

/* Committee Description */
.committee-description {
    margin-bottom: 20px;
    padding: 15px;
    /* background-color: #f8f9fa; */
    border-radius: 4px;
    /* border-left: 4px solid #0056b3; */
}

/* Committee Header */
.committee-header {
    margin-bottom: 20px;
    overflow: auto;
}

.committee-header h1 {
    /* color: #333; */
    margin: 0 0 10px 0;
    padding: 0;
}

/* Committee List */
.mmpro-committees {
    --mmpro-spacing: 1rem;
    --mmpro-border-radius: 4px;
    --mmpro-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --mmpro-shadow-hover: 0 4px 6px rgba(0,0,0,0.1);
    --mmpro-transition: all 0.3s ease;
    --mmpro-border: #e9ecef;
    --mmpro-hover-bg: #f8f9fa;
    
    display: flex;
    flex-direction: column;
    gap: var(--mmpro-spacing);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    container-type: inline-size;
}

.mmpro-committees__item {
    border-radius: var(--mmpro-border-radius);
    box-shadow: var(--mmpro-shadow);
    transition: var(--mmpro-transition);
    overflow: hidden;
}

.mmpro-committees__header {
    display: flex;
    align-items: center;
    gap: var(--mmpro-spacing);
    flex-wrap: wrap;
    padding: calc(1.25 * var(--mmpro-spacing));
}

.mmpro-committees__title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
}

.mmpro-committees__name-wrapper {
    flex: 1 1 250px;
    min-width: 0;
}

.mmpro-committees__toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    transition: var(--mmpro-transition);
}

.mmpro-committees__toggle:hover {
    color: var(--mmpro-color-primary);
}

.mmpro-committees__toggle:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    pointer-events: none;
}

.mmpro-committees__members-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--mmpro-border-radius);
    transition: var(--mmpro-transition);
    background: var(--mmpro-hover-bg);
    line-height: 1;
    white-space: nowrap;
    margin-left: auto;
}

.mmpro-committees__members-link:hover {
    background: var(--mmpro-border);
    text-decoration: none;
}

.mmpro-committees__members-link i {
    font-size: 1rem;
}

.mmpro-committees__members-link span {
    transition: var(--mmpro-transition);
}

/* Container Query for modern browsers */
@container (max-width: 430px) {
    .mmpro-committees__members-link {
        padding: 0.5rem;
        aspect-ratio: 1;
        justify-content: center;
    }
    
    .mmpro-committees__members-link span {
        display: none;
    }
    
    .mmpro-committees__members-link i {
        margin: 0;
    }
}

/* Fallback for browsers that don't support container queries */
@supports not (container-type: inline-size) {
    @media (max-width: 430px) {
        .mmpro-committees__members-link {
            padding: 0.5rem;
            aspect-ratio: 1;
            justify-content: center;
        }
        
        .mmpro-committees__members-link span {
            display: none;
        }
        
        .mmpro-committees__members-link i {
            margin: 0;
        }
    }
}

/* Add tooltip for icon-only view */
.mmpro-committees__members-link[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
}

.mmpro-committees__name {
    margin: 0;
    font-weight: 600;
    transition: var(--mmpro-transition);
}

.mmpro-committees__name--gdg {
    color: #dc3545;
}

.mmpro-committees__year {
    background: var(--mmpro-border);
    padding: 0.25rem 0.75rem;
    border-radius: var(--mmpro-border-radius);
    white-space: nowrap;
}

.mmpro-committees__content {
    /* border-top: 1px solid var(--mmpro-color-border); */
    padding: 0;
    max-height: 0;
    overflow: hidden;
    display: none;
}

.mmpro-committees__content[hidden] {
    display: none;
}

.mmpro-committees__content.is-expanded {
    padding: calc(1.25 * var(--mmpro-spacing));
    max-height: none;
    display: block;
}

.mmpro-committees__description {
    line-height: 1.2;
}

/* Screen reader only text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Accessibility */
.a11y-sr-only {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Responsive Adjustments */
@media (max-width: 575.98px) {
    .mmpro-committees__header {
        padding: var(--mmpro-spacing);
    }
    
    .mmpro-committees__content.is-expanded {
        padding: var(--mmpro-spacing);
    }
    
    .mmpro-committees__title-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        width: 100%;
    }
    
    .mmpro-committees__name-wrapper {
        width: 100%;
        flex: 1 1 auto;
    }
    
    .mmpro-committees__members-link {
        margin-left: 0;
        padding: 0.4rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .mmpro-committees__name {
        font-size: 1.125rem;
    }
    
    .mmpro-committees__item--level-1,
    .mmpro-committees__item--level-2,
    .mmpro-committees__item--level-3 {
        margin-left: var(--mmpro-spacing);
        border-left: 4px solid var(--mmpro-color-border);
    }
}

/* Add a medium breakpoint for tablets */
@media (min-width: 576px) and (max-width: 767.98px) {
    .mmpro-committees__title-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .mmpro-committees__members-link {
        margin-left: 0;
    }
}

/* Error and Debug Styles */
.mmpro-error {
    border-left: 4px solid #dc3545;
    padding: var(--mmpro-spacing);
    margin-bottom: var(--mmpro-spacing);
}

.mmpro-debug {
    border-left: 4px solid #0056b3;
    padding: var(--mmpro-spacing);
    margin-bottom: var(--mmpro-spacing);
    font-family: monospace;
    overflow-x: auto;
}

.mmpro-members__position {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.mmpro-members__org {
    margin-bottom: 0.5rem;
}

.mmpro-members__org a {
    text-decoration: none;
}

.mmpro-members__org a:hover {
    text-decoration: underline;
}

.mmpro-members__business-position,
.mmpro-members__classification {
    margin-bottom: 0.25rem;
}

/* Member Cards */
.clubleader-image {
    aspect-ratio: 4/5;
    width: 100%;
    position: relative;
}

.clubleader-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clubleader-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.mmpro-members__photo {
    aspect-ratio: 4/5;
    width: 100%;
    position: relative;
}

.mmpro-members__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
} 