﻿/* Calculator 3 specific styles */

.cal1-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.cal3-button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap; /* 버튼이 많아질 경우 자연스럽게 줄바꿈 허용 */
}

    .cal3-button-group button {
        background-color: white !important;
        color: #0078d7 !important;
        border: 1px solid #0078d7 !important;
        min-width: 80px; /* 버튼 최소 너비 설정 */
    }

        .cal3-button-group button.active {
            background-color: #005bb5 !important;
            color: black !important;
            transition: all 0.1s ease-in-out;
            transform: scale(1.05);
        }

        .cal3-button-group button:hover {
            background-color: #f0f7ff !important;
        }

.cal3-input-group {
    display: grid;
    gap: 15px;
    margin: 20px auto;
    max-width: 600px;
}

.cal3-input-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cal3-input-field label {
        min-width: 120px;
        text-align: left;
        font-size: 16px;
    }

    .cal3-input-field input,
    .cal3-input-field select {
        flex: 1;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

.cal3-ratio-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

#cal3-check-btn {
    background-color: #0078d7;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin: 20px auto;
    display: block;
}

    #cal3-check-btn:hover {
        background-color: #005bb5;
    }

/* Result area styles */
.cal3-result-area {
    margin: 20px auto;
    padding: 20px;
    border-radius: 5px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width: 600px;
}

    .cal3-result-area h2 {
        color: #0078d7;
        margin-bottom: 15px;
        font-size: 20px;
    }

.cal3-result-item {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.cal3-result-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.cal3-result-value {
    color: #0078d7;
    font-size: 16px;
    font-weight: bold;
}

.cal3-comparison {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f4ff;
    border-radius: 5px;
}

.cal3-alert {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.cal3-result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cal3-alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.cal3-alert-danger {
    background-color: #ffebee;
    color: #c62828;
}

/* 공유 버튼 스타일 */
.cal3-share-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.cal3-excel-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s ease;
}

    .cal3-excel-btn:hover {
        background-color: #218838;
    }

.cal3-kakao-btn {
    background-color: #FEE500;
    color: #000000;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s ease;
}

    .cal3-kakao-btn:hover {
        background-color: #E6CF00;
    }

    .cal3-kakao-btn::before {
        content: "";
        display: inline-block;
        width: 18px;
        height: 18px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 191"><path fill="black" d="M104,0C46.56,0,0,36.71,0,82c0,29.28,19.47,55,48.75,69.48-1.59,5.49-10.24,35.34-10.58,37.69,0,0-.21,1.76.93,2.43a3.14,3.14,0,0,0,2.48.15c3.28-.46,38.21-25.57,44.09-29.86,6,.67,12.09,1.06,18.33,1.06,57.44,0,104-36.71,104-82S161.44,0,104,0Z"/></svg>');
        background-repeat: no-repeat;
        background-size: contain;
        margin-right: 5px;
    }

/* ===== 슬라이딩 배너 스타일 ===== */
.sliding-banner-area {
    position: relative;
    margin: 40px auto;
    width: 320px;
    height: 200px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    max-width: 600px;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    z-index: 1;
}

.sliding-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    /* 부드러운 슬라이딩 애니메이션 */
    animation: smoothSliding 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

    .sliding-cover:hover {
        animation-play-state: paused;
    }

.cover-content {
    pointer-events: none;
}

.cover-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cover-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.slide-hint {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    backdrop-filter: blur(10px);
    animation: gentleBlink 3s ease-in-out infinite;
}

.arrow-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: softPulse 2.5s ease-in-out infinite;
}

    .arrow-indicator::after {
        content: '→';
        color: white;
        font-weight: bold;
        font-size: 16px;
    }

.banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.blog-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: subtleGlow 4s ease-in-out infinite;
}

.blog-description {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.95;
    margin-bottom: 15px;
}

.blog-tag {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    animation: gentleBounce 3s ease-in-out infinite;
}

/* 부드러운 슬라이딩 애니메이션 */
@keyframes smoothSliding {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(-40px);
    }

    60% {
        transform: translateX(-70px);
    }

    80% {
        transform: translateX(-30px);
    }

    100% {
        transform: translateX(0);
    }
}

/* 부드러운 깜빡임 */
@keyframes gentleBlink {
    0%, 70% {
        opacity: 0.8;
    }

    35% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* 부드러운 펄스 */
@keyframes softPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
}

/* 부드러운 글로우 효과 */
@keyframes subtleGlow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    50% {
        text-shadow: 0 2px 6px rgba(255,255,255,0.2), 0 0 15px rgba(255,255,255,0.1);
    }
}

/* 부드러운 바운스 */
@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* 호버시 더 부드럽게 */
.sliding-banner-area:hover .sliding-cover {
    animation: smoothSliding 7s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* 클릭 효과 - 부드럽게 */
.sliding-cover:active {
    transform: translateX(-100%) !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    animation: none !important;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .cal3-button-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: 15px 0;
    }

        .cal3-button-group button {
            width: 100% !important;
            max-width: 250px !important;
            margin: 0 auto !important;
            padding: 15px !important;
        }

    .cal3-input-field {
        flex-direction: column;
        align-items: stretch;
        padding: 0 15px; /* 좌우 여백 추가 */
    }

    .cal3-input-group {
        padding: 0 10px; /* input-group 전체에도 여백 추가 */
    }

    .cal3-input-field label {
        min-width: auto;
        text-align: left;
        margin-bottom: 5px;
    }

    .cal3-share-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .cal3-excel-btn, .cal3-kakao-btn {
        width: 100%;
        max-width: 250px;
        margin: 5px 0;
    }

    /* 슬라이딩 배너 모바일 반응형 */
    .sliding-banner-area {
        width: 280px;
        height: 180px;
        margin: 30px auto;
    }

    .cover-title {
        font-size: 16px;
    }

    .cover-subtitle {
        font-size: 12px;
    }

    .blog-title {
        font-size: 18px;
    }

    .blog-description {
        font-size: 13px;
    }

    .slide-hint {
        font-size: 10px;
        padding: 4px 8px;
    }

    .arrow-indicator {
        width: 25px;
        height: 25px;
        right: 15px;
    }

        .arrow-indicator::after {
            font-size: 14px;
        }

    /* 모바일에서 더욱 부드러운 애니메이션 */
    @keyframes smoothSliding {
        0% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-8px);
        }

        50% {
            transform: translateX(-35px);
        }

        75% {
            transform: translateX(-55px);
        }

        100% {
            transform: translateX(0);
        }
    }
}
