/* 활동&교육 페이지 전용 스타일 */
.experience-education-page {
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%),
        url('../assets/images/backgrounds/experience-education-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: 80px;
}

.page-header {
    text-align: center;
    padding: 60px 20px;
    color: white;
    position: relative;
}

.mobile-version-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.mobile-version-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: white;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.tab-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.timeline-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 시각적 Timeline 연결선 (선택사항) */
.timeline-section.with-timeline-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 100px;
    bottom: 40px;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent 0%,
        #e0e0e0 10%,
        #e0e0e0 90%,
        transparent 100%
    );
    z-index: 0;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 30px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 10px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-year {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.timeline-company {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.timeline-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(20px, 3vw, 40px); /* 동적 간격 */
    margin-top: 30px;
    grid-auto-rows: minmax(200px, auto); /* 최소 높이 보장 */
    align-items: start; /* 상단 정렬 */
}

.certificate-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* 시간순 번호 표시 */
.certificate-card::after {
    content: attr(data-timeline-order);
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.certificate-card:hover::after {
    opacity: 0.8;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.certificate-card.expanded {
    border-left: 4px solid #4caf50;
}

.certificate-title {
    position: relative;
    transition: color 0.3s ease;
}

.certificate-title:hover {
    color: var(--primary-color);
}

.certificate-title::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.certificate-card.expanded .certificate-title::after {
    transform: rotate(180deg);
}

.certificate-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.certificate-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.certificate-issuer {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.certificate-date {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.certificate-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 10px;
}

.certificate-details {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    margin-top: 10px;
}

.download-section {
    background: var(--gradient-primary);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 40px;
}

.download-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .experience-education-page {
        background-attachment: scroll; /* 모바일에서 fixed 성능 문제 해결 */
        padding-top: 70px;
    }
    
    .page-header {
        padding: 40px 20px;
    }
    
    .mobile-version-btn {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .page-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }
    
    .page-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        padding: 0 10px;
    }
    
    .content-tabs {
        padding: 0 20px;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-height: 44px; /* 터치 친화적 크기 */
        border-radius: 22px;
    }
    
    .tab-content {
        padding: 0 15px;
    }
    
    .timeline-section {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .section-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        margin-bottom: 25px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 20px;
        margin-bottom: 30px;
    }
    
    .timeline-item::before {
        left: -17px;
        width: 10px;
        height: 10px;
    }
    
    .timeline-year {
        font-size: 1rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .timeline-company {
        font-size: 0.9rem;
    }
    
    .timeline-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .timeline-tags {
        gap: 6px;
    }
    
    .timeline-tag {
        padding: 3px 10px;
        font-size: 0.75rem;
        border-radius: 12px;
    }
    
    .certificate-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .certificate-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .certificate-icon {
        font-size: 2rem;
    }
    
    .certificate-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .certificate-issuer {
        font-size: 0.9rem;
    }
    
    .certificate-date {
        font-size: 0.8rem;
    }
    
    .certificate-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .certificate-details {
        font-size: 0.85rem;
        line-height: 1.4;
        padding: 15px;
        margin-top: 15px;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .download-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 0.9rem;
        min-height: 44px; /* 터치 친화적 크기 */
    }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
    .experience-education-page {
        padding-top: 60px;
    }
    
    .page-header {
        padding: 30px 15px;
    }
    
    .mobile-version-btn {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.75rem;
        min-height: 36px;
    }
    
    .page-title {
        font-size: clamp(1.5rem, 10vw, 2rem);
    }
    
    .page-subtitle {
        font-size: clamp(0.8rem, 4vw, 1rem);
    }
    
    .content-tabs {
        padding: 0 15px;
        gap: 10px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .tab-content {
        padding: 0 10px;
    }
    
    .timeline-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: clamp(1.2rem, 6vw, 1.5rem);
        margin-bottom: 20px;
    }
    
    .timeline {
        padding-left: 15px;
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-item {
        padding-left: 15px;
        margin-bottom: 25px;
    }
    
    .timeline-item::before {
        left: -15px;
        width: 8px;
        height: 8px;
    }
    
    .certificate-card {
        padding: 15px;
    }
    
    .certificate-icon {
        font-size: 1.8rem;
    }
    
    .certificate-title {
        font-size: 1rem;
    }
    
    .certificate-issuer {
        font-size: 0.8rem;
    }
    
    .certificate-date {
        font-size: 0.75rem;
    }
    
    .certificate-description {
        font-size: 0.85rem;
    }
    
    .certificate-details {
        font-size: 0.8rem;
        padding: 12px;
    }
    
    .download-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-height: 40px;
    }
}

/* 모바일 터치 최적화 */
@media (hover: none) and (pointer: coarse) {
    .tab-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }
    
    .download-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: none;
    }
    
    .tab-btn:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.98);
    }
    
    .download-btn:active {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(0.98);
    }
}

/* 모바일 스크롤 최적화 */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* 모바일에서 텍스트 선택 최적화 */
    .certificate-details {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* 모바일에서 링크 터치 영역 확대 */
    .nav-link {
        padding: 10px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 모바일 뷰포트 높이 최적화 */
    .experience-education-page {
        min-height: calc(var(--vh, 1vh) * 100);
    }
    
    /* 모바일에서 햄버거 메뉴 개선 */
    .hamburger {
        display: block;
        z-index: 9999;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        margin: 5px;
    }
    
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--color-gray-800);
        margin: 5px 0;
        transition: all 0.3s ease;
        border-radius: 3px;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 20px;
        transition: left 0.3s ease;
        z-index: 9998;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0 0 10px 0;
        width: 90%;
        text-align: center;
    }
    
    .nav-menu .nav-link {
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--color-gray-800);
        width: 100%;
        padding: 15px 20px;
        border-radius: 10px;
        transition: all 0.3s ease;
        background: rgba(59, 130, 246, 0.05);
        margin: 5px 0;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(59, 130, 246, 0.1);
        color: var(--color-primary);
        transform: translateY(-2px);
    }
}

/* 폰트 로딩 최적화 */
body:not(.fonts-loaded) {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fonts-loaded {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 접근성 개선 */
.using-keyboard *:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 모바일 성능 최적화 */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    .certificate-card {
        will-change: transform;
    }
    
    .certificate-card.expanded {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    /* 모바일 스크롤 최적화 */
    .timeline-section {
        contain: layout style paint;
    }
    
    .certificate-details {
        contain: layout style;
    }
}