/* pages/administration/view.css */

/* ===================================
   Custom Heading Styles 
   =================================== */
h7 {
    display: block;
    font-size: 1.6em;
    margin-bottom: 0.4em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
    color: #89287f;
}



/* ===================================
   Section Title 
   =================================== */
.section-title {
    text-align: center;
    padding-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    bottom: 0;
    left: calc(50% - 30px);
}

.section-title p {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 0;
    font-weight: 400;
}

/* ===================================
   Member Cards - 3 columns layout
   =================================== */
.trainers {
    padding: 80px 0;
    background: #ffffff;
}

.trainers .container {
    max-width: 1200px;
}

.trainers .row {
    justify-content: center;
}

.member {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

/* Member Image Container - Circular Style */
.member-img-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.member-img {
    position: relative;
    width: 220px;
    height: 220px;
    overflow: hidden;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
    border: 3px solid #f8f9fa;
}

.member:hover .member-img {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #89287f;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}

.member:hover .member-img img {
    transform: scale(1.05);
}

/* Social Links Overlay - Centered on Image */
.member-img .social {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.member-img:hover .social {
    opacity: 1;
    background: rgba(255, 255, 255, 0.92);
}

.member-img .social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(137, 40, 127, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.member-img .social a:hover {
    background: #fff;
    transform: scale(1.1);
    border-color: #89287f;
    box-shadow: 0 5px 15px rgba(137, 40, 127, 0.4);
}

.member-img .social a img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* Dean Card Special Style */
.dean-card .member-img {
    border: 4px solid #89287f;
    width: 240px;
    height: 240px;
}

.dean-card .member-img img {
    width: 100%;
    height: 100%;
}

/* Social Links - Clean and Centered with Images */
.member-img .social {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
    background: rgba(255, 255, 255, 0);
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    border-radius: 50%;
}

.member:hover .member-img .social {
    opacity: 1;
    background: rgba(255, 255, 255, 0.75);  /* ใสมากขึ้น 75% แทน 95% */
}

.member-img .social a {
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(137, 40, 127, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-decoration: none;
    padding: 0;
    overflow: hidden;
}

.member-img .social a:hover {
    background: #fff;
    transform: scale(1.15);
    border-color: #89287f;
    box-shadow: 0 5px 15px rgba(137, 40, 127, 0.3);
}

.member-img .social a img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

/* Member Info */
.member-info {
    padding: 0 15px;
}

.member-info h4.member-name {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.member-info .position-title {
    display: block;
    font-size: 14px;
    color: #89287f;
    font-weight: 500;
    margin-bottom: 8px;
    font-style: italic;
    line-height: 1.3;
}

/* Contact Icons Section */
.contact-icons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1.2;
}

.contact-icon:hover {
    color: #89287f;
    background: rgba(137, 40, 127, 0.08);
}

.contact-icon i {
    color: #89287f;
    font-size: 15px;
}

.contact-text {
    font-size: 12px;
    line-height: 1;
}

/* Special style for dean */
.dean-card .member-info h7.member-name {
    font-size: 20px;
    color: #89287f;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    line-height: 1.2;
}

.dean-card .member-info h4.position-title {
    font-size: 16px;
    color: #89287f;
    font-weight: 700;
    line-height: 1.3;
}

.dean-card .contact-icon {
    font-size: 14px;
}

/* ===================================
   Responsive Design - 3 columns
   =================================== */
@media (max-width: 1199px) {
    .member-img {
        width: 200px;
        height: 200px;
    }
    
    .dean-card .member-img {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 991px) {
    .page-title h1 {
        font-size: 36px;
    }
    
    .member-img {
        width: 220px;
        height: 220px;
    }
    
    .dean-card .member-img {
        width: 240px;
        height: 240px;
    }
    
    h7 {
        font-size: 1.4em;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .member-info h4 {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .page-title {
        padding: 40px 0 30px 0;
        margin-bottom: 40px;
    }
    
    .page-title h1 {
        font-size: 30px;
    }
    
    .trainers {
        padding: 60px 0;
    }
    
    .member {
        margin-bottom: 40px;
    }
    
    .member-img {
        width: 200px;
        height: 200px;
    }
    
    .dean-card .member-img {
        width: 220px;
        height: 220px;
    }
    
    h7 {
        font-size: 1.3em;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .section-title p {
        font-size: 16px;
    }
    
    /* Always show social on mobile */
    .member-img .social {
        bottom: 0;
    }
}

@media (max-width: 575px) {
    .page-title h1 {
        font-size: 26px;
    }
    
    .breadcrumbs ol {
        font-size: 12px;
    }
    
    .member {
        margin-bottom: 35px;
    }
    
    .member-img {
        width: 180px;
        height: 180px;
        margin-bottom: 20px;
    }
    
    .dean-card .member-img {
        width: 200px;
        height: 200px;
    }
    
    .member-img .social a {
        width: 34px;
        height: 34px;
    }
    
    .member-img .social i {
        font-size: 14px;
    }
    
    h7 {
        font-size: 1.2em;
    }
    
    .member-info h4 {
        font-size: 17px;
    }
    
    .member-info span {
        font-size: 14px;
    }
    
    .member-info h6 {
        font-size: 12px;
    }
}

/* ===================================
   Animations 
   =================================== */
.member {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Animation for Cards */
.member {
    transition: transform 0.3s ease;
}

.member:hover {
    transform: translateY(-10px);
}

/* ===================================
   Loading State 
   =================================== */
.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #89287f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===================================
   Print Styles 
   =================================== */
@media print {
    .page-title {
        background: none !important;
        color: #000 !important;
        padding: 20px 0 !important;
    }
    
    .page-title h1 {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .breadcrumbs {
        display: none;
    }
    
    .social {
        display: none !important;
    }
    
    .member-img {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .member-info {
        font-size: 10pt;
    }
    
    .member {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .trainers {
        background: none !important;
        padding: 20px 0 !important;
    }
}