/* style.css */

/* --- 0. 컬러 변수 설정 --- */
:root {
  --m1-color: #ffcc5f;
  --m2-color: #a1d365;
  --t-color: #000000;
  --b-color: #2c2727;
  --w-color: #ffffff;
  --g1-color: #4c4c4c;
  --g2-color: #797979;
  --g3-color: #a5a5a5;
  --g4-color: #d2d2d2;
  --g5-color: #e9e9e9;
  --g6-color: #f4f4f4;
}

/* --- 1. 기본 설정 (Reset & Base) --- */
* { margin: 0; padding: 0; box-sizing: border-box;}
html { scroll-behavior: smooth;}
body { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;  color: var(--t-color); line-height: 1.6;  word-break: keep-all;  background-color: var(--w-color); overflow-x: hidden; }
a { text-decoration: none; color: inherit;}
.inner { max-width: 1200px; margin: 0 auto; padding: 0 20px;}
.text-center { text-align: center;}
.highlight {color: var(--m1-color);}
.highlightg {color : var(--m2-color);}
.boldy {font-weight:700;}
.boldy400 {font-weight:500; word-spacing: 20%;}

/* --- 형광펜 하이라이트 공통 효과 --- */
.highlight-pen { position: relative; display: inline; z-index: 1;}
.highlight-pen::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.15em; 
    width: 0%;      
    height: 0.45em;
    z-index: -1;   
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
}
.highlight-pen:hover::after,.reveal.active .highlight-pen::after { width: 100%; }
.pen-mint::after {background-color: rgba(144, 238, 144, 0.45); }
.pen-yellow::after { background-color: rgba(255, 235, 59, 0.5);}
.pen-pink::after { background-color: rgba(255, 182, 193, 0.5);}


/* --- 스크롤 텍스트 업 애니메이션 --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}
.reveal.active {opacity: 1; transform: translateY(0); }
.impact-grid .impact-item:nth-child(1).reveal { transition-delay: 0.1s; }
.impact-grid .impact-item:nth-child(2).reveal { transition-delay: 0.25s; }
.impact-grid .impact-item:nth-child(3).reveal { transition-delay: 0.4s; }

/* --- 2. 헤더 (Header) --- */
.header { position: absolute; top: 0; left: 0; width: 100%; padding: 30px 0; background-color: transparent; z-index: 10;}
.logo-img { height: 40px; display: block;}


/* --- 3. 메인 히어로 섹션 (Hero Section) --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 80vh; 
    min-height: 600px;
    background-image: url('img/main-hero-bg2.jpg'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}
.hero-section .inner { width: 100%;}
.hero-text-area {
    max-width: 800px;
    margin-left: auto; 
    padding: 40px;
    border-radius: 12px;
    color: var(--w-color);
    margin-top: 50px;    
    text-align: right; 
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}
.hero-desc {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}
.btn-primary, .btn-primary-large {
    position: relative;
    display: inline-block;
    background-color: var(--m1-color); 
    color: var(--w-color);
    font-weight: bold;
    border-radius: 50px;   
    padding: 3px; 
    z-index: 1;
    overflow: hidden;
    transition: transform 0.2s ease;
}
.btn-primary {font-size: 1.5rem; }
.btn-primary-large { font-size: 1.5rem; }

/* 별빛 효과 */
.btn-primary::before, .btn-primary-large::before {
    content: '';
    position: absolute;
    top: -150%;
    left: -50%;
    width: 200%;
    height: 400%;
    background: conic-gradient(
        transparent, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        #ffffff
    );
    animation: spinStarlight 3s linear infinite;
    z-index: -2;
}
/* 3. 안쪽 버튼 배경 채우기 */
.btn-primary::after, .btn-primary-large::after {
    content: '';
    position: absolute;
    inset: 3px;
    background-color: var(--m1-color);
    border-radius: 47px; 
    z-index: -1;
    transition: background-color 0.3s ease;
}
/* 텍스트와 화살표가 위로 오도록 설정 */
.btn-primary span, .btn-primary-large span,
.btn-primary, .btn-primary-large {padding: 16px 32px;}
.btn-primary-large { padding: 20px 50px;}
.btn-primary:hover::after, .btn-primary-large:hover::after {background-color: #e0b44d; }
.btn-primary:hover, .btn-primary-large:hover {transform: translateY(-2px);}

@media (max-width: 768px) {
    .hero-section {        
        background: url('img/hero-m.jpg') no-repeat center center / cover !important;
        padding: 90px 0 ;
    }
    .hero-title {
        font-size: 1.8rem ; 
        line-height: 1.3;
    }
    .hero-desc {
        font-size: 1.125rem;
        margin-top : 40px;
        line-height: 1.6;
        margin-bottom: 30px;
        opacity: 0.9;
    }
}


/* --- 영상 섹션 (Video Section) --- */
.video-section {padding: 80px 0;background-color: var(--g6-color); text-align: center;}
.video-container {max-width: 900px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);background-color: var(--b-color);}
/* 16:9 비율 유지 클래스 */
.video-wrapper {position: relative; width: 100%; padding-bottom: 56.25%; height: 0;}
.video-wrapper iframe,
.video-wrapper video {position: absolute;top: 0;left: 0; width: 100%; height: 100%;}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .video-section {padding: 50px 20px; }
    .video-container {border-radius: 10px;}
}

/* --- 4. 스토리 섹션 (Story Section) --- */
.story-section.story-step1 { padding: 100px 0;background: url('img/bg_section3.jpg') no-repeat center center / cover;}
.story-section.story-step2 { padding: 50px 0;}
.story-section.story-step3 { padding: 150px 0;}
.bg-gray {background-color: var(--g6-color); }
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--b-color);
    margin-bottom: 40px;
    line-height: 1.4;
}

.section-desc {font-size: 1.125rem; color: var(--g1-color); margin-bottom: 20px; line-height: 1.8;}
/* --- 카드 내부 텍스트 촥촥 순차 시차(Stagger) 효과 --- */
.quote-card .reveal:nth-child(1) { transition-delay: 0.1s; }
.quote-card .reveal:nth-child(2) { transition-delay: 0.25s; }
.quote-card .reveal:nth-child(3) { transition-delay: 0.4s; }
.quote-card .reveal:nth-child(4) { transition-delay: 0.55s; }
.quote-card .reveal:nth-child(5) { transition-delay: 0.7s; }

/* --- 스토리 섹션 사진첩 레이아웃 --- */
.story-layout-box { display: flex; align-items: center; justify-content: space-between; gap: 60px; text-align: left;}
.story-img-slider {
    position: relative;
    width: 45%;
    height: 420px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: var(--w-color);
    border: 3px solid var(--w-color);
}
.story-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    opacity: 0;    
    animation: smoothFade 8s infinite ease-in-out;
}
.story-img:nth-child(1) {animation-delay: 0s;}
.story-img:nth-child(2) {animation-delay: 4s;}

@keyframes smoothFade {
    0% { opacity: 0; }
    20% { opacity: 1; } 
    50% { opacity: 1; }  
    70% { opacity: 0; }  
    100% { opacity: 0; }
}
/* 오른쪽 고정 텍스트 영역 */
.story-text-box {width: 50%;}
.story-text-box .section-title { text-align: left; margin-bottom: 25px;}
.story-text-box .section-desc {text-align: left; margin-bottom: 20px;}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .story-layout-box {flex-direction: column; gap: 30px; }
    .story-img-slider {width: 100%; height: 300px;}
    .story-text-box {width: 100%; text-align: center;}
    .story-text-box .section-title,
    .story-text-box .section-desc { text-align: center; }
}
/* --- 2번 섹션 모바일 여백 및 텍스트 줄바꿈 깔끔하게 정리 --- */
@media (max-width: 768px) {    
    .story-section.story-step1 {padding: 40px 0;}
    .story-layout-box {display: flex; flex-direction: column;}
    .story-img-slider {height: 280px ; }  
    .story-text-box { order: 1; margin-bottom: 20px;}
    .story-img-slider {order: 2;}
    .story-text-box .section-desc br { display: none ;}
}

/* --- 3번 섹션 --- */
.story-layout-dual {display: flex; align-items: center; justify-content: space-between; gap: 0px; text-align: left;}
.story-text-col { width: 50%;}
.story-text-col .section-title,.story-text-col .section-desc {text-align: left;}
.story-text-col .section-title {margin-bottom: 30px; color:var(--b-color);}
.story-text-col .section-desc {margin-bottom: 20px;color:var(--b-color);}
.story-text-col .reveal:nth-child(1) { transition-delay: 0.1s; }
.story-text-col .reveal:nth-child(2) { transition-delay: 0.25s; }
.story-text-col .reveal:nth-child(3) { transition-delay: 0.4s; }
.story-text-col .reveal:nth-child(4) { transition-delay: 0.55s; }
.story-img-col { width: 45%; display: flex; gap: 20px; height: 600px; position: relative;}
.long-img-wrap { 
    flex: 1; height: 90%; border-radius: 3px; overflow: hidden; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--w-color);  border: 5px solid var(--m2-color);  opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;}
.story-img-col .img-from-top { transform: translateY(-40px); align-self: flex-start;}
.story-img-col .img-from-bottom { transform: translateY(40px); align-self: flex-end; transition-delay: 0.4s; }
.story-img-col.active .long-img-wrap { opacity: 1; transform: translateY(0);}
.long-img-wrap img {width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);}
.long-img-wrap:hover img {transform: scale(1.05);}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .story-layout-dual { flex-direction: column; gap: 40px;}
    .story-text-col { width: 100%; text-align: center; }
    .story-text-col .section-title,
    .story-text-col .section-desc {text-align: center;}
    .story-img-col { width: 100%; height: 350px; }
    .story-img-col .img-from-bottom { transform: translateY(50px);}
    .story-img-col .img-from-top { transform: translateY(-50px); }
}
@media (max-width: 768px) {
    /* 3번 재활치료 섹션 모바일 텍스트 줄바꿈 해제 및 정돈 */
    .story-section.story-step2 .section-desc br { display: none; }
}
/* --- 4번 섹션: 배경 이미지 & 투명 인용구 카드 스타일 --- */
.story-section.story-step3.bg-quote-img { position: relative; background: url('img/gm_story.jpg') no-repeat center center / cover; padding: 150px 0;}
.story-section.story-step3.bg-quote-img::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.3); 
    z-index: 1;
}
.story-section.story-step3.bg-quote-img .inner { position: relative; z-index: 2;}
.quote-card {
    position: relative;
    max-width: 650px;
    margin: 0 auto;   
    background-color: rgba(245, 255, 234, 0.3); 
    backdrop-filter: blur(10px);
    padding: 30px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}
.quote-icon {
    display: block;
    font-size: 80px;
    line-height: 1;
    color: var(--m2-color);
    font-family: serif;
    margin-bottom: -10px;
    opacity: 0.7;
}
.quote-card .section-title { margin-bottom: 30px; color: var(--b-color); line-height: 1.4;}
.quote-card .section-desc {margin-bottom: 18px; color: #444; line-height: 1.6;}
.quote-card .final-desc { font-weight: 500; color: var(--b-color); margin-top: 25px; padding-top: 20px; border-top: 1px dashed rgba(0, 0, 0, 0.15);}
.quote-card .highlight {color: var(--m1-color);}
.handwriting-title {    
    font-family: 'Nanum Pen Script', 'Cafe24Ssurroundair', cursive, sans-serif;
    font-size: 3rem ; 
    line-height: 1.4;
    color: var(--b-color) ; 
    font-weight: normal ; 
    letter-spacing: 1px;
}

/* 모바일 화면에서의 손글씨 크기 대응 */
@media (max-width: 768px) {
    .quote-icon {display:none;}
    .quote-card .section-desc br {  display: none ; }
    .story-section.story-step3.bg-quote-img {
        position: relative ;
        background: url('img/gm_story.jpg') no-repeat left center / cover;
        background-position: 15% center ; 
        padding: 70px 15px ;       
    }    
    .quote-card {
        padding: 20px 10px ;
        margin: 10px;  
        background-color: rgba(245, 255, 234, 0.6) ; 
        backdrop-filter: blur(1px) ;
    }   
    .handwriting-title .highlightg {
        color: #222222; 
        background: none; 
    }   
    .section-desc{font-size:16px; color:#000000;}
    .final-desc {font-size:16px;}  
}


/* --- 5. 하단 CTA 섹션 스타일 --- */
.cta-section { padding: 80px 0; text-align: center;}
.bg-dark { background-color: var(--g1-color); color: var(--w-color);}
.cta-title {font-size: 2.2rem; font-weight: 700; margin-bottom: 25px; line-height: 1.4;}
.cta-apng-box { margin: 16px auto; width: 800px; border-radius:5px; display: flex; align-items: center; justify-content: center;}
.cta-apng-img {width: 100%; height: 100%; object-fit: contain; display: block; animation: breathing 3s ease-in-out infinite;}

@keyframes breathing { 
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1); }
}
.cta-desc { font-size: 1.125rem; opacity: 0.85; margin-bottom: 40px; line-height: 1.6;}

@media (max-width: 768px) {
    .cta-section { padding: 40px 15px; }
    .cta-title { font-size: 1.3rem;}
    .cta-apng-box { 
        width: 80%;          
        margin: 10px auto 15px; 
    }  
    .cta-desc {font-size:1rem;} 
    .cta-title {
        background: linear-gradient(135deg, #a1d365 0%, #ffcc5f 100%);
        -webkit-background-clip: text ;
        -webkit-text-fill-color: transparent;
    } 
}


/* --- 6. 후원금 사용 계획 섹션 --- */
.impact-section { padding: 100px 0; background-color: var(--w-color);}
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px;}
.impact-item {
    position: relative;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f2f2f2; 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);    
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
/* 각 카드별 배경 이미지 지정 */
.impact-item:nth-child(1) { background-image: url('img/impact-1.jpg'); }
.impact-item:nth-child(2) { background-image: url('img/impact-2.jpg'); }
.impact-item:nth-child(3) { background-image: url('img/impact-3.jpg'); }
.impact-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;    
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
    transition: background 0.4s ease;
}
.impact-item:hover { transform: translateY(-8px); box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);}
.impact-item:hover::before {background: linear-gradient(to bottom, rgba(0,0,0,0.2) 30%, rgba(0,0,0,0.85) 100%);}
/* 텍스트 타이틀 영역 스타일 */
.impact-item h4 {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 30px 20px;
    color: var(--w-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    margin: 0;       
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.impact-item:hover h4 { transform: translateY(-5px);}

/* 모바일 반응형 대응 */
@media (max-width: 768px) {
    .impact-section { padding: 60px 0; background-color: var(--w-color);}
    .impact-grid {grid-template-columns: 1fr; gap: 20px;}
    .impact-item {height: 260px; }
    .impact-section .section-title {font-size:18px;}
}

/* --- 푸터 --- */
.footer { background-color: var(--g5-color); color: var(--g1-color);  padding: 60px 0; font-size: 0.9rem;}
.footer .brandBox { text-align: left;}
.footer .brandBox img { height: 35px; margin-bottom: 5px;}
.footer .brandBox h4 {    font-size: 0.85rem;    color: var(--g2-color);    font-weight: 600;    letter-spacing: 1px;}
.footer .infoBox {border-top: 1px solid var(--g4-color);  margin-top: 20px;  padding-top: 20px;}
.footer .infoBox ul { list-style: none;    display: flex;    flex-wrap: wrap;    gap: 15px 25px;    margin-bottom: 10px;}
.footer .infoBox ul li { position: relative;    color: var(--g1-color);}
.footer .infoBox ul li span { display: inline-block; width: 1px; height: 12px; background-color: var(--g3-color); margin-left: 15px; vertical-align: middle;}
.footer .infoBox ul li:last-child span {    display: none;}
.footer .infoBox .infoList_2 {    margin-bottom: 0;}
.footer .copyright-box {margin-top: 25px; border-top: 1px dashed var(--g4-color); padding-top: 20px; font-size: 0.85rem; color: var(--g2-color);}
.footer .copyright-box .notice {margin-bottom: 5px;}

/* 모바일 반응형 푸터 */
@media all and (max-width: 768px) {
    .footer .infoBox ul {flex-direction: column; gap: 8px;}
    .footer .infoBox ul li span { display: none; }
}

/* 우측 플로팅 배너 */
.floating-banner {
    position: fixed;
    right: 40px;
    top: 30%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateY(-50%) translateX(120px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, visibility 0.4s;
}
.floating-banner.show {
    transform: translateY(-50%) translateX(0); 
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.floating-donate {
    position: relative;
    width: 110px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease; 
    padding: 2px; 
    background-color: transparent; 
    z-index: 1; 
}
.floating-donate:hover {
    transform: translateY(-5px);
}
/*  2. 반짝이며 도는 선 */
.floating-donate::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        transparent, 
        rgba(255, 204, 95, 0.2), 
        var(--m1-color)          
    );
    animation: spinStarlight 2.5s linear infinite; 
    z-index: -2;
}
/* 3. 안쪽 배경 (빛이 테두리에만 보이도록 안을 하얗게 채워줌) */
.floating-donate::after {
    content: '';
    position: absolute;
    inset: 2px; 
    background-color: var(--w-color);
    border-radius: 8px; 
    z-index: -1;
}
.floating-donate img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
    background-color: var(--g5-color); 
    border-radius: 8px 8px 0 0; 
}
.floating-btn {
   display: block;
    background-color: var(--m1-color);
    color: var(--w-color);
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 0 0 8px 8px; /* 아래쪽 둥글게 */
}
/* 🌟 4. 회전 애니메이션 키프레임 추가 */
@keyframes spinStarlight {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* TOP 버튼 (이미지형) */
.btn-top {
    position: fixed;
    right: 20px;
    z-index: 100;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%; 
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);    
    bottom: -60px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, visibility 0.4s, transform 0.3s ease;
}
.btn-top.show {
    bottom: 30px; 
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.btn-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.btn-top:hover {
    transform: translateY(-3px); 
}

/* --- 모바일 반응형 TOP 버튼 위치 --- */
@media (max-width: 768px) {
    .btn-top { 
        right: 10px; 
        bottom: -60px; 
        width: 45px;
        height: 45px;
    }
    .btn-top.show { bottom: 20px; }
}

/* --- 10. 반응형 (Mobile) --- */
@media (max-width: 768px) {
    .header { padding: 20px 0; }
    .hero-text-area { margin-top: 30px; padding: 30px; }
    .hero-title { font-size: 1.8rem; }
    .hero-desc { font-size: 1rem; }
    .section-title, .cta-title { font-size: 1.5rem; }    
    .impact-grid { grid-template-columns: 1fr; gap: 20px; }

    /* 모바일 플로팅 배너 */
    .floating-banner {
        right: 10px;
        top: auto;
        bottom: 90px;
        transform: translateY(0) translateX(120px);
    }
    .floating-banner.show { transform: translateY(0) translateX(0); }
    .floating-donate { width: 100px; }
    .floating-donate img { height: 100px; }
   
}