/* =========================================
   1. Hero Slider
   ========================================= */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    overflow: hidden;
    background: #000;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Backgrounds */
.image-bg,
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.image-bg {
    background-size: cover;
    background-position: center;
}

.video-bg iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transform: scale(1.2);
    /* Prevent black bars */
}

/* Overlay */
.hero-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    z-index: 2;
}

/* Content */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
    margin-top: 60px;
    /* Offset for fixed header */
}

.hero-badge {
    display: inline-block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-size: 80px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #fff;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Button */
.btn-hero {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    transition: 0.3s;
}

.btn-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.6);
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    opacity: 0.5;
    transition: 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    opacity: 1;
}

/* =========================================
   2. Clients Section
   ========================================= */
.clients {
    padding: 60px 0;
    background: #0a0a0a;
    border-bottom: 1px solid #222;
    overflow: hidden;
}

.client-track {
    display: flex;
    gap: 80px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.client-logo {
    font-size: 20px;
    font-weight: 700;
    color: #555;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    opacity: 0.7;
    /* Improved contrast */
    transition: 0.3s;
}


@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   3. Portfolio Grid
   ========================================= */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.pf-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pf-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.7s cubic-bezier(0.2, 1, 0.3, 1);
    display: block;
}

.pf-item:hover img {
    transform: scale(1.1);
}

.pf-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s;
}

.pf-item:hover .pf-info {
    opacity: 1;
    transform: translateY(0);
}

.pf-cat {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #d8b4fe;
    /* Improved contrast */
    margin-bottom: 8px;
    display: block;
    font-weight: 700;
}

.pf-name {
    font-size: 24px;
    font-weight: 800;
}

/* =========================================
   3-1. New Portfolio Sliders (Categorized)
   ========================================= */

/* Section Header */
.pf-sec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

.pf-sec-title-group {
    display: flex;
    flex-direction: column;
}

.pf-sec-subtitle {
    font-size: 18px;
    /* Increased from 14px */
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.pf-sec-title {
    font-size: 60px;
    /* Increased from 40px */
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.btn-view-more {
    font-size: 16px;
    color: #aaa;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-view-more:hover {
    color: #fff;
    gap: 12px;
}

/* Swiper Container */
/* Swiper Container */
.pf-swiper-web,
.pf-swiper-video,
.pf-swiper-photo {
    padding-bottom: 20px;
    overflow: visible;
}

.pf-swiper-web .swiper-button-next,
.pf-swiper-web .swiper-button-prev,
.pf-swiper-video .swiper-button-next,
.pf-swiper-video .swiper-button-prev,
.pf-swiper-photo .swiper-button-next,
.pf-swiper-photo .swiper-button-prev {
    /* Ensure nav buttons are visible */
    z-index: 50;
}

/* Slide Style */
.pf-slide {
    height: 600px;
    transition: 0.5s;
    filter: brightness(0.3);
    transform: scale(0.9);
}

.pf-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    /* Remove underline */
}

.pf-slide.swiper-slide-active {
    filter: brightness(1);
    transform: scale(1);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.pf-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.pf-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.7s ease;
}

.pf-slide.swiper-slide-active .pf-card img {
    transform: scale(1.05);
    /* Active slide slightly zoomed */
}

.pf-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: 0.4s;
    text-align: left;
}

.pf-slide.swiper-slide-active .pf-card-overlay {
    transform: translateY(0);
    opacity: 1;
}

.pf-card-cat {
    font-size: 14px;
    color: #fff;
    opacity: 0.8;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.pf-card-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
}

/* Navigation Buttons Position */
.pf-next-web,
.pf-prev-web,
.pf-next-video,
.pf-prev-video,
.pf-next-photo,
.pf-prev-photo {
    color: #fff;
    width: 60px;
    height: 60px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    margin-top: 0;
}

.pf-prev-web,
.pf-prev-video,
.pf-prev-photo {
    left: 10vw;
    /* Adjust based on peek width */
}

.pf-next-web,
.pf-next-video,
.pf-next-photo {
    right: 10vw;
}

.pf-empty {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #333;
    border-radius: 20px;
    color: #666;
}

/* Responsive adjustment */
@media (max-width: 1400px) {
    .pf-slide {
        height: 50vw;
        max-height: 600px;
    }

    .pf-prev-web,
    .pf-prev-video,
    .pf-prev-photo {
        left: 20px;
    }

    .pf-next-web,
    .pf-next-video,
    .pf-next-photo {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .pf-slide {
        height: 60vw;
    }
}

/* =========================================
   4. Event Banner
   ========================================= */
.event-banner {
    position: relative;
    background: #111;
    overflow: hidden;
    padding: 100px 0;
    text-align: center;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.event-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.event-banner .container {
    position: relative;
    z-index: 2;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-block;
}

/* =========================================
   5. Reviews (Swiper)
   ========================================= */
.reviews {
    background: #0a0a0a;
}

.review-swiper {
    padding-bottom: 50px;
    /* Pagination 공간 */
    overflow: hidden;
}

/* 카드 공통 스타일 */
.review-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    transition: 0.4s;
    height: 100%;
    /* 높이 맞춤 */
}

.review-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.rc-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rc-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #222;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.rc-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.rc-desc {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.rc-stars {
    color: #fbbf24;
    font-size: 16px;
}

.rc-body p {
    font-size: 16px;
    color: #ccc;
    /* Improved contrast */
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swiper Pagination Custom */
.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.2;
    width: 10px;
    height: 10px;
    transition: 0.3s;
}

.swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

/* =========================================
   6. Process & CTA
   ========================================= */
.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.step-card {
    text-align: center;
    padding: 40px 20px;
    background: #111;
    border: 1px solid #222;
    border-radius: 20px;
    transition: 0.3s;
}

.step-card:hover {
    transform: translateY(-10px);
    background: #161616;
    border-color: #333;
}

.step-icon {
    font-size: 48px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    display: inline-block;
}

.step-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #fff;
}

.step-card p {
    font-size: 14px;
    color: #666;
}

.cta {
    padding: 160px 0;
    text-align: center;
}

.cta h2 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #fff;
}

.cta p {
    color: #ccc;
    /* Improved contrast */
    margin-bottom: 50px;
    font-size: 20px;
}

/* =========================================
   7. Responsive
   ========================================= */
@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    /* Hero Optimization */
    .hero-slider {
        height: 140vw;
        /* Calculated to match 2.5x scaled 16:9 video */
        min-height: auto;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .hero-content {
        margin-top: 0;
        padding: 0 20px;
        width: 100%;
    }

    .hero-badge {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 16px;
    }

    .hero-content h1 {
        font-size: 36px;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 10px;
        line-height: 1.6;
    }

    .btn-hero {
        padding: 14px 32px;
        font-size: 16px;
    }

    .video-bg iframe {
        transform: scale(2.5);
        transform-origin: center center;
    }

    /* Portfolio Grid Optimization (2 Columns) */
    .pf-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 Columns */
        gap: 15px;
        /* Smaller gap for 2 cols */
        padding: 0 10px;
        /* Added side padding */
    }

    .pf-item {
        aspect-ratio: 4/3;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .pf-info {
        opacity: 1;
        /* Always visible */
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, transparent);
        padding: 20px 15px;
        /* Reduced padding */
    }

    .pf-cat {
        font-size: 11px;
        /* Smaller font */
        color: #a78bfa;
        margin-bottom: 4px;
    }

    .pf-name {
        font-size: 16px;
        /* Smaller font */
        line-height: 1.3;
    }

    /* Portfolio Section Mobile Optimization */
    .pf-sec-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }

    .pf-sec-title {
        font-size: 40px;
        /* Reduced from 60px */
        line-height: 1.1;
    }

    .pf-sec-subtitle {
        font-size: 14px;
    }

    .pf-card-title {
        font-size: 24px;
        /* Reduced from 36px for mobile */
    }

    .pf-card-overlay {
        padding: 20px;
        /* Reduced padding */
    }

    .btn-view-more {
        font-size: 14px;
    }

    .pf-slide {
        height: 350px;
        /* Reduced height on mobile */
    }

    /* Process Grid (2 Columns) */
    .process-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 0 10px;
        /* Added side padding */
    }

    /* Reviews */
    .review-card {
        padding: 24px;
    }

    /* CTA */
    .cta {
        padding: 80px 0;
    }

    .cta h2 {
        font-size: 32px;
    }

    .cta p {
        font-size: 16px;
    }

    .clients {
        padding: 30px 0;
    }
}

/* =========================================
   8. Portfolio Modal
   ========================================= */
.pf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pf-modal.active {
    opacity: 1;
    visibility: visible;
}

.pf-modal-content {
    width: 90%;
    height: 90%;
    max-width: 1400px;
    background: #000;
    border-radius: 20px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}

.pf-modal-content iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.pf-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.pf-modal-close:hover {
    background: #fff;
    color: #000;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .pf-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .pf-modal-close {
        top: 10px;
        right: 10px;
    }
}