/* Responsive Styles - Noon Lab Style */

/* ============================================
   포트폴리오 자료 기반 반응형 스타일 추가
   - Working Mock-Up 섹션
   - 인증 배지 레이아웃
   - 서비스 카드 그리드
   ============================================ */

/* Desktop Medium - 1024px */
@media (max-width: 1024px) {
    /* 5개 주요 분야 중간 화면 스타일 - 3+2 레이아웃 */
    .main-services {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-services .service-card:nth-child(4) {
        grid-column: 1 / span 1;
    }
    
    .main-services .service-card:nth-child(5) {
        grid-column: 2 / span 1;
    }
}

/* Tablet - 768px */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    /* Navigation */
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin-left: 0;
    }
    
    .nav-link {
        padding: 15px 0;
        font-size: 16px;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f8f8;
        margin-top: 10px;
        border-radius: 8px;
    }
    
    .dropdown a {
        padding: 10px 15px;
    }
    
    /* Hero Section */
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(45, 45, 45, 0.75) 100%);
    }
    
    .tab-buttons {
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .tab-btn {
        font-size: 12px;
        padding: 12px 0;
    }
    
    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Stats Section - 태블릿 */
    .stats-section {
        min-height: 80vh;
    }
    
    .stats-title {
        font-size: 14px;
        letter-spacing: 2px;
    }
    
    .stats-subtitle {
        font-size: 32px;
        margin-bottom: 60px;
    }
    
    .stats-grid {
        gap: 15px;
    }
    
    .stat-item {
        min-width: 170px;
        max-width: 200px;
        padding: 30px 20px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    /* About Section */
    .about-section {
        padding: 80px 0;
    }
    
    .section-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .text-content {
        padding-right: 0;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Contact Section */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-contact {
        align-items: center;
    }
    
    .contact-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    /* 포트폴리오 추가 스타일 */
    .portfolio-item.featured {
        grid-column: span 1;
    }
    
    .cert-badges {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .service-category {
        margin-bottom: 40px;
    }
    
    /* 태블릿에서는 이미 1024px 미디어 쿼리의 3+2 레이아웃이 적용됨 */
    
    /* Horizontal Scroll Portfolio - Tablet */
    .portfolio-scroll .portfolio-item {
        width: 250px;
    }
    
    .portfolio-scroll .portfolio-image {
        height: 320px;
    }
    
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .scroll-prev {
        left: -20px;
    }
    
    .scroll-next {
        right: -20px;
    }
    
    /* Process 태블릿 레이아웃 - 2열로 변경 */
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        row-gap: 30px;
    }
    
    .process-step[data-step="5"],
    .process-step[data-step="6"],
    .process-step[data-step="7"] {
        grid-column: auto;
    }
    
    /* 화살표 위치 조정 */
    .process-step[data-step="1"]::after,
    .process-step[data-step="3"]::after,
    .process-step[data-step="5"]::after {
        right: -22px;
        font-size: 18px;
    }
    
    .process-step[data-step="2"]::after,
    .process-step[data-step="4"]::after,
    .process-step[data-step="6"]::after {
        display: none;
    }
}

/* Mobile - 480px */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Hero Section */
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 13px;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(45, 45, 45, 0.8) 100%);
    }
    
    .tab-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 10px;
    }
    
    .tab-btn {
        white-space: nowrap;
        min-width: auto;
        padding: 10px 15px;
    }
    
    /* Stats Section - 모바일 */
    .stats-section {
        min-height: 100vh;
    }
    
    .stats-content {
        padding: 60px 0;
    }
    
    .stats-title {
        font-size: 12px;
        letter-spacing: 2px;
        margin-bottom: 30px;
    }
    
    .stats-subtitle {
        font-size: 24px;
        margin-bottom: 40px;
        padding: 0 20px;
    }
    
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 15px;
    }
    
    .stat-item {
        min-width: auto;
        max-width: none;
        padding: 25px 15px;
    }
    
    .stat-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 15px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 24px;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    /* Contact Form */
    .contact-form input,
    .contact-form textarea {
        padding: 12px;
        font-size: 13px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 15px;
    }
    
    /* 포트폴리오 모바일 추가 스타일 */
    .portfolio-specs {
        font-size: 11px;
    }
    
    .category-tag {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .cert-badge {
        padding: 15px;
    }
    
    .cert-icon {
        font-size: 32px;
    }
    
    .service-features {
        font-size: 11px;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    /* 5개 주요 분야 모바일 스타일 - 2+2+1 레이아웃 */
    .main-services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-services .service-card:nth-child(5) {
        grid-column: 1 / span 2;  /* 마지막 카드를 전체 너비로 */
    }
    
    .service-card.featured {
        transform: scale(1);
    }
    
    .process-flow {
        padding: 30px 20px;
    }
    
    /* Process 모바일 레이아웃 - 1열로 변경 */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .process-step[data-step="5"],
    .process-step[data-step="6"],
    .process-step[data-step="7"] {
        grid-column: auto;
    }
    
    /* 모바일에서는 모든 화살표 숨김 */
    .process-step::after {
        display: none !important;
    }
    
    .process-step {
        min-width: 100%;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    /* Horizontal Scroll Portfolio - Mobile */
    .portfolio-scroll .portfolio-item {
        width: 200px;
    }
    
    .portfolio-scroll .portfolio-image {
        height: 260px;
    }
    
    .portfolio-scroll .category-label {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .scroll-prev {
        left: 5px;
    }
    
    .scroll-next {
        right: 5px;
    }
    
    .portfolio-scroll {
        gap: 15px;
        padding: 15px 0;
    }
    
    /* Spacing Adjustments */
    .hero-section,
    .stats-section,
    .about-section,
    .services-section,
    .contact-section {
        padding: 40px 0;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
}

/* Large Desktop - 1440px+ */
@media (min-width: 1440px) {
    :root {
        --container-max: 1320px;
    }
}

/* Mobile Menu Animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Smooth scroll on mobile */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero-buttons,
    .footer-social,
    .mobile-menu-btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .hero,
    .about,
    .services,
    .portfolio,
    .contact {
        page-break-inside: avoid;
        padding: 20px 0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}