/* 다함께 탄소중립 페이지 스타일 */

/* 페이지 컨테이너 */
.together-page {
    max-width: 1490px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
}

/* 메인 페이지가 아닌 페이지에서 푸터를 컨텐츠 아래에 붙이기 */
body:not(:has(.main-title-section)) .footer {
    position: relative !important;
    bottom: auto !important;
    margin-top: auto;
}

/* 상단 배너 */
.together-banner {
    position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 308px;  /* 440px * 0.7 */
    overflow: hidden;
    margin-bottom: 0;
    margin-top: 0; /* 헤더가 최상단일 때 배너가 헤더 뒤에 보이도록 margin-top 제거 */
    z-index: 1; /* 기본적으로 낮은 z-index (스크롤 시 헤더 뒤로 사라짐) */
}

/* 헤더가 최상단일 때만 배너가 헤더 뒤에 보이도록 */
body:not(.header-scrolled) .together-banner {
    z-index: 999; /* 헤더(z-index: 1000) 바로 아래에 배치하여 투명한 헤더가 배너를 볼 수 있도록 */
    margin-top: 0; /* 헤더 뒤에 배너가 보이도록 margin-top 제거 */
}

/* 헤더가 스크롤됐을 때도 배너의 top 위치는 변경하지 않음 */
body.header-scrolled .together-banner {
    margin-top: 0; /* 스크롤되어도 배너의 top 위치는 동일하게 유지 */
}

.together-banner .banner-image,
.together-banner img.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
    opacity: 1 !important; /* 다른 CSS 규칙에 의한 opacity 덮어쓰기 */
}

.together-banner .banner-title {
    position: absolute;
    top: calc(80px + 30%); /* 헤더 높이(80px) 아래 배너 높이의 30% 위치 */
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'KBIZgo_B', 'KBIZ한마음고딕체', sans-serif;
    font-size: 68px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
    white-space: nowrap;
    z-index: 2; /* 이미지 위에 표시되도록 z-index 추가 */
}

/* 헤더가 최상단일 때 배너 타이틀 위치 조정 */
body:not(.header-scrolled) .together-banner .banner-title {
    top: calc(80px + 30%); /* 헤더 높이(80px) 아래 배너 높이의 30% 위치 */
}

/* 헤더가 스크롤됐을 때도 배너 타이틀 위치 동일하게 유지 */
body.header-scrolled .together-banner .banner-title {
    top: calc(80px + 30%); /* 헤더 높이(80px) 아래 배너 높이의 30% 위치 */
}

/* 탭 버튼 */
.together-tabs {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 1490px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 2rem 0;
    background-color: #ffffff;
    z-index: 998; /* 배너(z-index: 999) 바로 아래에 배치 */
}

.together-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 395px;
    height: 70px;
    margin-right: 20px;
    margin-left: 20px;
    border: 2px solid #d5d8db;
    border-radius: 100px;
    background-color: rgba(82, 184, 226, 0);
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.together-tab:hover {
    background-color: rgba(82, 184, 226, 0.1);
    border-color: #52b8e2;
}

.together-tab.active {
    background-color: #52b8e2;
    border-color: #52b8e2;
    color: #ffffff;
}

/* 본문 컨텐츠 */
.together-content {
    max-width: 1185px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background-color: #ffffff;
    position: relative;
    z-index: 1; /* 배너와 탭 위에 표시되도록 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* 계산기 하위 탭 버튼 */
.calculator-category-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px; /* 가로 간격 20px로 줄임 */
    margin-bottom: 3rem;
    border-bottom: none;
    width: 100%;
    max-width: 100%;
}

.calculator-category-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 550px;
    min-width: 550px;
    max-width: 550px;
    height: 72px;
    padding: 0;
    border: 2px solid #bfbfc1;
    border-radius: 0;
    background-color: transparent;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
}

.calculator-category-tab:hover {
    background-color: rgba(82, 184, 226, 0.05);
    border-color: #52b8e2;
}

.calculator-category-tab.active {
    background-color: #00ab80;
    border-color: #00ab80;
    color: #ffffff;
    font-weight: 400;
}

/* 계산기 섹션 컨테이너 */
.calculator-data-container {
    position: relative;
    min-height: 500px;
}

/* 계산기 데이터 섹션 */
.calculator-data-section {
    display: none;
    margin-top: 2rem;
}

.calculator-data-section.active {
    display: block;
}

/* 나의 탄소 계산기 섹션 */
.my-carbon-wrapper {
    width: 100%;
    max-width: 1185px;
    margin: 0 auto;
}

.my-carbon-container {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 8px;
}

.my-carbon-header {
    text-align: center;
    margin-bottom: 3rem;
}

.my-carbon-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 1rem 0;
}

.my-carbon-subtitle {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #676a7b;
    margin: 0;
}

.my-carbon-content {
    text-align: center;
    padding: 2rem 2rem;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 18px;
    color: #676a7b;
}


/* 교통 섹션 */
.transport-section {
    padding: 2rem 0;
    margin-bottom: 30px;
}

.section-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 30px;
    text-align: center;
}

.transport-category {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: #f9fafb;
    border-radius: 8px;
}

.category-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.5rem;
}

.transport-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.transport-form .form-group {
    flex: 1;
    min-width: 200px;
}

.transport-form .form-group:last-child {
    flex: 0 0 auto;
}

.transport-form label {
    display: block;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.transport-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    box-sizing: border-box;
}

.transport-form .input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transport-form .input-with-unit .form-control {
    flex: 1;
}

.transport-form .unit-display {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    color: #6b7280;
    white-space: nowrap;
}

.transport-form .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transport-form .btn-secondary {
    background-color: #52b8e2;
    color: #ffffff;
}

.transport-form .btn-secondary:hover {
    background-color: #3a9bc7;
}

/* 교통 결과 섹션 */
.transport-results-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.results-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.5rem;
}

.results-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f0fdf4;
    border-radius: 8px;
    text-align: center;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
}

.summary-label {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
    color: #00ab80;
}

.summary-unit {
    font-size: 18px;
    font-weight: 500;
    color: #6b7280;
}

.transport-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.transport-results-table thead {
    background-color: #f9fafb;
}

.transport-results-table th {
    padding: 1rem;
    text-align: left;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.transport-results-table td {
    padding: 1rem;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.transport-results-table .btn-delete {
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transport-results-table .btn-delete:hover {
    background-color: #dc2626;
}

.results-actions {
    text-align: center;
}

.results-actions .btn-outline {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.results-actions .btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* 실천방안 카드 그리드 */
.practice-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1490px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 실천방안 카드 */
.practice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    background-color: #ffffff;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 카드 아이콘 */
.practice-card-icon {
    width: 156px;
    height: 156px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.practice-card-icon .card-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: static !important; /* style.css의 position: absolute 덮어쓰기 */
    z-index: 1;
    opacity: 1 !important; /* style.css의 .card-icon opacity: 0 규칙 덮어쓰기 */
    pointer-events: auto !important; /* style.css의 pointer-events: none 규칙 덮어쓰기 */
    margin: 0 !important; /* style.css의 right, bottom 속성 무효화 */
    right: auto !important; /* style.css의 right 속성 제거 */
    bottom: auto !important; /* style.css의 bottom 속성 제거 */
    top: auto !important;
    left: auto !important;
}

/* 카드 제목 */
.practice-card-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #676a7b;
    margin: 0 0 2rem 0;
    text-align: center;
}

/* 카드 버튼 */
.practice-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 50px;
    padding: 7px 32px;
    background-color: #676a7b;
    border: none;
    border-radius: 100px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-card-btn:hover {
    background-color: #52b8e2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(82, 184, 226, 0.3);
}

/* 포인트제 카드 그리드 */
.points-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 포인트제 카드 */
.points-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    background-color: #ffffff;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.points-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 포인트제 카드 아이콘 */
.points-card-icon {
    width: 180px;
    height: 150px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.points-card-icon .card-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: static !important; /* style.css의 position: absolute 덮어쓰기 */
    z-index: 1;
    opacity: 1 !important; /* style.css의 .card-icon opacity: 0 규칙 덮어쓰기 */
    pointer-events: auto !important; /* style.css의 pointer-events: none 규칙 덮어쓰기 */
    margin: 0 !important; /* style.css의 right, bottom 속성 무효화 */
    right: auto !important; /* style.css의 right 속성 제거 */
    bottom: auto !important; /* style.css의 bottom 속성 제거 */
    top: auto !important;
    left: auto !important;
}

/* 포인트제 카드 제목 */
.points-card-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #676a7b;
    margin: 0 0 2rem 0;
    text-align: center;
}

.points-card-title .title-highlight {
    color: #52b8e2;
}

/* 포인트제 카드 버튼 */
.points-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 50px;
    padding: 7px 32px;
    background-color: #676a7b;
    border: none;
    border-radius: 100px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.points-card-btn:hover {
    background-color: #52b8e2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(82, 184, 226, 0.3);
}

/* 중고물품 나눔 카드 그리드 */
.share-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 중고물품 나눔 카드 */
.share-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    background-color: #ffffff;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.share-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 중고물품 나눔 카드 아이콘 */
.share-card-icon {
    width: 157px;
    height: 157px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.share-card-icon .card-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: static !important; /* style.css의 position: absolute 덮어쓰기 */
    z-index: 1;
    opacity: 1 !important; /* style.css의 .card-icon opacity: 0 규칙 덮어쓰기 */
    pointer-events: auto !important; /* style.css의 pointer-events: none 규칙 덮어쓰기 */
    margin: 0 !important; /* style.css의 right, bottom 속성 무효화 */
    right: auto !important; /* style.css의 right 속성 제거 */
    bottom: auto !important; /* style.css의 bottom 속성 제거 */
    top: auto !important;
    left: auto !important;
    pointer-events: auto !important; /* style.css의 pointer-events: none 규칙 덮어쓰기 */
}

/* 중고물품 나눔 카드 제목 */
.share-card-title {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #676a7b;
    margin: 0 0 2rem 0;
    text-align: center;
}

/* 중고물품 나눔 카드 버튼 */
.share-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 50px;
    padding: 7px 32px;
    background-color: #676a7b;
    border: none;
    border-radius: 100px;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-card-btn:hover {
    background-color: #52b8e2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(82, 184, 226, 0.3);
}

/* 반응형 디자인 */

/* 태블릿 (768px ~ 1489px) */
@media (min-width: 768px) and (max-width: 1489px) {
    .together-banner {
        height: 308px;
        margin-top: 0; /* 스크롤되어도 배너의 top 위치는 동일하게 유지 */
    }
    
    .together-content {
        padding: 3rem 1.5rem;
    }
    
    .banner-title {
        top: 30%;
        font-size: 48px;
    }
    
    .together-tab {
        width: auto;
        min-width: 200px;
        padding: 18px 40px;
        font-size: 20px;
    }
    
    .practice-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .practice-card-icon {
        width: 120px;
        height: 120px;
    }
    
    .practice-card-title {
        font-size: 20px;
    }
    
    .points-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .points-card-icon {
        width: 150px;
        height: 125px;
    }
    
    .points-card-title {
        font-size: 20px;
    }
    
    .share-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .share-card-icon {
        width: 130px;
        height: 130px;
    }
    
    .share-card-title {
        font-size: 20px;
    }
    
    .calculator-category-tabs {
        gap: 20px 30px;
    }
    
    .calculator-category-tab {
        width: 550px;
        height: 60px;
        font-size: 20px;
    }
    
    .my-carbon-title {
        font-size: 28px;
    }
    
    .my-carbon-subtitle {
        font-size: 16px;
    }
}

/* 모바일 (최대 767px) */
@media (max-width: 767px) {
    .together-banner {
        height: 220px;
        margin-top: 0; /* 스크롤되어도 배너의 top 위치는 동일하게 유지 */
    }
    
    .together-content {
        padding: 2rem 1rem;
    }
    
    .together-banner .banner-title {
        top: calc(80px + 15%); /* 모바일에서 헤더 높이 고려 */
        font-size: 32px;
        z-index: 2; /* 모바일에서도 이미지 위에 표시 */
        white-space: normal; /* 긴 텍스트 줄바꿈 허용 */
        padding: 0 1rem; /* 좌우 여백 추가 */
        text-align: center;
    }
    
    .together-tabs {
        flex-direction: column;
        align-items: center; /* 중앙 정렬 */
        gap: 1rem;
        padding: 1.5rem 1rem;
        max-width: 100%; /* 모바일에서 전체 너비 사용 */
        box-sizing: border-box;
    }
    
    .together-tab {
        width: 100%;
        max-width: 350px; /* 최대 너비 제한 */
        height: 60px;
        padding: 16px 32px;
        font-size: 18px;
        box-sizing: border-box;
    }
    
    .practice-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .practice-card {
        padding: 2rem 1.5rem;
    }
    
    .practice-card-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
    
    .practice-card-title {
        font-size: 18px;
        margin-bottom: 1.5rem;
    }
    
    .practice-card-btn {
        width: 120px;
        height: 45px;
        font-size: 18px;
    }
    
    .points-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .points-card {
        padding: 2rem 1.5rem;
    }
    
    .points-card-icon {
        width: 120px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
    
    .points-card-title {
        font-size: 18px;
        margin-bottom: 1.5rem;
    }
    
    .points-card-btn {
        width: 120px;
        height: 45px;
        font-size: 18px;
    }
    
    .share-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .share-card {
        padding: 2rem 1.5rem;
    }
    
    .share-card-icon {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }
    
    .share-card-title {
        font-size: 18px;
        margin-bottom: 1.5rem;
    }
    
    .share-card-btn {
        width: 120px;
        height: 45px;
        font-size: 18px;
    }
    
    .calculator-category-tabs {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .calculator-category-tab {
        width: 100%;
        max-width: 550px;
        height: 60px;
        font-size: 18px;
    }
    
    .calculator-data-container {
        min-height: 400px;
    }
    
    .my-carbon-container {
        padding: 2rem 1rem;
    }
    
    .my-carbon-title {
        font-size: 24px;
    }
    
    .my-carbon-subtitle {
        font-size: 16px;
    }
    
    .my-carbon-content {
        padding: 2rem 1rem;
        font-size: 16px;
    }
    
    .transport-category {
        padding: 1.5rem;
    }
    
    .transport-form .form-row {
        flex-direction: column;
    }
    
    .transport-form .form-group {
        min-width: 100%;
    }
    
    .summary-value {
        font-size: 24px;
    }
    
    .transport-results-table {
        font-size: 14px;
    }
    
    .transport-results-table th,
    .transport-results-table td {
        padding: 0.75rem;
    }
}

