/* public/css/index-main.css */

/* ========================================
   HERO SECTION
======================================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
    padding: 140px 2rem 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 235, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-text h1 {
    font-size: 90px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #fff;
    word-break: keep-all;
}

.hero-text .line1,
.hero-text .line2 {
    display: inline;
}

.hero-text .gradient-text {
    background: linear-gradient(90deg, #00eb88, #9D50BB, #00eb88);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s linear infinite;
}

.hero-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.hero-desc .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    background: #00c474;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 235, 136, 0.3);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* SEO Search Box */
.seo-search-box {
    max-width: 500px;
    margin: 0 auto;
}

.seo-search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.seo-search-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.seo-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    background: var(--primary-color);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #00c474;
}

.search-btn svg {
    color: #000;
}

/* ========================================
   PORTFOLIO SECTION
======================================== */
.portfolio-section {
    padding: 100px 0;
    background: #fff;
    overflow: hidden;
    /* Prevent horizontal scroll */
}

.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: #f5f5f5;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #eee;
}

.tab-btn.active {
    background: var(--primary-color);
    color: #000;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.seo-portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
}

.portfolio-card {
    background: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}



.portfolio-thumb {
    width: 100%;
}

.portfolio-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
}



.portfolio-info {
    padding: 1.2rem 0 0;
    background: none;
}

.portfolio-info h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.8rem;
    color: #222;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.8rem;
    color: #888;
}

/* Portfolio Row - 좌우 반반 레이아웃 */
.portfolio-row {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

@media (min-width: 992px) {
    .portfolio-row {
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
    }

    .portfolio-category {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        /* Prevent horizontal scroll in columns */
    }

    .portfolio-row .portfolio-grid {
        display: flex;
        gap: 0;
    }

    .portfolio-row .portfolio-card {
        height: auto;
        padding-bottom: 20px;
    }

    /* 슬라이더 내비게이션 스타일 */
    .slider-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 24px;
        margin-top: 10px;
    }

    .swiper-prev,
    .swiper-next {
        background: none;
        border: 1px solid #ddd;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
        color: #666;
    }

    .swiper-prev:hover,
    .swiper-next:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #fff;
    }

    .swiper-prev.swiper-button-disabled,
    .swiper-next.swiper-button-disabled {
        opacity: 0.3;
        cursor: default;
    }
}

/* 카테고리 헤더 - 중앙 정렬 */
.category-header {
    text-align: center;
    margin-bottom: 48px;
}

/* h3 카테고리 타이틀 디자인 */
.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #222;
    display: inline-block;
    position: relative;
    padding-bottom: 12px;
}

.category-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 전체보기 버튼 - 진한 배경 + 흰색 텍스트 */
.btn-sm {
    padding: 10px 24px;
    font-size: 0.875rem;
    border-radius: 8px;
    background: #222;
    border: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-sm:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 235, 136, 0.3);
}

/* 카테고리 푸터 - 전체보기 버튼 */
.category-footer {
    text-align: center;
    margin-top: 48px;
}

.category-footer .btn-outline {
    background: transparent;
    color: #222;
    border: 1px solid #ddd;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 50px;
    display: inline-block;
    transition: all 0.3s ease;
}

.category-footer .btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 235, 136, 0.05);
}

/* ========================================
   SERVICES SECTION
======================================== */
.services-section {
    padding: 100px 0;
    background: #f9f9f9;
    overflow: hidden;
    /* Prevent horizontal scroll */
}

.services-header {
    text-align: center;
    margin-bottom: 48px;
}

.services-desc p {
    font-size: 22px;
    color: #666;
    max-width: 900px;
    margin: 0 auto;
}

.services-desc {
    max-width: 800px;
    margin: 1.5rem auto 0;
    color: #666;
    line-height: 1.8;
}

.services-grid {
    display: flex;
    gap: 0;
}

.service-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.service-card .card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #3a1f7a;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    transition: transform 0.4s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.card-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #00a85a;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    z-index: 1;
}

.service-card .card-content {
    padding: 1.5rem;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   BLOG SECTION (Main)
======================================== */
.blog-section {
    padding: 100px 0;
    background: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.blog-card a {
    display: block;
}

.blog-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-category {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

.blog-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   CLIENTS SECTION
======================================== */
.clients-section {
    padding: 100px 0;
    background: #f9f9f9;
    overflow: hidden;
}

.services-swiper {
    overflow: visible;
}

.marquee-track {
    display: flex;
    animation: marquee 60s linear infinite;
    width: max-content;
}

.marquee-item {
    flex-shrink: 0;
    padding: 0px 4rem;
}

.marquee-item img {
    height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.marquee-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

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

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

/* ========================================
   RESPONSIVE - Main Page
======================================== */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .hero {
        min-height: auto;
        padding: 140px 1.5rem 80px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .portfolio-section,
    .services-section,
    .blog-section,
    .clients-section {
        padding: 60px 0;
    }

    .portfolio-section .section-inner,
    .services-section .section-inner,
    .blog-section .section-inner,
    .clients-section .section-inner {
        padding: 0 1.5rem;
    }

    .portfolio-grid,
    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-btn {
        width: 100%;
        max-width: 200px;
    }

    .portfolio-row {
        gap: 40px;
    }

    .category-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .portfolio-category,
    .services-swiper {
        overflow: hidden;
    }

    .btn-sm {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}