/* Custom CSS for Zapangi with Internationalization Support */
@import url(font.css);

/* About page grid responsive styles */
@media (max-width: 768px) {
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
}


/* 전체 레이아웃 */
html {
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #F9F6ED;
    padding-top: 100px; /* Fixed 헤더로 인한 컨텐츠 겹침 방지 - 100px로 변경 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* Header 스타일 - 새로 추가된 부분 */
.navbar-custom {
    /* background-color 삭제됨 */
    z-index: 1030;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 100px; /* 헤더 높이 100px로 설정 */
    padding: 8px 0; /* 상하 패딩 추가 */
}

/* 스크롤 전 투명 상태 */
.navbar-custom.navbar-transparent {
    background-color: transparent !important;
    box-shadow: none;
}

/* 스크롤 후 배경색 있는 상태 */
.navbar-custom.navbar-scrolled {
    background-color: #3A653D !important;
}

/* 스크롤 Y가 1 이상일 때만 box-shadow 효과 */
.navbar-custom.navbar-shadow {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: white !important;
}

/* 커스텀 햄버거 버튼 스타일 */
.custom-toggler {
    border: none;
    padding: 8px 10px;
    background: transparent;
    transition: all 0.3s ease;
}

.custom-toggler:focus {
    box-shadow: none;
    outline: none;
}

.custom-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* 햄버거 아이콘 기본 상태 */
.custom-toggler-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: block;
    transition: all 0.3s ease;
    background: none !important;
}

.custom-toggler-icon::before,
.custom-toggler-icon::after,
.custom-toggler-icon {
    background: none !important;
}

.custom-toggler-icon::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.9);
    transform-origin: center;
    transition: all 0.3s ease;
}

.custom-toggler-icon::after {
    content: '';
    position: absolute;
    top: 11px;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.9);
    transform-origin: center;
    transition: all 0.3s ease;
}

/* 가운데 선 */
.custom-toggler-icon {
    background-color: rgba(255, 255, 255, 0.9) !important;
    height: 2px !important;
    width: 24px !important;
    margin-top: 11px;
    transition: all 0.3s ease;
}

/* 메뉴가 열렸을 때 X 모양으로 변경 */
.custom-toggler[aria-expanded="true"] .custom-toggler-icon::before {
    top: 11px;
    transform: rotate(45deg);
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon::after {
    top: 11px;
    transform: rotate(-45deg);
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon {
    background-color: transparent !important;
}

/* 모바일 반응형 스타일 */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }

    .nav-item {
        margin: 0.25rem 0;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 4px;
        margin: 0.1rem 1rem;
        transition: background-color 0.3s ease;
        font-size: 1.3rem !important;
        font-weight: 900 !important;
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .navbar-collapse.show {
        /* 스크롤 상태에 따라 배경색 다르게 적용 */
        margin: 0.5rem -15px -15px -15px;
        padding: 1rem 15px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* 스크롤 전 상태에서 메뉴 열림 */
    .navbar-transparent .navbar-collapse.show {
        background-color: #3A653D;
    }
    
    /* 스크롤 후 상태에서 메뉴 열림 */
    .navbar-scrolled .navbar-collapse.show {
        background-color: #3A653D;
    }
}

/* 데스크톱 스타일 */
@media (min-width: 992px) {
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }
    
    .navbar-brand:hover {
        color: rgba(255, 255, 255, 0.9) !important;
        transform: scale(1.05);
        transition: all 0.3s ease;
    }
}

/* 다국어 지원 폰트 설정 */
:lang(ko) {
    font-family: 'KpSans-Regular', 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
}

:lang(ja) {
    font-family: 'KpSans-Regular', 'Hiragino Sans', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
}

:lang(zh) {
    font-family: 'KpSans-Regular', 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', sans-serif;
}

:lang(en) {
    font-family: 'KpSans-Regular', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Font Awesome 아이콘 폰트 우선 적용 */
.fa, .fas, .far, .fal, .fab, .fad, .fa-solid, .fa-regular, .fa-light, .fa-brands, .fa-duotone {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro" !important;
}

/* 네비게이션 - 기존 스타일 업데이트 */
.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 카드 스타일 */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* 버튼 스타일 */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
}

/* 알림 스타일 */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* 입력 폼 스타일 */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

section {
    color: white;
    padding: 4rem 0;
}

section h1 {
    font-family:'THEBOLDFONT-PRO',serif !important;
    font-size: clamp(2.5rem, 8vw, 6rem);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.02em;
}
section h2 {
    font-family:'THEBOLDFONT-PRO',serif !important;
    font-size: clamp(2.5rem, 8vw, 4rem);
}

section h3 {
    font-family:'THEBOLDFONT-PRO',serif !important;
    font-size: clamp(2.5rem, 8vw, 2rem);
}

/* Hero Section */
.section1 {
    height: 100vh;
    width: 100%;
    margin-top: -100px;
    padding-top: 160px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.section1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 101, 61, 0.8);
}
.section1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('../images/sect1_img.png');
    background-size: cover;
}

/* 통계 카드 */
.stats-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* 기능 카드 */
.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* 푸터 스타일 */
footer {
    margin-top: auto;
    background-color: #3A653D;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #ffffff !important;
    opacity: 0.8;
}

/* 프로필 이미지 */
.profile-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 2px solid white;
}

/* 대시보드 스타일 */
.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.activity-log .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.activity-log .list-group-item:hover {
    border-left-color: #0d6efd;
    background-color: #f8f9fa;
}

@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 반응형 유틸리티 */
@media (max-width: 768px) {
    section {
        padding: 2rem 0;
    }

    section h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 2rem !important;
    }

    .stats-number {
        font-size: 2rem;
    }

    .navbar-nav {
        text-align: center;
    }

    .card-body {
        padding: 1rem;
    }

    /* 모바일 반응형 - slide-item 크기 조정 */
    .slide-item {
        width: 7.2rem !important;
        height: 7.2rem !important;
    }

    .slide-item img {
        width: 6.4rem !important;
        height: 6.4rem !important;
    }

    .slider-container {
        gap: 1rem !important;
    }
}

/* 소셜 로그인 버튼 */
.btn-google {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-google:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.btn-naver {
    background-color: #03c75a;
    border-color: #03c75a;
    color: white;
}

.btn-naver:hover {
    background-color: #028a47;
    border-color: #028a47;
    color: white;
}

.btn-kakao {
    background-color: #fee500;
    border-color: #fee500;
    color: #3c1e1e;
}

.btn-kakao:hover {
    background-color: #fdd835;
    border-color: #fdd835;
    color: #3c1e1e;
}

/* 애니메이션 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* 로딩 스피너 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 언어 선택 드롭다운 스타일 */
.language-selector .dropdown-toggle::after {
    margin-left: 0.5rem;
}

.language-selector .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

.language-selector .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
}

.language-selector .dropdown-item:hover {
    background-color: #f8f9fa;
}

.language-selector .dropdown-item.active:hover {
    background-color: #0b5ed7;
}

/* 언어별 텍스트 정렬 */
:lang(ar), :lang(he) {
    direction: rtl;
    text-align: right;
}

/* 다국어 토스트 알림 */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
}

/* 언어 변경 버튼 애니메이션 */
.language-change-btn {
    transition: all 0.3s ease;
}

.language-change-btn:hover {
    transform: scale(1.05);
}

/* 다국어 지원 플래그 아이콘 스타일 */
.flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border-radius: 2px;
}

/* 스크롤바 스타일 (Webkit 브라우저) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 반응형 그리드 스타일 - about 페이지용 */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    max-width: 1200px;
    justify-self: center;
    gap: 1.5rem;
    margin-top: 70px;
}

.about-grid-main-img {
    grid-row: 1 / 3;
    height: 100%;
    width: 100%;
}

.about-grid-text-img {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.about-grid-small-img1 {
    grid-column: 3;
    grid-row: 1;
    height: 100%;
    width: 100%;
    /*object-fit: cover;*/
}

.about-grid-bottom-img {
    grid-column: 2 / 4;
    grid-row: 2;
    height: 100%;
    width: 100%;
    /*object-fit: cover;*/
}

/* 태블릿 사이즈 (768px 이하) - about 페이지 첫 번째 그리드 */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
        margin-top: 50px;
        padding: 0 1rem;
    }

    .about-grid > * {
        grid-column: 1;
        grid-row: auto;
        height: auto;
        width: 100%;
    }

    .about-grid-main-img {
        height: auto;
    }

    .about-grid-text-img,
    .about-grid-small-img1,
    .about-grid-bottom-img {
        height: auto;
    }
}

/* 반응형 그리드 스타일 - index 페이지용 */
.responsive-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    max-width: 1200px;
    justify-self: center;
    gap: 1.5rem;
    margin-top: 70px;
}

.grid-main-img {
    grid-row: 1 / 3;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.grid-text-img {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.grid-small-img1 {
    grid-column: 3;
    grid-row: 1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.grid-bottom-img {
    grid-column: 2 / 4;
    grid-row: 2;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* 태블릿 사이즈 (768px 이하) */
@media (max-width: 768px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
        margin-top: 50px;
        padding: 0 1rem;
    }

    .grid-main-img,
    .grid-text-img,
    .grid-small-img1,
    .grid-bottom-img {
        grid-column: 1;
        grid-row: auto;
        height: auto;
        max-height: 250px;
    }
}

/* 모바일 사이즈 (480px 이하) */
@media (max-width: 480px) {
    .responsive-grid {
        gap: 0.75rem;
        margin-top: 30px;
    }

    .grid-main-img,
    .grid-text-img,
    .grid-small-img1,
    .grid-bottom-img {
        max-height: 200px;
    }
}

/* About page feature grid styles */
.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
    justify-content: center;
    margin: 0 auto;
}

.about-feature-card {
    background-color: #F2F0E7;
    border: 1px solid #D8DCCE;
    border-radius: 24px;
    height: 322px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
}

.about-feature-icon {
    background-color: rgba(58, 101, 61, 0.1);
    border: 1px solid #D8DCCE;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.about-feature-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.about-feature-title {
    color: #3A653D;
    font-family: 'THEBOLDFONT-PRO', serif;
}

.about-feature-description {
    color: #3A653D;
}

.about-feature-button {
    background-color: #3A653D;
    border-radius: 20px;
    border: none;
    color: #F2F0E7;
    font-family: 'THEBOLDFONT-PRO', serif;
    padding: 8px 16px;
}

/* Responsive design for about feature grid */
@media (max-width: 768px) {
    .about-feature-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
}

/* Flavor item circle styles */
.flavor-item-circle {
    width: 90px;
    height: 90px;
    background-color: #FDF0D8;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .flavor-item-circle {
        width: 54px;
        height: 54px;
    }

    .flavor-items-container {
        width: 70% !important;
    }

    .flavor-note-title {
        font-size: 2rem !important;
    }

    .machine-steps-container {
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 2rem 1rem !important;
    }

    .machine-step {
        width: 150px !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        margin: 0 auto !important;
    }

    .machine-step h4 {
        font-size: 1.5rem !important;
    }

    .machine-step p {
        font-size: 0.8rem !important;
    }

    .machine-section {
        height: 80rem !important;
    }

    .machine-bg {
        background-size: inherit !important;
    }
}

/* Bean page grid styles */
.bean-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    max-width: 1200px;
    margin: 70px auto 0;
    gap: 1.5rem;
}

.bean-grid-main-img {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
}

.bean-grid-top-img {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
}

.bean-grid-bottom-img {
    grid-column: 2;
    grid-row: 2;
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
}

/* 태블릿 및 모바일 사이즈 (768px 이하) */
@media (max-width: 768px) {
    .bean-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
        margin-top: 50px;
        padding: 0 1rem;
    }

    .bean-grid-main-img,
    .bean-grid-top-img,
    .bean-grid-bottom-img {
        grid-column: 1;
        grid-row: auto;
        height: auto;
        max-height: 250px;
    }
}

/* 모바일 사이즈 (480px 이하) */
@media (max-width: 480px) {
    .bean-grid {
        gap: 0.75rem;
        margin-top: 30px;
    }

    .bean-grid-main-img,
    .bean-grid-top-img,
    .bean-grid-bottom-img {
        width:100%;
    }
}

/* Flavor notes container responsive */
.flavor-notes-container {
    width: 450px;
}

@media (max-width: 768px) {
    .flavor-notes-container {
        width: 100% !important;
    }
}

/* Footer navigation styles */
.footer-nav {
    gap: 3rem;
    line-height: 2.5rem;
}

/* Footer navigation responsive */
@media (max-width: 768px) {
    .footer-container {
        padding-top: 0 !important;
    }

    .footer-logo {
        width: 20% !important;
        height: auto !important;
    }

    .footer-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
        line-height: 2rem !important;
    }

    .footer-nav > li {
        display: flex;
        flex-direction: row;
        width:100%;
    }

    .footer-nav > li > a {
        width: 30%;
    }

    .footer-label-row {
        margin-top: 3rem !important;
    }

    /* Menu card responsive - center align content */
    .menu-card-body {
        align-items: center;
        text-align: center;
    }

    .menu-price-container {
        justify-content: center !important;
        flex-direction: column;
        align-items: center;
    }

    .menu-price-container > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .menu-price-container p {
        margin: 0.2rem 0 !important;
    }
}