/* Kubernetes Mobile Styles */

/* 모바일 전용 요소 기본 숨김 */
.mobile-only {
    display: none;
}

/* 모바일에서만 표시 */
@media (max-width: 768px) {
    .mobile-only {
        display: inline;
    }
    
    br.mobile-only {
        display: block;
    }
}

/* Hero Section Mobile */
@media (max-width: 768px) {
    .product-hero {
        min-height: 500px;
        height: auto;
        padding: 80px 0 60px;
    }

    .product-hero-content {
        padding: 0 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 8px 16px;
        margin-bottom: 1.5rem;
        letter-spacing: 0.08em;
        white-space: normal;
        line-height: 1.4;
        display: inline-block;
        overflow: hidden;
        position: relative;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        padding: 0 10px;
    }

    .hero-subtitle br {
        display: none;
    }

    /* 버튼 스타일 */
    .hero-cta {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0 10px;
    }

    .hero-btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .hero-btn-primary {
        background: linear-gradient(135deg, #326ce5 0%, #2857c2 100%) !important;
        color: white !important;
        border: none !important;
        box-shadow: 0 5px 15px rgba(50, 108, 229, 0.3) !important;
    }
    
    .hero-btn-primary::before {
        display: none !important;
    }
    
    .hero-btn-primary:hover {
        background: linear-gradient(135deg, #2857c2 0%, #1e4098 100%) !important;
        transform: none !important;
        box-shadow: 0 5px 15px rgba(50, 108, 229, 0.3) !important;
    }
    
    .hero-btn-primary:active {
        background: linear-gradient(135deg, #1e4098 0%, #16337a 100%) !important;
    }
    
    .hero-btn-secondary {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
        padding: calc(1rem - 2px) calc(2rem - 2px) !important;
    }
    
    .hero-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.6) !important;
        transform: none !important;
    }
}

/* Section Headers Mobile */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 30px;
    }

    .section-badge {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
        padding: 5px 10px;
        background: rgba(50, 108, 229, 0.1);
        border-radius: 20px;
        display: inline-block;
        white-space: normal;
        line-height: 1.3;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        word-break: keep-all;
        line-height: 1.3;
    }

    .section-desc {
        font-size: 0.875rem;
        line-height: 1.6;
        word-break: keep-all;
        margin-bottom: 0;
    }

    .section-desc br {
        display: none;
    }
}

/* Overview Section Mobile */
@media (max-width: 768px) {
    .overview-section {
        padding: 60px 0;
    }

    .overview-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 5px;
    }

    .overview-text {
        text-align: center;
    }

    .overview-text h3 {
        font-size: 1.25rem;
        margin-bottom: 15px;
        text-align: center;
    }

    .overview-text p {
        font-size: 0.875rem;
        line-height: 1.6;
        margin-bottom: 20px;
        text-align: center;
        padding: 0 10px;
        word-break: keep-all;
    }

    .overview-text p:first-of-type {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .overview-features {
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .overview-features li {
        display: flex;
        padding: 15px;
        margin-bottom: 15px;
        gap: 12px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        background: #f8f9fa;
        border-radius: 12px;
        border: 1px solid #e9ecef;
        cursor: default;
    }

    .overview-features li > div {
        text-align: center;
        width: 100%;
    }

    .overview-features li div:last-child {
        font-size: 0.8rem;
        line-height: 1.5;
        word-break: keep-all;
        text-align: center;
        width: 100%;
    }

    .overview-features li div:last-child strong {
        display: block;
        margin-bottom: 5px;
        text-align: center;
    }

    .overview-features li div:last-child br {
        display: block;
    }

    .feature-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        font-size: 1.2rem;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #326ce5, #5e9cff);
        border-radius: 50%;
        color: white;
        font-weight: bold;
        flex-shrink: 0;
        flex-grow: 0;
        aspect-ratio: 1/1;
    }

    .overview-visual {
        padding: 30px 20px;
        text-align: center;
    }

    .kubernetes-logo {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .kubernetes-logo img {
        width: 180px !important;
        margin-bottom: 0;
        display: block;
        margin: 0 auto;
    }

    .badge-info {
        font-size: 0.8rem;
        padding: 8px 16px;
        white-space: normal;
        display: inline-block;
        text-align: center;
    }
}

/* Features Section Mobile */
@media (max-width: 768px) {
    .features-section {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
        overflow: visible !important;
        display: grid !important;
        -webkit-overflow-scrolling: auto !important;
        scroll-snap-type: none !important;
    }

    .feature-card {
        padding: 30px 20px;
        overflow: hidden;
        max-height: none;
        text-align: center;
        transform: none !important;
        scroll-snap-align: none !important;
    }

    .feature-card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin: 0 auto 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .feature-card h3 {
        font-size: 1rem;
        margin-bottom: 10px;
        text-align: center;
    }

    .feature-card p {
        font-size: 0.875rem;
        line-height: 1.5;
        overflow: visible;
        text-overflow: unset;
        display: block;
        white-space: normal;
        text-align: center;
    }
}

/* Architecture Section Mobile */
@media (max-width: 768px) {
    .architecture-section {
        padding: 60px 0;
    }

    .architecture-visual {
        padding: 20px;
        margin-top: 40px;
    }

    .architecture-diagram {
        gap: 20px;
    }

    .arch-layer {
        padding: 20px;
    }

    .arch-layer h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .arch-layer p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .arch-arrow {
        margin: -10px auto;
        border-top-width: 20px;
        border-left-width: 15px;
        border-right-width: 15px;
    }
}

/* Benefits Section Mobile */
@media (max-width: 768px) {
    .benefits-section {
        padding: 60px 0;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 40px;
    }

    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .benefit-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .benefit-content h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
        text-align: center;
    }

    .benefit-content p {
        font-size: 0.875rem;
        line-height: 1.5;
        text-align: center;
    }
}

/* Use Cases Section Mobile */
@media (max-width: 768px) {
    .usecases-section {
        padding: 60px 0;
    }

    .usecases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .usecase-card {
        padding: 20px;
    }

    .usecase-card h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .usecase-card p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* CTA Section Mobile */
@media (max-width: 768px) {
    .product-cta {
        padding: 60px 0;
    }

    .cta-content {
        padding: 0 1rem;
    }

    .cta-title {
        font-size: 1.25rem;
        margin-bottom: 15px;
        line-height: 1.4;
        word-break: keep-all;
    }

    .cta-title br {
        display: none;
    }

    .cta-desc {
        font-size: 0.875rem;
        margin-bottom: 30px;
        line-height: 1.5;
    }

    .cta-desc br {
        display: none;
    }

    .cta-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0 10px;
    }

    .cta-btn {
        width: 100% !important;
        max-width: 300px !important;
        padding: 15px 40px !important;
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .cta-btn-primary {
        background: linear-gradient(135deg, #326ce5, #2857c2) !important;
        color: white !important;
        box-shadow: 0 5px 15px rgba(50, 108, 229, 0.3) !important;
        border: none !important;
    }
    
    .cta-btn-primary:hover {
        background: linear-gradient(135deg, #2857c2, #1e4098) !important;
        transform: none !important;
    }
    
    .cta-btn-primary:active {
        background: linear-gradient(135deg, #1e4098, #16337a) !important;
    }

    .cta-btn-secondary {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        color: white !important;
        padding: calc(15px - 2px) calc(40px - 2px) !important;
    }
    
    .cta-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.7) !important;
        transform: none !important;
    }
}

/* 390px 이하 추가 최적화 */
@media (max-width: 390px) {
    .container,
    .section-container {
        padding: 0 15px;
    }

    .product-hero-content {
        padding: 0 0.75rem;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 5px 12px;
        letter-spacing: 0.03em;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .hero-btn {
        font-size: 0.9rem !important;
        padding: 0.875rem 1.5rem !important;
    }

    /* 버튼 세로 배치 */
    .hero-cta,
    .cta-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-desc {
        font-size: 0.8rem;
    }

    .overview-text h3 {
        font-size: 1.125rem;
    }

    .feature-card h3 {
        font-size: 0.9rem;
    }

    .cta-title {
        font-size: 1.125rem;
    }

    .cta-desc {
        font-size: 0.8rem;
    }

    .cta-btn {
        font-size: 0.875rem !important;
        padding: 12px 30px !important;
    }
}

/* 텍스트 줄바꿈 최적화 */
@media (max-width: 768px) {
    body {
        word-break: keep-all;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    p, li, span, h1, h2, h3, h4, h5, h6 {
        word-break: keep-all;
        line-break: strict;
    }

    .badge-info {
        white-space: normal;
        word-break: keep-all;
    }
}

/* 버튼 호버 효과 모바일에서 제거 */
@media (max-width: 768px) {
    .hero-btn:hover,
    .cta-btn:hover {
        transform: none;
    }

    .feature-card:hover,
    .usecase-card:hover,
    .arch-layer:hover,
    .benefit-item:hover {
        transform: none;
    }

    .overview-features li:hover {
        transform: none;
        background: #f8f9fa;
    }

    /* 아이콘 원형 유지를 위한 추가 스타일 */
    .overview-features li .feature-icon {
        position: relative;
        display: inline-flex !important;
        width: 40px !important;
        height: 40px !important;
    }
}

/* 모바일 터치 친화적 요소 */
@media (max-width: 768px) {
    .hero-btn,
    .cta-btn {
        min-height: 44px;
    }

    a {
        display: inline-block;
        min-height: 40px;
        line-height: normal;
    }

    .feature-card,
    .usecase-card,
    .arch-layer {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}

/* 가로 스크롤 방지 */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    main {
        overflow-x: hidden;
    }

    .section-container {
        overflow-x: hidden;
    }
}

/* Desktop only elements 숨김 처리 추가 */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* 특정 섹션 애니메이션 유지 */
@media (max-width: 768px) {
    /* 화살표 애니메이션은 모바일에서도 유지 */
    @keyframes arrowMove {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }

    .hero-btn-primary svg {
        animation: arrowMove 1.5s ease-in-out infinite;
    }

    .cta-btn-primary svg {
        animation: arrowMove 1.5s ease-in-out infinite;
    }
}
