/* Messages Section Styles */
.messages {
    padding: 40px 0;
    /* Reduced from 80px */
    background: var(--light-bg);
}

.message-box {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    border: 2px solid var(--primary-blue);
    /* Add border */
}

.message-box:hover {
    background-color: #f0f4f8;
    /* Light background color on hover */
}

.message-box:hover .message-content h3,
.message-box:hover .message-content p {
    color: #1e40af;
    /* Highlight text color on hover */
}

.message-box:hover .message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #1e40af;
    /* Outline border */
    border-radius: 10px;
    box-sizing: border-box;
    pointer-events: none;
}

.message-image {
    flex: 0 0 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.message-image img {
    width: 300px;
    /* Set the width of the image */
    height: 300px;
    /* Set the height of the image */
    object-fit: cover;
    /* Ensure the image covers the area without distortion */
    border-radius: 50%;
    /* Make the image circular */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Add a subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.message-content {
    flex: 1;
}

.message-content h3,
.message-content p {
    color: var(--primary-blue);
    /* Default text color */
}

.signature {
    display: block;
    font-family: 'Dancing Script', cursive;
    font-size: 24px;
    margin-top: 20px;
    color: var(--primary-blue);
}

/* Responsive rules for Principal / Chairman messages */
@media (max-width: 768px) {
    .messages {
        padding: 40px 0;
    }

    .message-box {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 16px;
        margin-bottom: 30px;
    }

    .message-image {
        flex: 0 0 auto;
        width: 200px;
        height: 200px;
        margin: 0 auto;
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    }

    .message-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .message-content {
        text-align: center;
        padding: 0 8px;
    }

    .message-content h3 {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }

    .message-content p {
        font-size: 0.95rem;
    }
}

/* Extra small screens: slightly reduce image so it doesn't overflow */
@media (max-width: 380px) {
    .message-image {
        width: 160px;
        height: 160px;
    }

    .message-content h3 {
        font-size: 1.1rem;
    }

    .message-content p {
        font-size: 0.9rem;
    }
}
