/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 패딩과 테두리를 너비/높이에 포함시켜 레이아웃 문제를 방지합니다. */
    /* 웹페이지 전체 드래그 방지 (우회 가능) */
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;         /* Non-prefixed version */
}
/* 특정 요소 (링크, 버튼, 입력 필드 등)는 선택 가능하도록 재정의 */
a, button, input, textarea { /* input, textarea 추가 */
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* 폰트 설정 (Google Fonts - Noto Sans KR) */
body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa; /* 밝고 깨끗한 배경색 */
    color: #333;
    /* CSS 스크롤 오프셋 처리를 위한 scroll-padding-top 추가 (JavaScript에서 동적으로 설정됨) */
    /* scroll-padding-top: var(--header-height); */
    transition: scroll-padding-top 0.3s ease; /* 헤더 높이 변경 시 부드러운 전환 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* body.no-scroll 클래스는 모바일 메뉴가 활성화되었을 때 스크롤을 막기 위해 사용됩니다. */
body.no-scroll {
    overflow: hidden;
}

/* :root에 변수로 헤더 높이 정의하여 재사용 가능하게 함 */
:root {
    --header-height: 85px; /* 초기 헤더 높이 (CSS 변수) */
    --compact-header-height: 70px; /* 스크롤 시 축소될 헤더 높이 (CSS 변수) */
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 링크 스타일 */
a {
    text-decoration: none;
    color: #3498db; /* 길드 테마 색상 (푸른 계열) */
}

/* 리스트 스타일 */
ul {
    list-style: none;
}


/* ==================== 헤더 스타일 ==================== */
header {
    background: #2c3e50; /* 어두운 색상으로 안정감 */
    color: #ecf0f1;
    border-bottom: 3px solid #3498db; /* 테마 색상으로 경계 강조 */
    position: fixed; /* sticky 대신 fixed 사용 */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height); /* 변수 사용 */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease; /* 부드러운 전환 */
    display: flex; /* 내부 요소(header-content)를 flex로 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    padding: 0 20px; /* 헤더 자체의 좌우 패딩 */
}

/* 스크롤 시 헤더 스타일 (JS에서 .sticky 클래스 추가) */
header.sticky {
    height: var(--compact-header-height); /* 축소된 높이 */
    background: rgba(44, 62, 80, 0.95); /* 약간 불투명하게 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 0; /* padding: 0 20px;이 이미 적용되어 있으므로 덮어쓰지 않고 기본값 유지 */
}

/* 헤더 내부 컨텐츠를 위한 새로운 래퍼 (index.html에도 이 구조가 필요) */
header .header-content {
    display: flex;
    justify-content: space-between; /* 로고와 내비게이션/토글 버튼을 양 끝에 배치 */
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto; /* 헤더 내부 컨텐츠 중앙 정렬 */
}

/* 로고 스타일 - 깔끔하고 세련된 효과 */
.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    display: inline-block; /* 변형 및 그림자 효과를 위해 필요 */
    color: #ecf0f1; /* 초기 텍스트 색상 (밝은 회색) */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4); /* 기본 그림자로 은은한 깊이감 */
    transition: all 0.3s ease-in-out; /* 모든 전환 효과에 대해 부드러운 애니메이션 */
    position: relative; /* z-index 또는 기타 요소 위치 기준 */
}

.logo a:hover {
    transform: translateY(-2px) scale(1.02); /* 살짝 위로 이동하며 미세하게 커짐 */
    text-shadow: 1px 1px 5px rgba(207, 202, 255, 0.7); /* 테마색(파란색)으로 은은하게 빛나는 그림자 강조 */
    
    /* 텍스트에 세련된 그라데이션 필 효과 적용 */
    background: linear-gradient(45deg, #f3d8ff, #a0bbff); /* 길드 테마색(파랑~옅은 보라) 계열의 그라데이션 */
    -webkit-background-clip: text; /* 웹킷 브라우저용 (사파리 등) */
    background-clip: text;        /* 표준 (크롬, 파이어폭스 등) - 이 줄을 추가 */
    -webkit-text-fill-color: transparent;
    background-size: 150% auto;
    background-position: center;
}

/* 로고 이미지 스타일 (예시, 필요시 index.html에 img 추가) */
/* .logo .logo-image {
    height: 40px;
    margin-right: 10px;
} */

/* 메인 내비게이션 (데스크톱) */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    color: #ecf0f1;
    font-weight: 400;
    transition: color 0.3s ease, transform 0.2s ease; /* 호버 효과 추가 */
    padding: 5px 0;
    position: relative; /* 밑줄 애니메이션 기준점 */
}

.main-nav ul li a::after { /* 밑줄 애니메이션 */
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px; /* 링크 아래로 */
    width: 0%;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

.main-nav ul li a:hover {
    color: #3498db;
    transform: translateY(-2px); /* 살짝 떠오르는 효과 */
}


/* 햄버거 메뉴 토글 버튼 */
.menu-toggle {
    display: none; /* 기본적으로 숨김 (데스크톱) */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* 메뉴보다 위에 */
    position: relative; /* 애니메이션 기준 */
    /* order: 1; -> @media (max-width: 768px) 내에서 정의됨 */
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}
.menu-toggle:hover {
    color: #3498db;
}

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

/* 햄버거 아이콘 X자 변환 애니메이션 */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}


/* ==================== Hero Section (메인 비주얼 영역) ==================== */
.hero-section {
    color: #ffffff;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden; 
    margin-top: var(--header-height); /* 헤더 높이만큼 콘텐츠 시작 위치 조정 */
    transition: margin-top 0.3s ease;
}

/* 배경 슬라이드들을 감싸는 래퍼 */
.hero-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* 콘텐츠 및 오버레이 뒤에 배치 */
    overflow: hidden; 
}

/* data-index가 1인 슬라이드의 hero-image에만 적용 */
.hero-background-slide[data-index="1"] .hero-image {
    background-position: center bottom;
}

/* 개별 배경 슬라이드 */
.hero-background-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* 기본적으로 투명 */
    /* transform 속성은 더 이상 사용하지 않습니다. */
    transition: opacity 1.2s ease-in-out; /* 크로스페이드 전환 시간 (1.2초) */
    z-index: 0; /* 기본 z-index */
    pointer-events: none; /* 배경 슬라이드에 마우스 이벤트 방지 */
    background-size: cover;       /* 컨테이너를 꽉 채우되 비율 유지 */
    background-repeat: no-repeat; /* 이미지 반복 방지 */
    background-position: center center; /* 기본은 중앙 (필요 시 수정) */
}

/* 활성화된 배경 슬라이드 (불투명하게 나타남) */
.hero-background-slide.active {
    opacity: 1; /* 불투명하게 */
    /* transform 속성 제거 */
    z-index: 1; /* 가장 높은 레이어에 위치 */
}

/* Hero 배경 비디오 */
.hero-video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    filter: brightness(0.7);
    position: absolute;
    top: 0; left: 0;
}

/* Hero 배경 이미지 (banner.png) */
.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
}

/* Hero 배경 오버레이 */
.hero-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(135deg, rgba(117, 84, 159, 0.85) 0%, rgba(23, 150, 234, 0.7) 100%); */
    background: linear-gradient(135deg, rgba(117, 84, 159, 0.5) 0%, rgba(23, 150, 234, 0.5) 100%);
    z-index: 2; /* Hero 슬라이드 위에 배치, Hero 콘텐츠 뒤 */
}

.hero-content {
    position: relative;
    z-index: 3; /* 히어로 콘텐츠를 가장 앞으로 */
    max-width: 900px;
    padding: 0 20px;
}


/* ==================== Hero 슬라이더 컨트롤 및 페이지네이션 ==================== */
.hero-controls {
    position: absolute;
    bottom: 40px; /* Hero 섹션 하단에서 40px 위 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 4; /* 콘텐츠보다 위에 배치 */
    width: calc(100% - 40px); /* 뷰포트 여백 20px * 2 (데스크톱) */
    max-width: 1200px;
    /* padding: 0 20px; -> .container가 처리하므로 여기서는 제거 */
}

.hero-controls .control-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-controls .prevnext button {
    background: rgba(0,0,0,0.5); /* 반투명한 어두운 배경 */
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: background 0.3s ease;
    visibility: visible; /* 기본적으로 보이게 설정 */
    text-indent: -9999px; /* 텍스트 숨김 */
    width: 40px; /* 버튼 너비 */
    height: 40px; /* 버튼 높이 */
    position: relative; /* 화살표 아이콘 위치 기준 */
}
.hero-controls .prevnext button:hover {
    background: rgba(0,0,0,0.7);
}

/* 버튼 내 화살표 아이콘 */
.hero-controls .prevnext button.prev::before {
    content: '\f104'; /* Font Awesome 왼쪽 화살표 코드 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
}
.hero-controls .prevnext button.next::before {
    content: '\f105'; /* Font Awesome 오른쪽 화살표 코드 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
}

.hero-controls .pagination-dots {
    display: flex;
    gap: 10px; /* 점들 사이의 간격 */
    margin: 0; /* 불필요한 마진 제거 */
}

.hero-controls .pagination-dots .dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5); /* 반투명한 흰색 점 */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.8); /* 테두리 추가 */
}
.hero-controls .pagination-dots .dot.active {
    background: #3498db; /* 활성 점은 길드 테마색 */
    transform: scale(1.2); /* 활성 점을 살짝 키움 */
    border-color: #3498db; /* 활성 점 테두리도 테마색 */
}
.hero-controls .pagination-dots .dot:hover {
    background: rgba(255,255,255,0.8);
}


/* ==================== 스크롤 다운 안내 아이콘 ==================== */
.main-visual-scroll {
    position: absolute;
    top: calc(var(--header-height) + 50px); /* 헤더 높이 + 20px 아래로 배치 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    animation: scrollUpDown 2s ease-in-out infinite, flashEffect 2s ease-in-out infinite; /* 깜빡임 효과 추가 */
    animation-play-state: paused; /*  초기에는 애니메이션 정지 */
    cursor: pointer;
    opacity: 0; /* JS로 제어할 것이므로 초기에는 숨김 */
    pointer-events: none; /* JS로 제어할 것이므로 초기에는 클릭 비활성화 */
}
.main-visual-scroll img {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

/* ==================== 스크롤 아이콘 애니메이션 키프레임 ==================== */
@keyframes scrollUpDown {
    0%, 100% {
        transform: translate(-50%, 0); /* opacity는 JS에서 제어하므로 제거 */
    }
    50% {
        transform: translate(-50%, 15px); /* opacity는 JS에서 제어하므로 제거 */
    }
}

/* ==================== 깜빡임 효과 애니메이션 키프레임 (새로 추가) ==================== */
@keyframes flashEffect {
    0% {
        filter: brightness(1); /* 원래 밝기 */
    }
    50% {
        filter: brightness(0.8); /* 약간 더 밝아짐 (깜빡이는 효과) */
    }
    100% {
        filter: brightness(1); /* 원래 밝기 */
    }
}


/* Hero 섹션 h2 스타일 */
.hero-section h2 {
    font-size: 3.8rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    line-height: 1.3;
    min-height: 4.5rem; /* 타이핑 애니메이션 중 레이아웃 흔들림 방지 */
    opacity: 0; /* 초기 숨김 */
    transform: translateY(20px); /* 아래에서 올라오도록 */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* JS로 클래스 추가 시 부드럽게 나타나도록 */
}

/* Hero 섹션 p 스타일 */
.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
    line-height: 1.6;
}

/* 애니메이션 관련 초기 상태 */
.animated-subtext,
.animated-btn {
    opacity: 0;
    transform: translateY(20px); /* 아래에서 올라오도록 */
}

/* 텍스트 타이핑 효과를 위한 캐럿 (커서) 스타일 */
.animated-headline {
    position: relative;
    display: inline-block;
    color: #ffffff;
    white-space: nowrap;
}

.animated-headline::after {
    content: '|';
    display: inline-block;
    animation: blink-caret 0.75s step-end infinite;
    margin-left: 5px;
    vertical-align: bottom;
    color: white;
}

/* 타이핑 완료 후 헤드라인이 나타나도록 */
.animated-headline.typing-complete {
    opacity: 1;
    transform: translateY(0);
    animation: none; /* 타이핑이 완료되면 blink-caret 애니메이션을 중지합니다. */
}

/* 서브텍스트 및 버튼 나타남 */
.animated-subtext.is-visible,
.animated-btn.is-visible {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 1;
    transform: translateY(0);
}

/* CSS 애니메이션 키프레임 */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 캐럿(커서) 깜빡임 애니메이션 키프레임 */
@keyframes blink-caret {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 15px 35px;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* ==================== 공통 정보 섹션 스타일 ==================== */
.info-section {
    padding: 80px 0;
    text-align: center;
}

.info-section p strong{
    font-weight: bold;
}

.info-section.alternate-bg {
    background-color: #f1f3f5;
}

.info-section h3 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.info-section h3::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #3498db;
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.sub-heading {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-top: 50px;
    margin-bottom: 25px;
}

/* 강조 텍스트 */
.highlight-text {
    font-weight: 700;
    color: #3498db;
}

/* ==================== About 섹션 (길드 소개) ==================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.about-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.about-item h4 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    width: 100%;
}

.about-item p {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 0;
}

.icon-large {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 20px;
    display: block;
}

.guild-ranking-highlight {
    background-color: #e8f5e9;
    border-left: 5px solid #4CAF50;
    padding: 25px;
    margin-top: 50px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    line-height: 1.8;
    box-shadow: none;
}

/* ==================== Specs 및 Join 섹션 카드 스타일 ==================== */
.specs-grid, .join-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}

.spec-card, .join-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: left;
}

.spec-card:hover, .join-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.spec-card h4, .join-card h4 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.spec-card h4 i, .join-card h4 i {
    color: #3498db;
    margin-right: 10px;
    font-size: 1.8rem;
    flex-shrink: 0; 
    width: 35px; 
    text-align: center;
}

.spec-card ul, .join-card ul {
    list-style: none;
    padding-left: 0;
}

.spec-card li, .join-card li {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start; 
    line-height: 1.5;
}

.spec-card li i, .join-card li i {
    color: #2ecc71;
    font-size: 1.2rem;
    flex-shrink: 0; 
    width: 30px; 
    text-align: center; 
    margin-right: 10px; 
    margin-top: 0px; 
    padding-top: 2px; 
    box-sizing: border-box; 
}
/* ==================== 길드 하이라이트 섹션 (새로운 섹션) ==================== */
.highlights-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-top: 60px;
    background-color: #fff;
    padding: 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 10px;
}

.highlight-track {
    display: flex;
    animation: scroll-highlights 30s linear infinite;
    width: max-content;
}

.highlight-item {
    flex-shrink: 0;
    width: 250px;
    text-align: center;
    padding: 15px 20px;
    margin: 0 20px;
    border-radius: 8px;
    background-color: #f7f7f7;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: grab;
}

.highlight-item:hover {
    transform: translateY(-5px);
}

.highlight-item img {
    max-width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.highlight-item p {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

@keyframes scroll-highlights {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 20px));
    }
}
/* 정지 및 드래그 관련 클래스 (JS에서 추가) */
.highlight-track.paused {
    animation-play-state: paused;
}

/* ==================== 가입 신청 양식 정보 ==================== */
.application-form-info {
    max-width: 700px;
    margin: 40px auto 0;
    background-color: #fdfdfd;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    text-align: left;
    position: relative;
    overflow: visible;
}

.application-form-info p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.application-form-info .form-template {
    background-color: #ecf0f1;
    border-left: 4px solid #3498db;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.application-form-info .form-template p {
    margin-bottom: 8px;
    font-weight: normal;
    color: #444;
}
.application-form-info .form-template p strong {
    color: #2c3e50;
}

.application-form-info .submit-info {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    text-align: center;
}

.application-form-info .sub-info {
    font-size: 0.95rem;
    color: #777;
    text-align: center;
}

/* submit-info 내 디스코드 DM 링크 스타일 */
.submit-info .discord-dm-link {
    font-weight: 700;
    color: #5865F2;
    transition: all 0.2s ease;
    display: inline-block;
    margin: 0 3px; 
}

.submit-info .discord-dm-link i {
    margin-right: 5px; 
    font-size: 1em; 
    vertical-align: baseline; 
}

/* 시각, 리카 링크 떠오르는 효과 조정 */
.submit-info .discord-dm-link:hover {
    color: #7289da;
    text-decoration: none;
    transform: translateY(-3px);
}

/* 방문자 채널 링크 스타일 */
.sub-info .discord-invite-link {
    font-weight: 700;
    color: #3498db;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.sub-info .discord-invite-link:hover {
    color: #2980b9;
    text-decoration: none;
}

/* 복사 버튼 스타일 */
.copy-button {
    margin: 20px auto 10px auto;
    background: #2ecc71;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    transition: all 0.1s ease-out;
    text-align: center;
}

.copy-button:hover {
    background: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* 꾹 눌렀을 때의 효과 */
.copy-button.active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    background: #23a05b;
}

/* ========== 토스트 메시지 스타일 ========== */
#toast-message-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.toast-message {
    background-color: rgba(44, 62, 80, 0.9);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
}

#toast-message-container.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}


/* ==================== 임원진 소개 섹션 스타일 ==================== */
/* #staff h3 은 .info-section h3 에 통합 */

/* 별 아이콘 */
.staff-star {
    font-size: 1.8rem;
    color: #ffd700;
    margin: 0 10px;
    vertical-align: middle;
}

.staff-overview-container {
    padding-top: 20px;
    margin-bottom: 50px;
}

.staff-leaders-wrapper {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.staff-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    max-width: 350px;
    width: 100%;
    overflow: hidden;
}

.leader-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.staff-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #3498db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.staff-card h4 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.staff-title {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}
.staff-title .toggle-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 0.9em;
    color: #3498db;
}

.staff-card.active .staff-title .toggle-icon {
    transform: rotate(180deg);
}

.staff-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    text-align: left;
}

.instruction-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(52, 152, 219, 0.9);
    color: #fff;
    padding: 15px 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.instruction-overlay i {
    margin-right: 8px;
    font-size: 1.2em;
}

.leader-card:hover .instruction-overlay {
    opacity: 1;
    transform: translateY(0);
}

.staff-sub-leaders-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, padding 0.7s ease-in-out;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 0 20px;
    margin-top: 30px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    text-align: center;
}

.staff-sub-leaders-container.active {
    max-height: 1000px;
    padding: 30px 20px;
}

.sub-leader-group-title {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
.sub-leader-group-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #3498db;
    margin: 10px auto 0;
    border-radius: 1px;
}

.sub-leader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
    justify-items: center;
    align-items: start;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

/* ==================== 활동 그리드 (Activities) ==================== */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.activity-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
    text-align: left;
    transition: all 0.3s ease;
    /* (추가) flexbox 제거 - 원본 상태 복구 */
    /* display: flex;
    flex-direction: column;
    align-items: flex-start; */
}

.activity-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.activity-item h4 {
    color: #3498db;
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    white-space: normal;
}

.activity-item h4 i {
    margin-right: 10px;
    font-size: 1.6rem;
}

.activity-item p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.7;
}


/* ==================== 문의 섹션 (Contact) ==================== */
/* 문의 섹션 디스코드 초대 스타일 */
.discord-invite {
    margin: 40px auto;
    padding: 30px 40px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: block;
    text-align: center;
    max-width: 480px;
}

.discord-invite p strong {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 20px;
    color: #2c3e50;
}
.discord-invite p strong i {
    font-size: 1.8rem;
    margin-right: 10px;
    vertical-align: -0.15em;
    color: #5865F2;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    background-color: #5865F2;
    color: #fff;
    padding: 15px 35px;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.discord-btn:hover {
    background-color: #4b58dd;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.discord-icon {
    width: 120px;
    height: auto;
    margin-right: 18px;
}


/* ==================== FAQ 섹션 (자주 묻는 질문) ==================== */
#faq .faq-header {
    text-align: center;
    margin-bottom: 50px;
}

#faq .faq-tag {
    font-size: 1rem;
    font-weight: 700;
    color: #3498db;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#faq .faq-header h3 {
    font-size: 2.8rem;
}

#faq .faq-header .section-description {
    font-size: 1.05rem;
    color: #777;
    margin-top: 15px;
    line-height: 1.7;
}

#faq .faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.faq-question-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #f7f7f7;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}
.faq-item.active .faq-question-wrapper {
    background-color: #eaf2f8;
    border-bottom: none;
}

.faq-question-wrapper:hover {
    background-color: #eceff1;
}

.faq-question-wrapper h4 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.faq-toggle-icon {
    font-size: 1.1rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.5s cubic-bezier(0.7, 0, 0.1, 1),
                padding 0.5s cubic-bezier(0.7, 0, 0.1, 1);
}

.faq-item.active .faq-answer {
    max-height: 1500px;
    padding: 20px 25px;
}

.faq-answer p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.7, 0, 0.1, 1);
    transition-delay: 0s;
}

.faq-item.active .faq-answer p {
    opacity: 1;
    transition-delay: 0.1s;
}

#faq .link-contact-faq {
    color: #3498db;
    font-weight: 600;
}

/* ==================== 푸터 스타일 ==================== */
footer {
    background: #34495e;
    color: #ecf0f1;
    text-align: center;
    padding: 40px 0;
    font-size: 0.95rem;
}

footer p {
    margin-bottom: 15px;
}

.social-links a {
    color: #ecf0f1;
    margin: 0 12px;
    transition: color 0.3s ease, transform 0.2s ease;
    font-weight: 600;
    display: inline-block;
}

.social-links a i {
    margin-right: 5px;
    font-size: 1.1rem;
    vertical-align: middle;
}

.social-links a:hover {
    color: #3498db;
    transform: translateY(-3px);
}


/* ==================== 반응형 디자인 ==================== */
@media (max-width: 992px) {
    .hero-section h2 {
        font-size: 2.5rem;
    }
    .hero-section p {
        font-size: 1.1rem;
    }
    .info-section h3 {
        font-size: 2.2rem;
    }
    .about-grid, .specs-grid, .join-sections-grid, .activity-grid, .sub-leader-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .specs-grid .spec-card, .join-sections-grid .join-card {
        max-width: 100%;
    }
    .staff-leaders-wrapper {
        gap: 40px;
    }
    .staff-card {
        max-width: 450px;
    }
    .highlight-item {
        width: 220px;
    }
    .highlight-track {
        animation: scroll-highlights 25s linear infinite;
    }
    @keyframes scroll-highlights {
        to {
            transform: translateX(calc(-50% - 10px));
        }
    }

    :root {
        --header-height: 70px;
        --compact-header-height: 60px;
    }
}

@media (max-width: 768px) {
    /* 헤더 */
    header {
        padding: 0; /* header .header-content가 패딩을 처리하므로 헤더 자체 패딩 제거 */
        height: var(--header-height); /* 변수 사용으로 헤더 높이 유지 */
    }
    header.sticky {
        padding: 0; /* 스티키 헤더의 패딩도 제거 */
        height: var(--compact-header-height);
    }
    /* 헤더 콘텐츠 (로고와 토글 버튼을 감쌈) */
    header .header-content { /* .container 대신 header-content 클래스를 사용하도록 index.html을 수정해야 함 */
        justify-content: space-between;
        align-items: center;
        padding: 0 15px; /* 모바일에서 좌우 패딩 조정 */
        width: 100%; /* 전체 너비 차지 */
    }

    .logo a {
        font-size: 1.5rem;
    }

    /* 메인 내비게이션 (모바일 메뉴) */
    .main-nav {
        display: none; /* JS로 활성화될 때까지 기본 숨김 */
        flex-direction: column;
        width: 100%; /* 전체 너비 */
        background: #2c3e50;
        position: fixed; /* absolute 대신 fixed로 변경하여 스크롤 시에도 고정 */
        top: var(--header-height); /* 헤더 높이 변수 사용 (헤더 바로 아래) */
        left: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        z-index: 999;
        /* height: calc(100vh - var(--header-height)); // JS에서 동적으로 처리 */
        overflow-y: auto; /* 내용이 길면 스크롤 가능하도록 */
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0; /* ul의 기본 패딩 제거 */
    }
    .main-nav ul li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav ul li a {
        display: block;
        padding: 15px 20px;
        text-align: center;
        width: 100%;
    }
    .main-nav ul li a:hover {
        background-color: #34495e;
    }
    .main-nav ul li a::after {
        display: none; /* 모바일 메뉴에서는 밑줄 애니메이션 제거 */
    }

    /* 햄버거 메뉴 토글 버튼 */
    .menu-toggle {
        display: flex; /* 모바일에서 flex로 표시 */
        order: 1; /* 로고 뒤에 위치 */
    }

    /* Hero 섹션 */
    .hero-section {
        margin-top: var(--header-height);
    }
    .hero-section h2 {
        font-size: 2.8rem;
    }
    .hero-section p {
        font-size: 1.2rem;
    }
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    .info-section {
        padding: 80px 0;
    }
    .info-section h3 {
        font-size: 2.5rem;
    }
    .section-description {
        font-size: 1.1rem;
    }
    .sub-heading {
        font-size: 1.8rem;
    }
    .about-item, .spec-card, .join-card, .activity-item, .staff-card {
        padding: 30px;
        border-radius: 10px;
    }
    .icon-large {
        font-size: 2.5rem;
    }
    .guild-ranking-highlight {
        font-size: 1.2rem;
        margin-top: 50px;
        padding: 25px;
    }
    .staff-photo {
        width: 120px;
        height: 120px;
        border: 4px solid #3498db;
    }
    .staff-card h4 {
        font-size: 1.8rem;
    }
    .staff-title {
        font-size: 1.1rem;
    }
    .staff-description {
        font-size: 1rem;
    }
    .instruction-overlay {
        font-size: 1rem;
        padding: 15px 0;
    }
    .staff-sub-leaders-container {
        padding: 0 20px;
        margin-top: 30px;
        border-radius: 10px;
    }
    .staff-sub-leaders-container.active {
        padding: 30px 20px;
    }
    .sub-leader-group-title {
        font-size: 2rem;
        margin-bottom: 30px;
        padding-bottom: 10px;
    }
    .sub-leader-group-title::after {
        width: 60px;
        height: 3px;
    }
    .discord-invite {
        padding: 30px 40px;
        max-width: 480px;
    }
    .discord-invite p strong {
        font-size: 1.4rem;
    }
    .discord-btn {
        padding: 15px 35px;
        font-size: 1.3rem;
    }
    .discord-icon {
        width: 120px;
        margin-right: 18px;
    }
    footer {
        padding: 40px 0;
        font-size: 0.95rem;
    }
    .social-links a {
        margin: 0 12px;
    }

    /* 토글 버튼과 헤더 길이 문제 해결을 위한 추가 / 수정 */
    .hero-controls {
        width: calc(100% - 30px); /* 모바일에서는 좌우 여백을 줄여 버튼이 잘리지 않도록 */
        bottom: 20px; /* 모바일에서 컨트롤 위치 조정 */
    }
    .hero-controls .prevnext button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .hero-controls .pagination-dots {
        gap: 8px;
    }
    .hero-controls .pagination-dots .dot {
        width: 8px;
        height: 8px;
    }
    .main-visual-scroll {
        top: calc(var(--header-height) + 40px); /* 헤더 높이 + 15px (모바일에서 조금 더 위로) */
    }
    .main-visual-scroll img {
        width: 40px; /* 모바일에서 스크롤 아이콘 크기 조정 */
    }
}

@media (max-width: 480px) {
    .hero-section h2 {
        font-size: 1.6rem;
    }
    .hero-section p {
        font-size: 0.8rem;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .main-nav ul li { /* header nav ul li -> header .main-nav ul li */
        margin: 0; /* 모바일 메뉴에서 마진 제거 */
    }
    .staff-card h3 {
        font-size: 1.8rem;
    }
    .staff-card .staff-star {
        font-size: 1.4rem;
    }
    .discord-invite {
        padding: 30px;
    }
    .discord-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    .discord-icon {
        width: 100px;
        margin-right: 10px;
    }
    footer {
        padding: 30px 0;
        font-size: 0.8rem;
    }

    /* 추가: 모바일 최하단 반응형 조정 */
    .hero-controls {
        bottom: 10px; /* 더 아래로 */
    }
    .main-visual-scroll {
        top: calc(var(--header-height) + 45px); /* 헤더에 더 가깝게 */
    }
}

/* ==================== 팝업 스타일 ==================== */
.popup-overlay {
    position: fixed;
    inset: 0; /* top, right, bottom, left 0 */
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 10000;
}

.popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    /*  전체적으로 10% 축소: max-width와 max-height를 90%로 조정 */
    max-width: calc(500px * 0.8); /* 약 450px */
    max-height: calc(700px * 0.8); /* 약 630px */
    background: #000; /* 이미지 배경색 (검은색) */
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.popup-header {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    z-index: 20;
}

.popup-header button {
    background: transparent;
    border: none;
    /*  거의 안 보일 정도로 불투명하게 만들고, 호버 시 나타나도록 수정 */
    color: rgba(255, 255, 255, 0.1); /* 기본적으로 10% 불투명한 흰색 (거의 안 보임) */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center; /* 세로 중앙 정렬 */
    gap: 6px; /*  글씨와 X 아이콘 사이의 간격 (기존 margin-left 대체) */
    padding: 5px 12px;
    border-radius: 6px;
    transition: color 0.3s, background 0.25s;
    line-height: 1.2;
}

.popup-header button:hover {
    color: rgba(255, 255, 255, 0.85); /* 호버 시 85% 불투명한 흰색 (뚜렷하게 보임) */
    background: rgba(0,0,0,0    );
}

.popup-header .close-icon {
    font-weight: bold;
    vertical-align: middle;
}

.popup-image-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.popup-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    user-select: none;
}

.popup-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0px 0px;
    /* background-color: rgba(226, 28, 69, 0.8); */
    background-color: rgba(28, 97, 226, 0.8);
    text-align: center;
    box-sizing: border-box;
    z-index: 10;
}
    
/*  새로 추가되는 버튼 래퍼 (7:3 비율 관리)  */
.popup-buttons-wrapper {
    display: flex;
    width: 100%;
    height: 100%; /* footer 높이만큼 차지 */
    min-height: 50px; /* 버튼 최소 높이 (footer padding 고려) */
}

/*  개별 버튼 링크 스타일  */
.popup-buttons-wrapper .popup-button-link {
    display: flex; /* 버튼을 flex 컨테이너로 만들어 내부 텍스트 중앙 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 */
    text-decoration: none; /* a 태그 밑줄 제거 */
    height: 100%; /* 부모 wrapper에 꽉 채우기 */
    box-sizing: border-box; /* padding 포함하여 크기 계산 */
}

/* '내 순위 확인하러 가기' 버튼 (70%) */
.popup-buttons-wrapper .main-button {
    flex: 7; /*  7할 비율  */
    background-color: transparent; /* footer의 배경색을 따름 */
    border-right: 1px solid rgba(241, 14, 14, 0.2); /* 버튼 구분선 */
}

/* '닫기' 버튼 (30%) */
.popup-buttons-wrapper .close-button {
    flex: 3; /*  3할 비율  */
    background-color: transparent; /* footer의 배경색을 따름 */
    border: none; /* 자체 테두리 없음 */
}

/*  실제 button 태그의 스타일 (popup-footer button에서 가져옴)  */
.popup-buttons-wrapper button {
    width: 100%; /* 부모 popup-button-link에 꽉 채우기 */
    background: none; /* 부모 링크의 배경색을 따름 */
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    padding: 14px 0; /* 패딩은 여기서 적용하여 버튼 내 텍스트 위치 조절 */
    border-radius: 0; /* 모서리 둥글게 하지 않음 (footer에서 전체적으로 관리) */
    transition: color 0.3s ease;
}

.popup-buttons-wrapper button:hover {
    color: rgb(165, 226, 255); /* 호버 시 글씨색 변경 */
}

/* 반응형: 가로 작은 화면 대응 */
@media (max-width: 540px) {
    .popup-container {
        width: 90vw;
        height: auto;
        max-height: 90vh;
        /*  모바일에서도 전체 팝업 크기를 추가로 10% 정도 더 축소 */
        max-width: calc(90vw * 0.9); /* 화면 너비 90%의 다시 90% (81vw) */
        max-height: calc(90vh * 0.9); /* 화면 높이 90%의 다시 90% (81vh) */
    }
    .popup-header button {
        font-size: 0.9rem;
        padding: 4px 10px;
    }
    .popup-footer button {
        font-size: 1rem;
        padding: 12px 0;
    }
    .popup-image-wrapper {
        padding: 0;
    }
}