/* ===================================
   설치사례 페이지 전용 스타일
   =================================== */

/* Cases Hero Section */
.cases-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    padding: 120px 0 80px;
    margin-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(2px);
}

.cases-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.7);
    z-index: 1;
}

.cases-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cases-hero .hero-logo {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
}

.cases-hero .hero-logo img {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.cases-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cases-hero .hero-subtitle {
    font-size: 1.3rem;
    color: #d4af37;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Logo Bar Section */
.logo-bar-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
}

.logo-bar-header {
    text-align: center;
    margin-bottom: 50px;
}

.logo-bar-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 0.5rem;
}

.logo-bar-header p {
    font-size: 1rem;
    color: #666;
}

.logo-bar-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.logo-track {
    display: flex;
    gap: 60px;
    animation: scrollLeft 40s linear infinite;
    will-change: transform;
}

.logo-track:nth-child(2) {
    animation: scrollRight 35s linear infinite;
}

.logo-item {
    flex-shrink: 0;
    width: 180px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%);
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Gallery Section */
.gallery-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 1rem;
}

.gallery-header .section-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.3);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f8f9fa;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.9), rgba(212, 175, 55, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 3rem;
    color: #ffffff;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
    user-select: none;
}

.lightbox-close:hover {
    color: #d4af37;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    padding: 20px;
    background: rgba(26, 35, 50, 0.6);
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(212, 175, 55, 0.8);
    color: #1a2332;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
    background: rgba(26, 35, 50, 0.8);
    padding: 10px 25px;
    border-radius: 25px;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   반응형 디자인
   =================================== */

/* 태블릿 (최대 1024px) */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .cases-hero .hero-title {
        font-size: 2.8rem;
    }
    
    .cases-hero .hero-logo img {
        max-width: 200px;
    }
    
    .cases-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        padding: 15px;
    }
    
    .lightbox-close {
        font-size: 40px;
        top: 20px;
        right: 30px;
    }
    
    .logo-item {
        width: 150px;
        height: 70px;
    }
    
    .logo-track {
        gap: 50px;
    }
}

/* 모바일 (최대 768px) */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .cases-hero {
        min-height: 300px;
        padding: 100px 0 60px;
    }
    
    .cases-hero .hero-title {
        font-size: 2.2rem;
    }
    
    .cases-hero .hero-logo img {
        max-width: 180px;
    }
    
    .cases-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-header {
        margin-bottom: 40px;
    }
    
    .gallery-header .section-title {
        font-size: 2rem;
    }
    
    .gallery-header .section-description {
        font-size: 1rem;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 75vh;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
        background: rgba(26, 35, 50, 0.8);
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        font-size: 35px;
        top: 15px;
        right: 20px;
    }
    
    .lightbox-counter {
        font-size: 1rem;
        padding: 8px 20px;
        bottom: 20px;
    }
    
    .logo-bar-section {
        padding: 50px 0;
    }
    
    .logo-bar-header h2 {
        font-size: 1.6rem;
    }
    
    .logo-bar-header p {
        font-size: 0.9rem;
    }
    
    .logo-item {
        width: 130px;
        height: 60px;
        padding: 12px 15px;
    }
    
    .logo-track {
        gap: 40px;
    }
}

/* 소형 모바일 (최대 480px) */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cases-hero .hero-title {
        font-size: 1.8rem;
    }
    
    .cases-hero .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .gallery-header .section-title {
        font-size: 1.6rem;
    }
    
    .gallery-header .section-description {
        font-size: 0.95rem;
    }
    
    .gallery-overlay i {
        font-size: 2rem;
    }
    
    .logo-bar-header h2 {
        font-size: 1.4rem;
    }
    
    .logo-bar-header p {
        font-size: 0.85rem;
    }
    
    .logo-item {
        width: 110px;
        height: 50px;
        padding: 10px;
    }
    
    .logo-track {
        gap: 30px;
    }
}