/* Contact Box Component Styles */
.contact-box {
    flex: 0 0 min(25%, 240px);
    width: min(25%, 240px);
    position: sticky;
    top: 96px;
    align-self: flex-start;
    transform-origin: top center;
}

.contact-box-section {
    background-color: #f4f4f4;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #a5a5a5;
}

.contact-box-section h3 {
    font-size: 1.04rem;
    font-weight: 600;
    color: #040D81;
    margin-bottom: 12px;
    line-height: 1.3;
}

.contact-box-avatar {
    text-align: center;
    margin-bottom: 12px;
}

.contact-box-avatar img {
    width: 100%;
    height: auto;
    border-radius: 6.4px;
    object-fit: cover;
    border: 2.4px solid #a5a5a5;
    aspect-ratio: 1 / 1;
}

.contact-box-user {
    font-size: 0.704rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 16px;
    text-align: center;
}

/* Contact Modal Styles */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.contact-modal-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    max-width: 765px;
    width: 85%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 17px 51px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.contact-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #a5a5a5;
    cursor: pointer;
    padding: 7px;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.contact-modal-close:hover {
    background-color: #f4f4f4;
    color: #000000;
}

/* Modal responsive styles */
@media (max-width: 768px) {
    .contact-modal {
        top: 40px; /* Start below the mobile menu */
        width: 100%;
        height: 100vh;
    }

    .contact-modal-content {
        width: 100%;
        height: 100%;
        max-height: none;
        margin: 0;
        border-radius: 0;
    }
}

/* Responsive layout for screens < 1200px */
@media (max-width: 1199px) {
    .contact-box {
        display: none; /* Hide contact box on screens < 1200px */
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .contact-box {
        position: static;
        flex: none;
        width: 100%;
        order: 2; /* Place after content */
    }

    .contact-box-section {
        padding: 20px;
        margin-bottom: 20px;
    }
}

/* Very small mobile modal adjustments */
@media (max-width: 480px) {
    .contact-modal {
        top: 36px; /* Start below the smaller mobile menu */
        width: 100%;
        height: 100vh;
    }
}
