/* ============================================================
   Student Associations Page Stylesheet
   Modern, responsive design with 3 Faculty Filter Tabs
   ============================================================ */

.assoc-shell {
    margin-top: 0.5rem;
}

/* Lead & Intro */
.assoc-lead {
    font-size: 1.05rem;
    line-height: 1.95;
    color: #475569;
    margin: 0 0 1.75rem 0;
    text-align: justify;
}

/* Faculty Filter Navigation */
.assoc-nav-wrap {
    margin-bottom: 2rem;
    position: sticky;
    top: 10px;
    z-index: 20;
}

.assoc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    background: #ffffff;
    padding: 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(133, 0, 62, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.assoc-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.assoc-filter-btn:hover {
    background: #f1f5f9;
    color: #85003e;
    border-color: rgba(133, 0, 62, 0.2);
    transform: translateY(-1px);
}

.assoc-filter-btn.is-active {
    background: #85003e;
    color: #ffffff;
    border-color: #85003e;
    box-shadow: 0 4px 14px rgba(133, 0, 62, 0.28);
}

.assoc-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    transition: background 0.2s;
}

.assoc-filter-btn.is-active .assoc-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Faculty specific indicator chips inside filter */
.faculty-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot-all { background: #85003e; }
.dot-civil { background: #0284c7; }
.dot-tech { background: #059669; }
.dot-humanities { background: #7c3aed; }

/* Grid of Association Cards */
.assoc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.assoc-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(133, 0, 62, 0.12);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.assoc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(133, 0, 62, 0.1);
    border-color: rgba(133, 0, 62, 0.3);
}

/* Card Header & Faculty Accent */
.assoc-card__top-bar {
    height: 5px;
    width: 100%;
}
.assoc-card[data-faculty="civil_architecture"] .assoc-card__top-bar {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.assoc-card[data-faculty="new_technologies"] .assoc-card__top-bar {
    background: linear-gradient(90deg, #059669, #34d399);
}
.assoc-card[data-faculty="humanities"] .assoc-card__top-bar {
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.assoc-card__head {
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.assoc-card__logo-wrap {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}

.assoc-card__logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.assoc-card__logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.assoc-card__title-meta {
    flex: 1;
    min-width: 0;
}

.assoc-card__faculty-badge {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.faculty-badge--civil_architecture {
    background: #e0f2fe;
    color: #0369a1;
}
.faculty-badge--new_technologies {
    background: #dcfce7;
    color: #15803d;
}
.faculty-badge--humanities {
    background: #f3e8ff;
    color: #6b21a8;
}

.assoc-card__title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #1a1216;
    margin: 0;
    line-height: 1.45;
}

/* Card Body & Metadata */
.assoc-card__body {
    padding: 0 1.25rem 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.assoc-card__meta-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin: 0.75rem 0 0.9rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.88rem;
}

.assoc-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #475569;
}

.assoc-card__meta-item svg {
    width: 16px;
    height: 16px;
    color: #85003e;
    flex-shrink: 0;
}

.assoc-card__meta-label {
    font-weight: 700;
    color: #334155;
}

.assoc-card__meta-val {
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assoc-card__desc {
    font-size: 0.92rem;
    line-height: 1.8;
    color: #64748b;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
}

/* Card Actions */
.assoc-card__actions {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.assoc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.assoc-btn--primary {
    background: #85003e;
    color: #ffffff;
    flex: 1;
}

.assoc-btn--primary:hover {
    background: #6b0032;
    color: #ffffff;
}

.assoc-btn--outline {
    background: transparent;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.assoc-btn--outline:hover {
    background: #f8fafc;
    color: #85003e;
    border-color: rgba(133, 0, 62, 0.3);
}

.assoc-btn--contact {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.assoc-btn--contact:hover {
    background: #d1fae5;
    color: #047857;
}

/* Membership Guide Banner */
.assoc-guide-card {
    background: linear-gradient(135deg, #faf5f7 0%, #ffffff 100%);
    border: 1px solid rgba(133, 0, 62, 0.16);
    border-radius: 20px;
    padding: 1.75rem;
    margin-top: 2rem;
    box-shadow: 0 6px 20px rgba(133, 0, 62, 0.04);
}

.assoc-guide-card__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.assoc-guide-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #85003e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.assoc-guide-card__icon svg {
    width: 24px;
    height: 24px;
}

.assoc-guide-card__title {
    font-size: 1.22rem;
    font-weight: 800;
    color: #1a1216;
    margin: 0;
}

.assoc-guide-card__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-top: 1.25rem;
}

.assoc-step-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.assoc-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fdf2f6;
    color: #85003e;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.assoc-step-content h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: #1e293b;
}

.assoc-step-content p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.7;
    color: #64748b;
}

/* Modal Popup for Details */
.assoc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.assoc-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.assoc-modal__dialog {
    background: #ffffff;
    border-radius: 20px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.assoc-modal__close {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: #f1f5f9;
    border: none;
    color: #475569;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.assoc-modal__close:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.assoc-modal__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-left: 2.5rem;
}

.assoc-modal__title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #1a1216;
    margin: 0.25rem 0 0 0;
}

.assoc-modal__section {
    margin-bottom: 1.25rem;
}

.assoc-modal__section-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #85003e;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.assoc-modal__desc {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #334155;
    margin: 0;
    text-align: justify;
}

.assoc-modal__activities {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    font-size: 0.92rem;
    line-height: 1.9;
    color: #334155;
    white-space: pre-line;
}

@media (max-width: 640px) {
    .assoc-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.6rem;
    }
    .assoc-filter-btn {
        flex-shrink: 0;
        font-size: 0.88rem;
        padding: 0.55rem 0.9rem;
    }
    .assoc-grid {
        grid-template-columns: 1fr;
    }
}
