/* Base page styles and font settings */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #333;
}
/* Page content wrapper with centered max width */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header and navigation
   - Fixed to the top of the viewport so it remains visible while scrolling
   - Uses a light blue overlay plus a background image for visual style
*/
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    min-height: 0; /* ensures padding does not collapse */

    background-image:
        linear-gradient(rgba(173, 216, 230, 0.5), rgba(173, 216, 230, 0.5)),
        url('/images/header_bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #ADD8E6;

    color: #fff;
    padding: 10px 10px;
}
/* Logo styling */
.header-logo {
    height: 50px; /* set desired logo height */
    width: auto;
    display: block;
    pointer-events: auto; /* allow interactions if necessary */
}

/* Ensure page content is not hidden under the fixed header */
body .container {
    padding-top: 10px;
}


nav { 
    text-align: right; 

    padding-right: 10px;
}
nav a { 
    color: #555; 
    text-decoration: none; 
    margin-left: 30px; 
    font-weight: bold; 

    display: inline-block; 
    min-width: 80px; 
    text-align: center;
    
    border: none;
    border-bottom: 2px solid transparent; 
    
    padding: 5px 0; 
    border-radius: 0; 
}

/* Link hover effects for navigation */
nav a:hover {
    background-color: transparent;
    color: #3786f4;
    border-bottom: 2px solid #3786f4;
    transition: border-bottom 0.3s;
}

/* Heading styles */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}
.hero { 
    text-align: center; 
    padding: 40px 20px; 
    margin-top: 10px; /* 제목 위 간격 유지 */
}
h1 { 
    font-size: 4em; 
    color: #333; 
}
h2 { 
    font-size: 1.8em; 
    color: #5576a3; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 5px; 
    margin-top: 30px; 
}
h3 { 
    font-size: 1.8em; 
    color: #555; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 5px; 
    margin-top: 30px; 
}

h4 { 
    font-size: 2.5em; 
    color: #555; 
    /*border-bottom: 1px solid #eee;*/ 
    /*padding-bottom: 5px;*/ 
    margin-top: 30px; 
}

/* Mission / intro section: image and text side-by-side on wide screens
   - Uses flexbox, wraps on narrow screens */
.mission-section {
    display: flex;
    align-items: flex-start; /* align image/text at top */
    margin: 40px 0;
    gap: 30px;
    flex-wrap: wrap;
}
.mission-text {
    flex: 1; /* flexible column */
    min-width: 200px;
}
.mission-image {
    flex: 1;
    text-align: center;
    min-width: 200px;
}
.mission-image img {
    max-width: 100%;
    height: auto;
    padding: 5px;
}


/* Card-style box for events: subtle border, background and shadow */
.event-item-boxed {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 25px;
    background-color: #f7f7f7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.event-item-boxed p {
    font-size: 1em;
    line-height: 1.6;
}
.event-item-boxed h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px dashed #ddd; 
    padding-bottom: 5px;
}

/* Contact form styles */
form {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
}
form label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}
form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}
form button {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
}

/* Member grid (3-column layout on wide screens) */
.member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* spacing between cards */
    margin-top: 10px;
    padding-bottom: 50px;
    border-radius: 10%;
}

.member-card {
    text-align: center;
    padding: 20px 10px;
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);

    /* Use flex to vertically stack and align content */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* Profile photo container: sized roughly to a 3:4 ratio and acts as a frame */
.profile-photo {
    width: 160px; /* fixed frame width */
    height: 220px; /* ~3:4 aspect ratio */
    overflow: hidden; /* hide anything outside the frame */

    background-color: #E0F2F7; /* light pastel cyan placeholder */
    border: 1px solid #f8fbfb;
    border-radius: 10%; /* small rounding */

    display: block;
    margin: 0 auto 15px auto; /* center and separate from content below */
}

/* Ensure the image fills the frame while preserving aspect ratio.
   object-fit: cover will crop overflow to fill the container. */
.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: auto; /* allow interactions for images that need them */
}

.member-name {
    font-size: 1.3em;
    color: #333;
    margin: 5px 0; /* 위아래 간격 5px */
}

.member-role {
    font-size: 1.1em;
    color: #5576a3;
    font-weight: 500;
    margin: 0; /* 위아래 간격 없애서 이름과 더 가깝게 */
}

/* Global image defaults
   - Prevent image selection to avoid accidental selection while dragging the page
   - Disable pointer events by default; individual elements may override with "pointer-events: auto" */
img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

/* 푸터 */
footer { 
    text-align: center; 
    padding: 20px; 
    background-color: #f4f4f4; 
    color: #666; 
    font-size: 0.9em; 
    margin-top: 40px; 
}

/* Responsive: switch member grid to 2 columns on tablets and smaller */
@media (max-width: 768px) {
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* reduced gap for smaller screens */
        padding-left: 0;
        padding-right: 0;
    }

    /* Reduce card padding slightly on mobile */
    .member-card {
        padding: 10px 5px;
    }
}

/* Extra small screens: reduce container horizontal padding */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}