/* Reset & Base */
:root {
    --primary-blue: #3182F6;
    --bg-white: #FFFFFF;
    --text-main: #191F28;
    --text-sub: #8B95A1;
    --bg-grey: #F2F4F6;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Hero Section */
/* Hero Section */
.hero-section {
    padding: 160px 24px 80px;
    /* Increased top padding for fixed nav */
    text-align: center;
    /* Richer Blue Gradient for Impact (v14) */
    background: linear-gradient(180deg, #E1F0FF 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

/* Navbar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-logo {
    font-size: 18px;
    font-weight: 800;
    color: #3182F6;
}

.nav-btn {
    background: #3182F6;
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-btn:active {
    background: #1B64DA;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(49, 130, 246, 0.1);
    color: #3182F6;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.main-title {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-main);
    word-break: keep-all;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.highlight-blue {
    color: #3182F6;
}

/* Mobile Typography Optimization */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.4rem;
        margin-bottom: 40px;
    }

    .hero-section {
        padding: 120px 20px 60px;
    }
}

/* 3D Cube */
.cube-container-wrapper {
    width: 100%;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.cube-scene {
    width: 180px;
    height: 180px;
    position: relative;
    transform-style: preserve-3d;
}

.cube {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    animation: rotateCube 16s infinite linear;
}

.cube-face {
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #D1D6DB;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    backface-visibility: hidden;
    border-radius: 24px;
    box-shadow: inset 0 0 30px rgba(49, 130, 246, 0.05);
}

.cube-front {
    transform: rotateY(0deg) translateZ(90px);
}

.cube-right {
    transform: rotateY(90deg) translateZ(90px);
}

.cube-back {
    transform: rotateY(180deg) translateZ(90px);
}

.cube-left {
    transform: rotateY(-90deg) translateZ(90px);
}

.cube-top {
    transform: rotateX(90deg) translateZ(90px);
}

.cube-bottom {
    transform: rotateX(-90deg) translateZ(90px);
}

.cube-face i {
    transform: scale(1.2);
}

.text-green {
    color: #2E7D32;
}

.text-blue {
    color: #3182F6;
}

@keyframes rotateCube {
    0% {
        transform: rotateX(-10deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(-10deg) rotateY(-360deg);
    }
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background-color: #1B64DA;
    color: white;
    font-size: 19px;
    font-weight: 700;
    padding: 22px 60px;
    /* Wider padding */
    min-width: 320px;
    /* Minimum width for balance */
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(27, 100, 218, 0.25);
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.cta-button:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(27, 100, 218, 0.2);
}

/* Sticky Story Section - Box Design */
.sticky-story-section {
    background-color: #F9FAFB;
    /* Distinct Gray Background */
    padding-bottom: 10vh;
}

.sticky-item-wrapper {
    height: 70vh;
    position: relative;
    pointer-events: none;
}

.sticky-item {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    background: transparent;
    /* Background now handled by Box */
}

.sticky-item.active {
    opacity: 1;
}

/* The Box Card */
.story-content {
    background: #FFFFFF;
    border: 1px solid #E5E8EB;
    border-radius: 32px;
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    /* Resp width */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    /* 3D Lift */
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: #E8F3FF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    color: #3182F6;
}

.story-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.35;
    color: #191F28;
}

.story-desc {
    font-size: 1.25rem;
    color: #4E5968;
    line-height: 1.6;
    word-break: keep-all;
}

@media (max-width: 768px) {
    .story-title {
        font-size: 1.8rem;
    }

    .story-desc {
        font-size: 1.1rem;
    }

    .story-content {
        padding: 40px 24px;
    }
}

/* Services Section - White Background for contrast */
.section {
    padding: 100px 24px;
    text-align: center;
    background: #FFFFFF;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    /* Tight gap to note */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
    /* Space for banners */
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: #FFFFFF;
    padding: 32px 20px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 18px;
    color: #333D4B;
    border: 1px solid #F2F4F6;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.service-icon-box {
    color: #3182F6;
    margin-bottom: 4px;
}

.service-note {
    margin-top: 0;
    margin-bottom: 60px;
    /* Large gap to grid */
    color: #4E5968;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.area-badge {
    background: #E8F3FF;
    color: #1B64DA;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .service-note {
        flex-direction: column;
        gap: 8px;
        font-size: 1.1rem;
    }
}

/* Mobile Service Grid: 1 Column */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }
}

/* Interaction Banners */
.banner-section {
    display: flex;
    gap: 20px;
    max-width: 1000px;
    margin: 60px auto 0;
}

.banner-card {
    flex: 1;
    background: #F9FAFB;
    padding: 36px 40px;
    border-radius: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.blog-banner {
    background: #E8F3FF;
    color: #1B64DA;
}

.call-banner {
    background: #E4FBF0;
    color: #11815C;
}

.banner-card:active {
    transform: scale(0.98);
}

.banner-text .sub {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    display: block;
    margin-bottom: 8px;
}

.banner-text h3 {
    font-size: 22px;
    font-weight: 800;
}


.banner-icon {
    color: var(--text-sub);
}

/* Mobile Banners: Stack */
@media (max-width: 768px) {
    .banner-section {
        flex-direction: column;
    }
}

/* Footer */
.footer {
    background: #F9FAFB;
    padding: 60px 24px;
    text-align: left;
    color: var(--text-sub);
}

.footer-logo {
    display: block;
    color: #333D4B;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 700;
}

.footer-info p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.divider {
    margin: 0 4px;
    color: #E5E8EB;
}

/* Gallery Section (v14) */
.gallery-section {
    background: #F0F2F5;
    /* Darker Gray v14 */
    padding: 100px 24px;
    text-align: center;
}

.gallery-section .section-title {
    margin-bottom: 40px;
    /* Matched to Reviews section gap (Ideal) */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Default 2x2 */
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    /* Consistent aspect ratio */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    /* Zoom effect */
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 in a row on PC */
    }
}

/* Reviews Section (v14) */
.reviews-section {
    background: #FFFFFF;
    padding: 100px 0 40px;
    /* Reduced bottom padding v15 */
    text-align: center;
    overflow: hidden;
}

.review-track-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
}

.review-track-wrapper::before,
.review-track-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.review-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.review-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.review-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.review-card {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 32px;
    width: 320px;
    flex-shrink: 0;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #F2F4F6;
}

.review-stars {
    color: #FFB800;
    /* Star Color */
    font-size: 18px;
    margin-bottom: 12px;
}

.review-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333D4B;
    margin-bottom: 16px;
    font-weight: 500;
}

.review-author {
    color: #8B95A1;
    font-size: 0.9rem;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-320px * 3 - 60px));
        /* Adjust based on item count/width */
    }
}

/* Banner Section Adjustment v15 -> v18 */
.banner-section {
    padding-top: 0;
    /* Pulled up closer to reviews */
    padding-bottom: 100px;
}

/* Colorful Service Icons v15 */
.service-icon-box {
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Mobile Layout Polish (v22 Static + 7% Spacing) */
@media (max-width: 768px) {

    /* 1. Disable Sticky, Convert to Static List */
    .sticky-story-section {
        padding-top: 50px;
        /* ~7% Top spacing */
        padding-bottom: 50px;
    }

    .sticky-item-wrapper {
        height: auto;
        /* Remove fixed scroll height */
        margin-bottom: 56px;
        /* ~7% Card-to-Card gap (Ref: 800px * 0.07) */
        opacity: 1;
        /* Always visible */
    }

    .sticky-item {
        position: relative;
        /* No longer sticky */
        top: auto;
        height: auto;
        opacity: 0;
        transform: translateY(20px);
        display: block;
        /* Natural flow */
        transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .sticky-item.active {
        opacity: 1;
        transform: translateY(0);
    }

    .story-content {
        margin: 0 auto;
        /* Center the card */
    }

    /* 2. Banner Spacing (7% Gap) */
    .banner-section {
        margin-top: 0 !important;
        padding-top: 56px;
        /* ~7% Gap from reviews */
        padding-bottom: 100px;
        flex-direction: column;
        gap: 20px;
    }

    .reviews-section {
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

.icon-blue {
    background: #E8F3FF;
    color: #3182F6;
}

.icon-green {
    background: #EDFCF2;
    color: #27A55C;
}

.icon-purple {
    background: #F4EBFF;
    color: #8252E6;
}

.icon-orange {
    background: #FFF4E6;
    color: #F79009;
}

.icon-pink {
    background: #FCE8F3;
    color: #D946EF;
}

.icon-teal {
    background: #E0F7FA;
    color: #0891B2;
}