
:root {
    --primary-color: #1a4b8c;
    --secondary-color: #e9b949;
    --accent-color: #e74c3c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}


.navbar .nav-link {
    color: white !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s;
}

.navbar .nav-link:hover {
    color: var(--secondary-color) !important;
}

.navbar .nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 600;
}


.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.member-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .lightbox-content {
        overflow-y: visible;
    }
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.social-icons a {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

.news-card {
    border-left: 4px solid var(--secondary-color);
}

.set-leader-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.hero-section-home {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(52, 152, 219, 0.8)), 
                url('../images/hero-bg.jpg') center/cover no-repeat;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
    margin: 0;
    padding: 120px 0 80px;
    width: 100%;
}

.hero-overlay {
    width: 100%;
    padding: 60px 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 2rem;
}

.section-py {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.member-card-home {
    background: white;
    border-radius: 15px;
    padding: 2rem 1.5rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    height: 100%;
}

.member-card-home:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.member-avatar-container {
    margin-bottom: 1.5rem;
}

.member-avatar-home {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
    margin: 0 auto;
}

.default-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 2.5rem;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.member-admission {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.member-profession {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.company {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.leader-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem 1.5rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.leader-card:hover {
    transform: translateY(-5px);
}

.leader-avatar-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.leader-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    margin: 0 auto;
}

.leader-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.leader-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.leader-admission {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.announcement-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.announcement-card:hover {
    transform: translateY(-5px);
}

.announcement-image {
    height: 200px;
    overflow: hidden;
}

.announcement-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.announcement-card:hover .announcement-image img {
    transform: scale(1.1);
}

.announcement-content {
    padding: 1.5rem;
}

.announcement-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.announcement-text {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.announcement-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.instagram-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.instagram-post-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.instagram-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.instagram-post-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-post-item:hover .post-img {
    transform: scale(1.05);
}

.instagram-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-post-item:hover .instagram-post-overlay {
    opacity: 1;
}

.post-actions {
    display: flex;
    gap: 1.5rem;
    color: white;
    font-weight: 600;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.post-stat i {
    font-size: 1rem;
}



.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 0;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    margin-top: 2rem;
}

.container.mt-4 {
    margin-top: 0 !important;
    padding-left: 15px;
    padding-right: 15px;
}

section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn,
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child,
    .cta-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 0;
    margin-top: 0;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-text {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #3498db;
    transform: translateY(-2px);
}

.contact-info p {
    color: #bdc3c7;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
}

.contact-info i {
    margin-top: 0.25rem;
    margin-right: 0.5rem;
    color: #3498db;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 2rem 0 1rem;
}

.footer-bottom {
    padding: 1rem 0;
}

.copyright {
    color: #95a5a6;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
}

.footer-bottom-links a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #3498db;
}

@media (max-width: 768px) {
    .footer-bottom-links {
        justify-content: flex-start;
        margin-top: 1rem;
    }
    
    .footer-bottom .text-end {
        text-align: left !important;
    }
}

.admin-dashboard {
    background-color: #f8f9fc;
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border-left: 4px solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.stat-card.primary {
    border-left-color: #4e73df;
}

.stat-card.warning {
    border-left-color: #f6c23e;
}

.stat-card.success {
    border-left-color: #1cc88a;
}

.stat-card.info {
    border-left-color: #36b9cc;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-icon {
    font-size: 2rem;
    color: #dddfeb;
    margin-top: 0.5rem;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
    border: none;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0 !important;
}

.card-header h6 {
    font-weight: 600;
    color: #4e73df;
    margin: 0;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #4e73df, #2e59d9) !important;
    color: white;
}

.card-header.bg-primary h6 {
    color: white;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #f6c23e, #f4b619) !important;
    color: #2c3e50;
}

.card-header.bg-warning h6 {
    color: #2c3e50;
}

.card-body {
    padding: 1.5rem;
}

.list-group-item {
    border: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fc;
}

.list-group-item h6 {
    color: #4e73df;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.list-group-item .small {
    font-size: 0.875rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-btn {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: #5a5c69;
    transition: all 0.3s ease;
    display: block;
}

.quick-action-btn:hover {
    border-color: #4e73df;
    color: #4e73df;
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

.btn {
    border-radius: 0.35rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4e73df, #2e59d9);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2e59d9, #224abe);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #1cc88a, #17a673);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f6c23e, #f4b619);
    border: none;
    color: #2c3e50;
}

.btn-danger {
    background: linear-gradient(135deg, #e74a3b, #e02d1b);
    border: none;
}

.btn-outline-primary {
    border-color: #4e73df;
    color: #4e73df;
}

.btn-outline-primary:hover {
    background: #4e73df;
    border-color: #4e73df;
}

.btn-outline-warning {
    border-color: #f6c23e;
    color: #f6c23e;
}

.btn-outline-warning:hover {
    background: #f6c23e;
    border-color: #f6c23e;
    color: #2c3e50;
}

.text-primary {
    color: #4e73df !important;
}

.text-warning {
    color: #f6c23e !important;
}

.text-success {
    color: #1cc88a !important;
}

.text-info {
    color: #36b9cc !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-muted {
    color: #858796 !important;
}


.form-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.container.py-5,
.container.mt-5,
.container.mt-4 {
    padding: 2rem 0 !important;
    flex: 1;
}

.card {
    margin: 1rem 0;
}

.card-body {
    padding: 2rem;
}

.form-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

.form-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 1rem 0;
}

.login-container,
.register-container,
.contact-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

form {
    margin: 1rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.login-page,
.register-page,
.contact-page {
    min-height: 80vh;
    padding: 2rem 0;
}

.admin-dashboard .container-fluid {
    padding: 1rem 0;
    min-height: 70vh;
}

body.login-page,
body.register-page,
body.contact-page {
    background-color: #f8f9fa;
}

.content-wrapper {
    flex: 1;
    min-height: 60vh;
}

.form-card {
    margin: 2rem 0;
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-card .card-body {
    padding: 2rem;
}

.container:not(.footer .container) {
    padding-bottom: 1rem !important;
    padding-top: 1rem !important;
}

.navbar + .container {
    padding-top: 1rem !important;
}

.login-page main {
    padding: 2rem 0;
}

.register-page main {
    padding: 2rem 0;
}

.contact-page main {
    padding: 2rem 0;
}

.admin-dashboard main {
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .form-wrapper {
        padding: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .form-card .card-body {
        padding: 1.5rem;
    }
    
    .container.py-5,
    .container.mt-5,
    .container.mt-4 {
        padding: 1rem 0 !important;
    }
    
    .login-page main,
    .register-page main,
    .contact-page main {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .form-wrapper {
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .form-card .card-body {
        padding: 1rem;
    }
}

/* Admin Footer Styles - Force Styling */
footer.admin-footer {
    background: #2c3e50 !important;
    color: white !important;
    padding: 60px 0 0 !important;
    margin-top: 6rem !important;
    width: 100% !important;
    position: relative !important;
    z-index: 100 !important;
}

footer.admin-footer .container {
    background: transparent !important;
}

footer.admin-footer .footer-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    color: white !important;
}

footer.admin-footer .footer-subtitle {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    color: #3498db !important;
}

footer.admin-footer .footer-text {
    color: #bdc3c7 !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
}

footer.admin-footer .footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

footer.admin-footer .footer-links li {
    margin-bottom: 0.5rem !important;
}

footer.admin-footer .footer-links a {
    color: #bdc3c7 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

footer.admin-footer .footer-links a:hover {
    color: #3498db !important;
}

footer.admin-footer .social-links {
    display: flex !important;
    gap: 1rem !important;
}

footer.admin-footer .social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 50% !important;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

footer.admin-footer .social-link:hover {
    background: #3498db !important;
    transform: translateY(-2px) !important;
}

footer.admin-footer .contact-info p {
    color: #bdc3c7 !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    align-items: flex-start !important;
}

footer.admin-footer .contact-info i {
    margin-top: 0.25rem !important;
    margin-right: 0.5rem !important;
    color: #3498db !important;
}

footer.admin-footer .footer-divider {
    border-color: rgba(255,255,255,0.1) !important;
    margin: 2rem 0 1rem !important;
}

footer.admin-footer .footer-bottom {
    padding: 1rem 0 !important;
    background: transparent !important;
}

footer.admin-footer .copyright {
    color: #95a5a6 !important;
    margin: 0 !important;
}

footer.admin-footer .footer-bottom-links {
    display: flex !important;
    gap: 2rem !important;
    justify-content: flex-end !important;
}

footer.admin-footer .footer-bottom-links a {
    color: #95a5a6 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: color 0.3s ease !important;
}

footer.admin-footer .footer-bottom-links a:hover {
    color: #3498db !important;
}

/* Fix spacing before footer */
.quick-actions-section {
    margin-bottom: 5rem !important;
    padding-bottom: 2rem !important;
}

.admin-dashboard .container-fluid {
    padding-bottom: 4rem !important;
}

/* Responsive */
@media (max-width: 768px) {
    footer.admin-footer .footer-bottom-links {
        justify-content: flex-start !important;
        margin-top: 1rem !important;
    }
    
    footer.admin-footer .text-end {
        text-align: left !important;
    }
}

/* Admin Dashboard Spacing Fixes */
.admin-dashboard {
    background-color: #f8f9fc;
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-dashboard .container-fluid {
    padding: 0 15px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header spacing */
.admin-dashboard .d-flex.justify-content-between {
    margin-bottom: 2rem !important;
    padding: 1rem 0;
}

/* Stats cards spacing */
.admin-dashboard .row.mb-5 {
    margin-bottom: 3rem !important;
}

/* Card spacing */
.admin-dashboard .card {
    margin-bottom: 2rem !important;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
}

.admin-dashboard .card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e3e6f0;
}

.admin-dashboard .card-body {
    padding: 1.5rem;
}

/* Quick Actions spacing */
.quick-actions-section {
    margin-top: 3rem !important;
    margin-bottom: 4rem !important;
    padding: 2rem 0;
}

.quick-actions-section .card {
    margin-bottom: 0 !important;
}

.quick-actions-section .btn-block {
    padding: 1rem 0.5rem;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quick-actions-section .btn-block i {
    margin-bottom: 0.5rem;
}

/* List group spacing */
.admin-dashboard .list-group-item {
    padding: 1rem 1.25rem;
    border: 1px solid #e3e6f0;
    margin-bottom: -1px;
}

.admin-dashboard .list-group-item:first-child {
    border-top-left-radius: 0.35rem;
    border-top-right-radius: 0.35rem;
}

.admin-dashboard .list-group-item:last-child {
    border-bottom-left-radius: 0.35rem;
    border-bottom-right-radius: 0.35rem;
}

/* Button spacing */
.admin-dashboard .btn {
    margin: 0.25rem;
}

/* Ensure proper spacing between sections */
.admin-dashboard .row {
    margin-bottom: 2rem;
}

.admin-dashboard .row:last-child {
    margin-bottom: 0;
}

/* Footer spacing fix */
footer.admin-footer {
    margin-top: 4rem !important;
    padding: 60px 0 0 !important;
}

/* Stats cards specific spacing */
.admin-dashboard .mb-4 {
    margin-bottom: 1.5rem !important;
}

.admin-dashboard .shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

/* Text spacing in cards */
.admin-dashboard .h5 {
    margin-bottom: 0.5rem !important;
}

.admin-dashboard .text-xs {
    margin-bottom: 0.25rem !important;
}

/* Responsive spacing */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 1rem 0;
    }
    
    .admin-dashboard .container-fluid {
        padding: 0 10px;
    }
    
    .admin-dashboard .d-flex.justify-content-between {
        margin-bottom: 1.5rem !important;
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-dashboard .row.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .quick-actions-section {
        margin-top: 2rem !important;
        margin-bottom: 3rem !important;
        padding: 1.5rem 0;
    }
    
    .quick-actions-section .col-md-3 {
        margin-bottom: 1rem;
    }
    
    footer.admin-footer {
        margin-top: 3rem !important;
        padding: 40px 0 0 !important;
    }
}

@media (max-width: 576px) {
    .admin-dashboard {
        padding: 0.5rem 0;
    }
    
    .admin-dashboard .card-body {
        padding: 1rem;
    }
    
    .admin-dashboard .card-header {
        padding: 0.75rem 1rem;
    }
}

/* Gallery Section Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.gallery-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-actions {
    display: flex;
    gap: 1rem;
    color: white;
    font-weight: 600;
}

.gallery-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.gallery-stat i {
    font-size: 1rem;
}

.gallery-caption {
    padding: 1.25rem;
    border-top: 1px solid #f8f9fa;
}

.gallery-caption p {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Social Media CTA Styles */
.social-cta {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 2px solid #f8f9fa;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.social-cta h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.text-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-facebook {
    color: #1877F2 !important;
}

.btn-instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
}

.btn-instagram:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.4);
}

.btn-facebook {
    background: linear-gradient(45deg, #1877F2, #166FE5, #1466CC);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.btn-facebook:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

/* Responsive Design for Gallery */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-cta {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-cta {
        padding: 1.5rem 1rem;
    }
    
    .btn-instagram,
    .btn-facebook {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* Member Cards Styling */
.member-card-home {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.member-card-home:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.member-avatar-container {
    margin-bottom: 1rem;
}

.member-avatar-home {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.default-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 2rem;
    border: 4px solid var(--secondary-color);
}

.member-info {
    margin-bottom: 1rem;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.member-admission {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.member-profession {
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.4;
}

.company {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.member-actions {
    margin-top: auto;
}

/* Leader Cards Styling */
.leader-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1rem; /* Reduced padding */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.leader-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.leader-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.3);
}

.leader-avatar-container {
    position: relative;
    margin-bottom: 1rem;
}

.leader-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.leader-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.leader-info {
    margin-bottom: 1rem;
}

.leader-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.leader-admission {
    opacity: 0.9;
    font-size: 0.9rem;
}

.leader-actions .btn {
    border-color: white;
    color: white;
    background: rgba(255,255,255,0.1);
}

.leader-actions .btn:hover {
    background: white;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 576px) {
    .col-sm-6 {
        padding: 0.5rem;
    }
    
    .member-card-home,
    .leader-card {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .member-avatar-home,
    .leader-avatar {
        width: 80px;
        height: 80px;
    }
    
    .member-name,
    .leader-name {
        font-size: 1rem;
    }
    
    .member-admission,
    .leader-admission {
        font-size: 0.8rem;
    }
    
    .member-profession {
        font-size: 0.8rem;
    }
}

/* Section Styling */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* Button Styling */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}


/* Members Page Specific Styles */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
}

.member-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    background: white;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.member-avatar-container {
    position: relative;
}

.member-avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.default-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2rem;
    border: 4px solid var(--secondary-color);
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.3;
}

.member-admission {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.member-profession {
    line-height: 1.4;
}

.member-profession strong {
    color: #34495e;
    font-size: 0.9rem;
}

.member-profession small {
    font-size: 0.8rem;
}

.member-actions {
    margin-top: 1rem;
}

.member-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .col-xxl-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (max-width: 1200px) {
    .col-xl-2 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 992px) {
    .col-lg-3 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 768px) {
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .member-avatar,
    .default-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
    
    .member-name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .member-avatar,
    .default-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.25rem;
    }
    
    .member-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 400px) {
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Search Form Enhancement */
.input-group-lg .form-control {
    border-radius: 10px 0 0 10px;
    border: 2px solid;
}

.input-group-lg .btn {
    border-radius: 0 10px 10px 0;
}

/* Badge Enhancement */
.badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
}


/* Header Section Spacing */
.header-section {
    padding: 2rem 0 1rem 0;
    border-bottom: 1px solid #e9ecef;
    margin: 0 -15px 2rem -15px;
    padding-left: 15px;
    padding-right: 15px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

.page-description {
    max-width: 600px;
}

.page-description .lead {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #6c757d;
}

/* Search Section Spacing */
.search-section {
    margin-bottom: 2rem;
}

.search-section .input-group {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.search-section .form-control {
    border-color: #fff;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.search-section .form-control:focus {
    box-shadow: none;
    border-color: #667eea;
}

.search-section .btn {
    padding: 1rem 1.5rem;
}

/* No Content Placeholder */
.no-content {
    padding: 4rem 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 15px;
}

.no-content h5 {
    font-weight: 600;
    color: #6c757d;
}

.no-content p {
    color: #95a5a6;
}

.lightbox-profile {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
}

.lightbox-header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.lightbox-profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
}

.lightbox-profile-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.lightbox-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.lightbox-title {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.lightbox-admission {
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.lightbox-body {
    padding: 30px;
}

.lightbox-section {
    margin-bottom: 25px;
}

.lightbox-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

.lightbox-table {
    width: 100%;
}

.lightbox-table td {
    padding: 6px 0;
    vertical-align: top;
}

.lightbox-table td:first-child {
    width: 120px;
    font-weight: 600;
    color: #495057;
}

.lightbox-social-icons a {
    display: inline-block;
    margin-right: 12px;
    color: #6c757d;
    transition: color 0.3s;
}

.lightbox-social-icons a:hover {
    color: #2575fc;
}

.lightbox-contact-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lightbox-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
    color: white;
}

/* ===== MOBILE OPTIMIZATION FOR HOMEPAGE ===== */

/* Force 2-column layout for member cards on mobile */
@media (max-width: 768px) {
    /* Featured Members Section */
    .section-py .row .col-sm-6,
    .section-py .row .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0.5rem !important;
    }
    
    /* Member cards mobile optimization */
    .member-card-home {
        padding: 1rem 0.75rem !important;
        margin-bottom: 0.5rem;
        height: auto;
        min-height: 280px;
    }
    
    .member-avatar-home,
    .default-avatar {
        width: 70px !important;
        height: 70px !important;
        font-size: 1.5rem !important;
    }
    
    .member-name {
        font-size: 0.95rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.2 !important;
    }
    
    .member-admission {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .member-profession {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .member-profession strong {
        font-size: 0.8rem !important;
    }
    
    .company {
        font-size: 0.75rem !important;
    }
    
    /* Set Leader cards mobile optimization */
    .leader-card {
        padding: 1rem 0.75rem !important;
        margin-bottom: 0.5rem;
        height: auto;
        min-height: 260px;
    }
    
    .leader-avatar {
        width: 70px !important;
        height: 70px !important;
    }
    
    .leader-badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.6rem !important;
        bottom: -5px !important;
        white-space: normal !important;
        max-width: 90%;
        word-wrap: break-word;
    }
    
    .leader-name {
        font-size: 0.95rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .leader-admission {
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Button optimization */
    .member-actions .btn,
    .leader-actions .btn {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    /* Gallery mobile optimization */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    /* Announcements mobile optimization */
    .announcement-card {
        margin-bottom: 1rem;
    }
    
    /* Section spacing */
    .section-py {
        padding: 3rem 0 !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
    }
}

/* Extra small devices (phones under 400px) */
@media (max-width: 400px) {
    .section-py .row .col-sm-6,
    .section-py .row .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
    
    .member-card-home,
    .leader-card {
        min-height: auto;
        padding: 1rem !important;
    }
    
    .member-avatar-home,
    .leader-avatar,
    .default-avatar {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.25rem !important;
    }
}

/* Fix set leader badge positioning */
.leader-avatar-container {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem; /* Space for badge */
}

.leader-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95) !important;
    color: #667eea !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.5);
    max-width: 90%;
    text-align: center;
}

/* Ensure proper card heights */
.member-card-home,
.leader-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.member-info,
.leader-info {
    flex: 1;
}

.member-actions,
.leader-actions {
    margin-top: auto;
}

/* Disable hover effects on mobile for better performance */
@media (max-width: 768px) {
    .member-card-home:hover,
    .leader-card:hover,
    .announcement-card:hover,
    .gallery-item:hover {
        transform: none !important;
    }
}

/* Fix gallery grid for mobile */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Ensure consistent grid spacing */
.row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

@media (max-width: 768px) {
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

/* Member Details Page Styles */
.member-avatar-large {
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card {
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.list-unstyled li {
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
}

.list-unstyled li:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .member-avatar-large {
        margin-bottom: 1rem;
    }
}

/* Gallery Styles */
.gallery-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.photo-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.photo-card .photo-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover .photo-actions {
    opacity: 1;
}

/* Modal Gallery Styles */
.carousel-item img {
    max-height: 70vh;
    object-fit: contain;
}

/* Loading animation for gallery */
.gallery-loading {
    position: relative;
    min-height: 200px;
}

.gallery-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-card .card-img-top {
        height: 150px;
    }
    
    .photo-card {
        margin-bottom: 15px;
    }
}

.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-item a:hover {
    text-decoration: none;
}

.gallery-item .gallery-caption {
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.gallery-item .gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 200px;
}

.gallery-item .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item .gallery-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.gallery-item .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item .gallery-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item .gallery-stat {
    color: white;
    font-size: 0.9rem;
}

.gallery-item .gallery-action-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.gallery-item:hover .gallery-action-btn {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-item .gallery-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item .gallery-image {
        height: 200px;
    }
}