@font-face {
	font-family: 'NanumGothic';
	src: url('/fonts/NanumGothic.woff2') format('woff2'),
		url('/fonts/NanumGothic.woff') format('woff');
	font-weight: normal;
	font-style: normal;
}


	@font-face {
    font-family: 'BMJUA';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/BMJUA.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'RecipeKorea';
    src: url('/fonts/Recipekorea.otf');
    font-weight: normal;
    font-style: normal;
}


body {
	font-family: 'BMJUA','NanumGothic', sans-serif;
    background: url("/img/background/recipe-back.jpg") no-repeat center/cover;
    background-color: #f4f4f4;
    line-height: 1.6;
    padding-top: 78px;
}

:root {
	--green: #15CB5E;
	--lightgreen: #E6FFB7;
	--cream: #F8F9FA;
}
html {
    scroll-behavior: smooth;
}
[data-section] {
    scroll-snap-align: start;
    height: 100vh;
    overflow-y: auto;
}
#comment {
    -webkit-overflow-scrolling: touch;
}
/* 스크롤 탑 버튼 스타일 (오른쪽 하단 고정) */
.scroll-to-top {
    position: fixed;
    left: 25px;    /* 왼쪽(left)에서 오른쪽(right)으로 변경 */
    bottom: 20px;
    z-index: 9999;
}

#scrollToTopBtn {
    display: none;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#scrollToTopBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

#scrollToTopBtn i {
    font-size: 1.5rem;
}
/* 레시피 상세 스타일 */
.recipe-detail-container {
    width: 80%;
    max-width: 1200px;
    margin: 30px auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative; /* 추가: 부모 요소에 relative 포지셔닝 */
    overflow: hidden; /* 추가: 자식 요소가 넘치지 않도록 */
}

.recipe-detail-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--green);
}

    .recipe-step-content {
        white-space: pre-wrap; /* 띄어쓰기와 줄바꿈 유지 */
        word-break: break-word; /* 긴 단어 줄바꿈 처리 */
    }

.fw-bold{
	font-size: 1.3rem;
}

.title_font{
	font-family: 'RecipeKorea','BMJUA', sans-serif;
	
}

#subject {
	font-size: 2.4rem;
    font-weight: bold;
}
.border-green{
	border-color: var(--green) !important; 
}


.recipe-image {
    max-width: 65vh;
    aspect-ratio: 1 / 1; /* 1:1 비율 유지 */
    object-fit: cover;
    height: auto;
    border-radius: 8px;
}
.carousel-control-prev, .carousel-control-next {
    z-index: 1051 !important;
}

.recipe-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-actions button,
.recipe-actions a {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}


.recipe-actions button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


#followBtn {
    background-color: #ffc107;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    border:none;
}

#followBtn:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

#ratingInput{
	display: inline-block;	
	width: 50%;
	height: 100%;
}

.rate_box{
	position:relative;
	width: 190px;
	right: 0px !important;
}

section{
	height: 90vh;
}
/* 케러셀 스타일 */
.carousel-inner{
	position:relative;
	width: 100%;
}

.carousel-inner img {
    border-radius: 8px;
    width:50vh;
    aspect-ratio:1 / 1; /* 1:1 비율 유지 */
    cursor: zoom-in;
}

#voiceControlBtn{
	position: fixed;
	right: 20px; /* 왼쪽(left)에서 오른쪽(right)으로 변경 */
	top: 110px; /* 기존 top: 0 → 110px로 변경 */
	background: rgba(255, 255, 255, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.4); 
	backdrop-filter : blur(15px);
	z-index: 9999;

}

#voiceControlBtn:hover{
	background: var(--green);
	border: none;

}
#voiceControlBtn:hover img{
	transform: scale(1.05);
}

/* 캐러셀 버튼 중앙 정렬 + 세로 확장 */
.vertical-controls .carousel-control-prev,
.vertical-controls .carousel-control-next {
    width: 125% !important;       /* 가로 너비 조정 */
    height: 100% !important;      /* 세로 높이 확장 */
    bottom: auto !important;
    transform: none !important;
    align-items: center !important;
    transition: background 0.1s;
}

/* 아이콘 크기 확대 */
.vertical-controls .carousel-control-prev-icon,
.vertical-controls .carousel-control-next-icon {
    width: 3rem !important;
    height: 3rem !important;
}

.vertical-controls .carousel-control-prev-icon{
	position: relative;
	left: 85%!important;
	
	}
.vertical-controls .carousel-control-next-icon {
	position: relative;
	right: 85%!important;
	
	}

/* 왼쪽 버튼 위치 */
.vertical-controls .carousel-control-prev {
    left: -100% !important;
    right: auto !important;
    justify-content: flex-start !important;
    padding-left: 1rem !important;
}

/* 오른쪽 버튼 위치 */
.vertical-controls .carousel-control-next {
    right: -100% !important;
    left: auto !important;
    justify-content: flex-end !important;
    padding-right: 1rem !important;
}
.carousel-control-prev:hover .carousel-control-next-icon,
.carousel-control-next:hover .carousel-control-prev-icon {
	opacity: 0;
}

/* 호버/터치 시 효과 강화 */
.vertical-controls .carousel-control-prev:hover,
.vertical-controls .carousel-control-prev:active {
    background: linear-gradient(to right, 
        rgba(0,0,0,0.2) 0%, 
        rgba(0,0,0,0.1) 15%, 
        rgba(0,0,0,0) 100%) !important;
}

.vertical-controls .carousel-control-next:hover,
.vertical-controls .carousel-control-next:active {
    background: linear-gradient(to left, 
        rgba(0,0,0,0.2) 0%, 
        rgba(0,0,0,0.1) 15%, 
        rgba(0,0,0,0) 100%) !important;
}

/* 아이콘 가시성 향상 */
.vertical-controls .carousel-control-prev-icon {
    margin-left: 15px !important;
    filter: drop-shadow(2px 0 3px rgba(0,0,0,0.5));
}

.vertical-controls .carousel-control-next-icon {
    margin-right: 15px !important;
    filter: drop-shadow(-2px 0 3px rgba(0,0,0,0.5));
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .vertical-controls .carousel-control-prev,
    .vertical-controls .carousel-control-next {
    }
    .vertical-controls .carousel-control-prev-icon,
    .vertical-controls .carousel-control-next-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}
/* 모달 열릴 때 캐러셀 버튼 자동 숨김 */
body.modal-open .carousel-control-prev,
body.modal-open .carousel-control-next {
    visibility: hidden !important;
    z-index: 1039 !important; /* 모달 뒤로 */
}

/* 모달 z-index 고정 */
#imageModal.modal {
    z-index: 1060 !important;
}
.page-item.active .page-link{
	border-color: var(--green);
	background-color: var(--green);
}
/* 커스텀 CSS */
.slim-header {
    padding: 0.8rem 1rem !important;  /* 헤더 높이 축소 */
    border-bottom: none !important;    /* 경계선 제거 */
}

.large-close {
    font-size: 2rem !important;      /* X 버튼 크기 확대 */
    line-height: 0.8 !important;
    padding: 0 0.5rem !important;
    position: absolute;
    right: 10px;
    top: 20px;
}

.modal-position {
    transition: transform 0.3s ease-out !important;
}

.modal-img {
    margin-top: -15px;  /* 헤더 높이 줄인 만큼 이미지 올림 */
}

.page-link{
	color: var(--green);
}

.page-link:hover{
	color: var(--green) !important;
}

    /* 모바일 페이지네이션 스타일 - 대형 버튼 */
    .mobile-pagination {
        padding: 20px 0;
    }
    
    .mobile-pagination .page-item {
        margin: 0 5px;
        display: flex;
        align-items: center;
    }
    
    .mobile-pagination .page-link {
        min-width: 60px;
        height: 60px;
        line-height: 60px;
        text-align: center;
        font-size: 1.3rem;
        padding: 0;
        border-radius: 50% !important;
        border: none;
        box-shadow: 0 3px 6px rgba(0,0,0,0.16);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.3s ease;
    }
    
    .mobile-pagination .page-link i {
        font-size: 1.5rem;
    }
    
    .mobile-pagination .page-item.active .page-link {
        background-color: #28a745;
        color: white;
        font-weight: bold;
        transform: scale(1.1);
    }
    
    .mobile-pagination .page-item.disabled .page-link {
        opacity: 0.5;
        transform: scale(0.9);
    }
    
    .mobile-pagination .page-link:active {
        transform: scale(0.95);
    }
    
    /* 태블릿 사이즈에서 조정 */
    @media (max-width: 992px) {
        .mobile-pagination .page-link {
            min-width: 55px;
            height: 55px;
            line-height: 55px;
            font-size: 1.2rem;
        }
    }
    
    /* 모바일 사이즈에서 조정 */
    @media (max-width: 768px) {
        .mobile-pagination .page-link {
            min-width: 50px;
            height: 50px;
            line-height: 50px;
            font-size: 1.1rem;
        }
        
        .mobile-pagination .page-link i {
            font-size: 1.3rem;
        }
    }

/* 반응형 조정 */

@media (max-width: 768px) {
    #voiceControlBtn {
        right: 15px;
        top: 110px;
        padding: 0.5rem;
    }
    
    #voiceControlBtn .mic {
        width: 36px;
        height: 36px;
    }
}
.mic{
	width: 48px;
	height: 48px;
}

.content_line{
	position:relative;
	width: 50vh;
	left: 50%;
	margin-left: -25vh;
	border-color: var(--green) !important;
	 box-shadow: 0px 0px 4px rgba(21, 203, 94, 0.5);
}
@media (max-width: 520px) {
	.carousel-inner img{
		width: 30vh;
	}
	.content_line{
		width: 30vh;
		margin-left: -15vh;
	}
	
	}


/* 반응형 디자인 */

@media (max-width: 800px) {
    .recipe-detail-container {
        width: 95%;
        padding: 15px;
    }

    .recipe-info {
        flex-direction: column;
    }

    .recipe-image {
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .recipe-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .recipe-actions button,
    .recipe-actions a {
        width: 100%;
        margin-bottom: 10px;
    }
}

.recommend {
			color: #6c757d;
			font-weight: bold;
			text-decoration: none;
		}

/* 기본 Tagify 스타일 (기존 유지) */
.tagify {
    --tags-border-color: #e0e0e0;
    --tags-hover-border-color: var(--green);
    --tags-focus-border-color: var(--green);
    --tag-bg: var(--green);
    --tag-hover: var(--green-dark);
    --tag-text-color: white;
    --tag-remove-btn-color: white;
    --tag-border-radius: 16px;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background-color: #f9f9f9;
    width: 100%;
}

.tagify__tag {
    border-radius: 16px !important;
    padding: 5px 10px 5px 35px !important;
}

.tagify__tag__removeBtn {
    opacity: 0.8 !important;
    margin-left: 5px !important;
}

.tagify__tag__removeBtn:hover {
    opacity: 1 !important;
    background: rgba(255,255,255,0.3) !important;
}

/* Readonly 전용 스타일 추가 */
.tagify[readonly] {
    --tag-bg: #f0f0f0;
    --tag-text-color: #555;
    --tags-border-color: transparent;
    background-color: transparent;
    padding: 0.5rem 0;
}

.tagify[readonly] .tagify__tag {
    background: linear-gradient(135deg, #f5f5f5, #e9e9e9);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: #555;
    border: 1px solid #ddd;
    padding: 4px 12px !important;
}



/* 재료 박스 스타일 */
.ingredients-box {
    background-color: #f9f9f9;
    border-color: #e0e0e0 !important;
    text-align: center; /* 부모 요소에 가운데 정렬 */
    margin-bottom: 10rem !important;
}

/* 새로운 태그 컨테이너 스타일 */
.tagify-container {
    display: inline-block; /* 인라인 블록으로 변경 */
    max-width: 100%;
}

/* Tagify 스타일 재정의 */
.ingredients-box .tagify {
    display: inline-flex; /* 인라인 플렉스로 변경 */
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0.8rem 0;
    background-color: transparent;
    border: none;
    text-align: center;
    margin: 0 auto; /* 자동 마진으로 가운데 정렬 */
}

/* 태그 아이템 스타일 */
.ingredients-box .tagify__tag {
    display: inline-flex; /* 인라인 플렉스로 변경 */
    margin: 2px;
    position: relative;
}

/* 읽기 전용 태그 스타일 */
.ingredients-box .tagify[readonly] .tagify__tag {
    background: linear-gradient(135deg, #f5f5f5, #e9e9e9);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: #555;
    border: 1px solid #ddd;
    padding: 6px 15px !important;
    font-size: 0.95rem;
}

.ingredients-box .tagify[readonly] .tagify__tag > div::before {
	display:flex;
    content: "재료";
    font-size:0.75rem;
    margin-right: 5px;
    color: var(--green);
    font-weight: bold;
}



.tag-box .tagify[readonly] .tagify__tag > div::before {
    content: "#";
    margin-right: 4px;
    color: var(--green);
    font-weight: bold;
}

.tagify[readonly] .tagify__tag__removeBtn {
    display: none; /* 읽기 전용 시 삭제 버튼 숨김 */
}

/* 호버 효과 */
.tagify[readonly] .tagify__tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* 비활성화 상태 시 스타일 */
.tagify[disabled] {
    opacity: 0.7;
    background-color: #f9f9f9;
}

.tagify[disabled] .tagify__tag {
    background-color: #e0e0e0;
    color: #888;
}

.user-info:hover {
    text-decoration: none;
}
