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

/* Style 0 - Test Mode */
.test-mode {
    font-family: monospace;
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #0056b3;
}

/* Style 1 - Legacy Layout Base Styles */
.members {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    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);
}

/* Responsive Grid Classes for Style 1 */
.members.dac-col-xs-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 576px) {
    .members.dac-col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) {
    .members.dac-col-sm-12.dac-col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 992px) {
    .members.dac-col-sm-6.dac-col-md-3.dac-col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Style 4 - Legacy Card Layout */
.clubleader-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 20px;
    justify-content: center;
    width: 100%;
}

.clubleader-card {
    width: 100%;
    min-width: 0;
    max-width: 400px;
    height: 100%;
    margin: 0 auto;
}

.clubleader-card-inner {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Switch to horizontal layout when container is wide enough */
@media (min-width: 500px) {
    .clubleader-card-inner {
        flex-direction: row;
    }
}

.clubleader-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    overflow: hidden;
}

@media (min-width: 500px) {
    .clubleader-image {
        width: 160px;
        flex: 0 0 160px;
    }
}

.clubleader-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    background: #f5f5f5;
}

.clubleader-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.clubleader-info h4 {
    margin: 0;
    font-size: 1.1em;
}

.clubleader-info .clubleader-position {
    margin: -10px 0 5px 0;
    font-style: italic;
    font-size: 0.95em;
}

.clubleader-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.clubleader-info ul li {
    margin: 0 0 -5px 0;
    padding: 0;
    font-size: 0.95em;
}

.clubleader-info ul li a {
    text-decoration: none;
}

.clubleader-info ul li a:hover {
    text-decoration: underline;
}

/* Style 5 - Modern BEM Card Layout */
.mmpro-members {
    --mmpro-spacing: 10px;
    --mmpro-border-radius: 4px;
    --mmpro-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --mmpro-shadow-hover: 0 2px 5px rgba(0,0,0,0.2);
    --mmpro-transition: all 0.3s ease;
    --mmpro-image-height: 200px;
    --mmpro-image-width: 160px;
    width: 100%;
}

.mmpro-members__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--mmpro-image-width));
    gap: calc(2 * var(--mmpro-spacing));
    justify-content: center;
}

.mmpro-members__item {
    width: 100%;
    min-width: var(--mmpro-image-width);
    max-width: var(--mmpro-image-width);
    height: 100%;
}

.mmpro-members__card {
    background: #fff;
    border-radius: var(--mmpro-border-radius);
    box-shadow: var(--mmpro-shadow);
    transition: var(--mmpro-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mmpro-members__card:hover {
    box-shadow: var(--mmpro-shadow-hover);
}

.mmpro-members__photo {
    width: var(--mmpro-image-width);
    height: var(--mmpro-image-height);
    background: #f5f5f5;
    overflow: hidden;
    flex: 0 0 auto;
}

.mmpro-members__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

.mmpro-members__details {
    padding: var(--mmpro-spacing);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.mmpro-members__name {
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    margin: 0;
}

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

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

.mmpro-members__position {
    font-weight: 400;
    margin: -10px 0 5px 0;
    font-style: italic;
}

.mmpro-members__club {
    text-decoration: none;
    margin: 0;
    opacity: 0.8;
}

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

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

.mmpro-members__district,
.mmpro-members__business-position,
.mmpro-members__classification {
    font-size: 0.9em;
    margin: 0;
    opacity: 0.8;
}

.mmpro-members__contact {
    text-decoration: none;
    font-size: 0.9em;
}

.mmpro-members__contact:hover {
    text-decoration: underline;
}

/* Shared Styles */
.iframe3 {
    max-width: 100%;
}

/* Debug and Error Styles */
.mmpro-debug {
    background: #f8f9fa;
    border-left: 4px solid #0056b3;
    padding: 1rem;
    margin-bottom: 1rem;
    font-family: monospace;
    overflow-x: auto;
}

.mmpro-error {
    background: #fff3f3;
    border-left: 4px solid #dc3545;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

.mmpro-error i {
    margin-right: 0.5rem;
}