/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'NanumSquareNeo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* 웹사이트 전체 배경으로 그라데이션을 깔고, 화면에 고정시킵니다 */
    background: linear-gradient(135deg, #7ecbf2 0%, #b8d4f8 35%, #e1d3ee 70%, #f7cad0 100%);
    background-attachment: fixed; 
    color: #2c2c2c;
    line-height: 1.8;
    word-break: keep-all;
}

/* 네비게이션 바 (상단 메뉴) */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px; /* 네비게이션 바 높이에 맞춘 적당한 크기 */
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #2b3a4a;
}

/* HOME (첫 화면) - 유비니티 브랜드 파스텔 그라데이션 적용 */
.hero-section {
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 200px; /* 상단 메뉴바를 피할 수 있도록 위쪽 여백을 넉넉히 줍니다 */
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
}

/* 메인 화면 로고 이미지 크기 설정 */
.hero-logo {
    max-width: 200px; /* 로고 최대 크기를 250px로 제한하여 아담하게 만듭니다 */
    width: 60%;
    height: auto;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
    color: #1e293b;
}

.hero-content p {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #334155;
}

.hero-content .subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: #475569;
}

/* ABOUT 섹션 */
.about-section {
    min-height: 80vh; /* 화면의 80% 높이를 여유롭게 차지함 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 내용을 세로 정중앙에 배치 */
    padding: 180px 20px 60px 20px;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.about-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: #1e293b;
    letter-spacing: 3px;
}

/* ABOUT 글자만 연한 회파랑색으로, 굵기도 얇게 설정 */
.light-text {
    color: #7f8ea3; /* 너무 연하지 않게, 본문보단 부드러운 중간 톤의 세련된 회파랑색 */
    font-weight: 400; 
}

.about-text p {
    font-size: 1.15rem;
    color: #475569;
    margin-bottom: 35px; /* 문단 사이 여백을 확 넓혀 시원하게 */
    line-height: 2.1; /* 줄간격도 늘려서 여유롭게 */
}

.about-text strong {
    color: #0f172a;
    font-weight: 700;
}

.mobile-br {
    display: none;
}

/* 모바일 화면 최적화 (반응형) */
@media (max-width: 768px) {
    html {
        font-size: 85%;
    }
    
    nav {
        padding: 15px 20px;
    }

    .nav-links {
        display: none; /* 모바일 메뉴는 추후 추가 */
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .hero-content .subtitle {
        font-size: 0.95rem;
    }

    .about-section {
        padding: 80px 20px;
    }

    .pc-br {
        display: none;
    }
    /* 모바일에서는 모바일용 줄바꿈이 작동하게 켭니다! */
    .mobile-br {
        display: block;
    }
}

/* 기본 상태에서는 모바일 메뉴/버튼 숨김 */
.menu-toggle, .mobile-sidebar, .sidebar-overlay {
    display: none;
}

/* 모바일 화면(768px 이하)일 때 동작 */
@media (max-width: 768px) {
    /* PC 메뉴 숨김 */
    .nav-links {
        display: none;
    }

    /* 햄버거 버튼 디자인 */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        cursor: pointer;
        z-index: 1002;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2.5px;
        background-color: #1e293b;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* 햄버거 버튼이 X자로 변하는 애니메이션 (메뉴 열렸을 때) */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }

    /* 우측에서 슬라이드 되어 나오는 사이드바 박스 */
    .mobile-sidebar {
        display: block;
        position: fixed;
        top: 0;
        right: -260px; /* 평소에는 화면 오른쪽 밖에 숨어있음 */
        width: 260px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        padding-top: 100px;
    }

    /* 메뉴가 열렸을 때 (right: 0으로 튀어나옴) */
    .mobile-sidebar.open {
        right: 0;
    }

    .sidebar-links {
        list-style: none;
        padding: 0 30px;
    }

    .sidebar-links li {
        margin-bottom: 25px;
    }

    .sidebar-links a {
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 700;
        color: #1e293b;
        transition: color 0.2s;
    }

    .sidebar-links a:hover {
        color: #7f8ea3;
    }

    /* 사이드바 열렸을 때 뒷배경 어둡게 처리하는 반투명 판 */
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    /* About 섹션 위쪽에 여백(마진)을 줍니다 */
    .about-section {
        margin-top: 50px; /* 80px이 너무 넓거나 좁으면 숫자를 조절해 보세요! */
    }
}

/* 웹사이트의 모든 이미지에 대해 드래그 및 저장 방지 적용 */
img {
    -webkit-user-select: none;
    -webkit-touch-callout: none; /* 스마트폰에서 이미지를 꾹 눌렀을 때 메뉴가 뜨는 것 방지 */
    pointer-events: none; /* 이미지를 터치하거나 클릭하는 상호작용 자체를 막음 */
}

/* =========================================
   인트로 화면 (Fade-in / Fade-out)
========================================= */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7ecbf2 0%, #b8d4f8 35%, #e1d3ee 70%, #f7cad0 100%);
    z-index: 9999; /* 화면 가장 위에 오도록 (네비게이션 바보다 높게) */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out; /* 1초 동안 부드럽게 사라지는 효과 */
}

/* 자바스크립트가 이 클래스를 추가하면 투명해집니다 */
#intro-screen.fade-out {
    opacity: 0;
    pointer-events: none; /* 투명해진 뒤 클릭을 방해하지 않도록 처리 */
}

/* 로고가 살짝 아래에서 위로 스르륵 나타나는 효과 */
.intro-logo {
    width: 250px; /* 로고 크기가 너무 크면 숫자를 줄여보세요 */
    animation: fadeInLogo 1.5s ease-in-out forwards;
}

@keyframes fadeInLogo {
    0% { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* =========================================
   본문 페이드인 (인트로 끝난 후 나타남)
========================================= */
/* 1. 처음에는 메뉴와 본문의 글자들을 투명하게(opacity: 0) 숨겨둡니다 */
nav, .hero-section, .about-section, .members-section, .activities-section {
    opacity: 0;
    transition: opacity 1s ease-in-out; /* 1초 동안 부드럽게 나타나는 효과 */
}

/* 2. 자바스크립트가 body에 'show-content'라는 신호를 주면 투명도를 1로 되돌립니다 */
body.show-content nav,
body.show-content .hero-section,
body.show-content .about-section,
body.show-content .members-section,
body.show-content .activities-section {
    opacity: 1;
}

/* =========================================
   MEMBERS 섹션 스타일 (PC 화면)
========================================= */
.members-section {
    padding: 100px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.members-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: #1e293b;
    letter-spacing: 3px;
}

.members-grid {
    display: flex;
    justify-content: center;
    gap: 35px; /* 카드가 작아진 만큼 사이 간격을 예쁘게 띄웁니다 */
    flex-wrap: wrap;
}

.member-card {
    cursor: pointer;
    transition: transform 0.3s ease;
    
    /* 👇 화질이 깨지지 않도록 %를 없애고 날씬한 고정 크기(190px)로 묶어버립니다! */
    width: 190px; 

    /* 👇 스마트폰에서 터치 시 생기는 파란색 음영을 투명하게 만들어 없앱니다! */
    -webkit-tap-highlight-color: transparent;
    
    /* 👇 카드를 꾹 눌렀을 때 텍스트나 카드가 파랗게 블록 지정(선택)되는 것도 막아줍니다 */
    user-select: none;
    -webkit-user-select: none;
}

.member-card:hover {
    transform: translateY(-10px);
}

/* 🖼️ 본문 사진 (화질 보호, 부드러운 테두리) */
.member-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 2; 
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08); 
}

/* 👈 화질 깨짐을 방지하기 위해 object-fit 등 재정렬 */
.member-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top; 
    pointer-events: auto;
    display: block;
}

/* 이름 및 악기명 스타일 */
.member-info {
    font-size: 1.15rem;
    font-weight: 700;
    color: #334155;
}

/* 🎨 악기명 색상 */
.inst {
    color: #0284c7; 
    font-weight: 800;
    margin-right: 5px;
}

/* =========================================
   팝업(모달)창 스타일 
========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    /* 👇 버튼이 팝업창 안에서 오른쪽 위에 찰싹 붙도록 기준점을 만들어줍니다 */
    position: relative;
    
    background: #ffffff;
    padding: 40px; 
    border-radius: 25px;
    max-width: 850px; 
    width: 90%;
    
    /* 👈 팝업창 잘림 방지 및 스크롤 추가 */
    max-height: 85vh; /* 팝업창이 화면 높이의 85%까지만 커지도록 제한 */
    overflow-y: auto; /* 내용이 길면 팝업창 내부에 스크롤이 생기게 합니다 */
    
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    /* 👇 아래에서 위로 올라오는 효과를 없애고 제자리에서 바로 뜨게 만듭니다 */
    transform: translateY(0);
    
    /* 👇 속도를 0.15s 로 줄여서 눈 안 아프고 빠르게 나타나게 합니다 */
    transition: transform 0.15s ease;
}

/* 스크롤바 예쁘게 꾸미기 (선택사항) */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* 👇 팝업 닫기 버튼 디자인 (배경 없이 깔끔하게 + 파란 영역 제거) */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none; /* 배경을 완전히 투명하게 없앱니다 */
    border: none;
    font-size: 2.2rem;
    color: #94a3b8; /* 기존의 연하고 고급스러운 색상으로 복구 */
    cursor: pointer;
    z-index: 9999; 
    line-height: 1;
    transition: color 0.2s;
    
    /* 👇 스마트폰에서 터치 시 생기는 파란색 음영 제거 */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.modal-close-btn:hover {
    color: #0f172a; /* 마우스를 올렸을 때 배경이 생기는 대신 글씨만 살짝 짙어집니다 */
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-body {
    display: flex;
    gap: 40px; 
    align-items: center;
}

/* 🖼️ 팝업 사진 원본 비율 유지 */
.modal-img-wrap {
    width: 350px; 
    border-radius: 15px;
    overflow: hidden;
}

.modal-img-wrap img {
    width: 100%;
    height: auto; 
    display: block; 
}

.modal-text {
    flex: 1;
    text-align: left;
}

/* 팝업 안의 악기명 + 이름 부분 */
.modal-text h3 {
    font-size: 1.8rem;
    margin-bottom: 25px; 
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0; 
    padding-bottom: 15px;
}

.modal-text ul {
    list-style: none;
}

/* 👈 팝업 안의 이력 사항 줄간격 및 여백 대폭 좁힘 */
.modal-text ul li {
    font-size: 1.05rem; /* 글씨도 살짝 정돈 */
    color: #475569;
    margin-bottom: 8px; /* 간격 대폭 줄임 */
    line-height: 1.5; /* 줄간격 대폭 줄임 */
    padding-left: 15px;
    text-indent: -15px; 
}

.modal-text ul li::before {
    content: "- "; 
}

/* =========================================
   📱 모바일 화면 최적화 (세로 정렬)
========================================= */
@media (max-width: 768px) {
    .members-grid {
        flex-direction: column; 
        align-items: center; 
    }
    
    .member-card {
        /* 👇 모바일 '본문(페이지)'에 있는 사진 크기를 아주 아담하게 확 줄였습니다 */
        width: 180px; 
        margin-bottom: 30px; 
    }

    .modal-body {
        flex-direction: column;
        text-align: left;
        gap: 20px;
    }
    
    .modal-text h3 {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .modal-img-wrap {
        /* 👇 모바일 '팝업창' 안에 있는 사진은 다시 크고 시원하게 키웠습니다! */
        width: 220px; 
        margin: 0 auto;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* =========================================
   ACTIVITIES 섹션 스타일 (가로 스크롤)
========================================= */
.activities-section {
    padding: 100px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.activities-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: #1e293b;
    letter-spacing: 3px;
}

/* 📱 가로로 넘겨보는 슬라이더 박스 */
.activities-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    padding-bottom: 30px; 
    -webkit-overflow-scrolling: touch; 
}

.activities-slider::-webkit-scrollbar {
    height: 10px;
}
.activities-slider::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
}
.activities-slider::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.activities-slider::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 개별 공연 카드 */
.activity-card {
    /* 👇 PC에서 카드가 절대 320px 이상으로 늘어나지 않도록 강력하게 고정합니다 */
    width: 320px;
    max-width: 320px; 
    flex: 0 0 320px; 
    
    scroll-snap-align: start; 
    background: #ffffff;
    border-radius: 20px;
    
    border: 1px solid rgba(255, 255, 255, 0.7); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08); 
    
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: grab;
}

.activity-card:active {
    cursor: grabbing;
}

/* 🖼️ 정사각형(1:1) 사진 */
.activity-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-bottom: 2px solid #f1f5f9;
}

.activity-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* (아까 넣었던 image-rendering과 transform 줄은 싹 지웠습니다!) */
}

/* 텍스트 및 링크 영역 */
.activity-info {
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px; /* 링크가 없어도 높이를 일정하게 유지 */
}

.activity-info h3 {
    font-size: 1.15rem;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 10px;
    word-break: keep-all;
    line-height: 1.4;
}

.activity-date {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 15px;
}

/* 하단 블로그 | 유튜브 링크 */
.activity-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-height: 24px; 
}

.activity-links a {
    text-decoration: none;
    color: #0284c7; 
    font-weight: 800;
    font-size: 1rem;
    transition: color 0.2s;
}

.activity-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.divider {
    color: #cbd5e1;
}

/* =========================================
   📱 모바일 화면 최적화 (가로 스크롤) - ACTIVITIES 전용
========================================= */
@media (max-width: 768px) {
    .activities-slider {
        gap: 15px;
    }
    
    .activity-card {
        /* 모바일에서는 카드를 85% 크기로 설정 (다음 카드가 살짝 보임) */
        flex: 0 0 85%; 
        max-width: 85%;
    }
}

/* =========================================
   CONTACT 섹션 스타일 (위아래 배치)
========================================= */
.contact-section {
    padding: 100px 20px;
    max-width: 800px; /* 폼이 화면 전체로 찢어지지 않게 예쁜 너비로 고정 */
    margin: 0 auto;
}

.contact-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    color: #1e293b;
    letter-spacing: 3px;
}

/* 위쪽 명함 영역 (배경 제거, 가운데 정렬) */
.contact-top-info {
    text-align: center;
    margin-bottom: 50px;
}

.contact-top-info h3 {
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 10px;
    font-weight: 800;
}

.rep-name {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 15px;
    font-weight: 700;
}

.email-address {
    font-size: 1.15rem;
    color: #0284c7;
    font-weight: 400;
    margin-bottom: 30px;
}

/* SNS 버튼들 (가운데 정렬) */
.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-btn {
    padding: 10px 20px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

.social-btn:hover {
    transform: translateY(-3px);
    background: #f8fafc;
    color: #0f172a;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

/* 아래쪽 폼 영역 */
.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.7);
    width: 100%;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #475569;
    font-weight: 700;
}

/* 폼 입력창 디자인 */
.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s;
    resize: none;
}

/* 👇 대표님 요청: 문의내용(textarea) 줄간격 넓히기 */
.input-group textarea {
    line-height: 1.8;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #38bdf8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: #0284c7; 
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background: #0369a1; 
    transform: translateY(-2px);
}

/* 맨 하단 푸터 */
footer {
    text-align: center;
    padding: 30px 20px 50px 20px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

/* =========================================
   📱 모바일 화면 최적화 (CONTACT)
========================================= */
@media (max-width: 768px) {
    .contact-form {
        padding: 30px 20px; /* 스마트폰에서는 폼 안쪽 여백을 적당히 줄여줌 */
    }
}
