/* Mobile-specific overrides */
@media (max-width: 768px) {
    /* Navigation fixes */
    .site-nav {
        height: 60px !important;
    }
    
    .nav-inner {
        padding: 0 16px !important;
        position: relative !important;
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .nav-brand {
        display: flex;
        align-items: center;
        z-index: 1000;
    }

    .nav-brand a {
        font-size: 20px;
        position: relative;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-brand a img {
        height: 40px;
        width: auto;
        margin: 0;
    }

    /* 햄버거 메뉴 아이콘 */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        cursor: pointer;
        z-index: 1000;
    }

    .hamburger-menu span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #000;
        position: absolute;
        transition: all 0.3s ease;
    }

    .hamburger-menu span:nth-child(1) { top: 4px; }
    .hamburger-menu span:nth-child(2) { top: 11px; }
    .hamburger-menu span:nth-child(3) { top: 18px; }

    /* 햄버거 메뉴 활성화 상태 */
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 11px;
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: 11px;
    }
    
    /* 모바일 네비게이션 바 */
    .nav-links {
        position: fixed;
        top: 60px;
        right: -300px;
        width: auto;
        min-width: 200px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 0;
        flex-direction: column;
        transition: all 0.3s ease;
        z-index: 999;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        height: 250px;
        display: flex;
        gap: 0;
        margin: 0;
    }

    .nav-inner {
        position: relative;
        overflow: visible;
    }

    .nav-links.active {
        right: 20px;
    }
    
    /* 네비게이션 링크 스타일 제거 - common.css에서 처리 */
    
    .nav-links a:last-child {
        border-bottom: none;
    }

    /* 네비게이션 링크 호버/액티브 스타일 제거 - common.css에서 처리 */

    /* 오버레이 제거 - 깔끔한 메뉴만 표시 */
    .mobile-overlay {
        display: none !important;
    }
    
    /* Hero section fixes - 웹과 동일한 비율로 조정 */
    .hero-section {
        height: 60vh; /* 100vh에서 60vh로 줄여서 웹과 동일한 비율 */
        margin-top: 60px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .main-heading {
        font-size: 1.8rem; /* 2.5rem에서 1.8rem으로 줄임 */
        line-height: 1.2;
    }
    
    .sub-heading {
        font-size: 0.9rem; /* 1.1rem에서 0.9rem으로 줄임 */
    }
    
    /* Content section fixes - 여백 줄이기 */
    .content-section {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .text-gif-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
        min-height: auto;
    }
    
    /* 텍스트 중앙 정렬 및 여백 수정 */
    .text-content {
        width: 100%;
        max-width: none;
        padding: 0 1rem;
        margin: 0;
        align-items: flex-start;
        text-align: left;
        justify-content: flex-start;
    }
    
    /* 영상 잘림 문제 해결 - 그림자 제거 */
    .right-video {
        width: 100% !important;
        height: auto;
        margin: 1rem 0;
        border-radius: 8px;
        overflow: visible;
        box-shadow: none;
        position: relative;
    }
    
    .right-video video {
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
        border-radius: 8px;
    }
    
    /* 텍스트 크기 및 정렬 수정 - 웹 버전과 동일한 정렬 로직 */
    .text-line-1 {
        font-size: 3.2rem;
        padding-left: 1rem; /* 웹의 2rem에서 1rem으로 조정 */
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        line-height: 1.1;
        margin-left: 0;
    }
    
    .text-line-2 {
        font-size: 3.2rem;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        line-height: 1.1;
        padding-left: 0;
        margin-left: 0;
    }
    
    .text-line-3 {
        font-size: 3.2rem;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        line-height: 1.1;
        padding-left: 0;
        margin-left: 0;
    }
    
    .subtitle-text {
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
        font-style: normal;
        transform: none;
        margin-left: 0;
        margin-bottom: 1rem;
    }
    
    /* 회사 소개 섹션 왼쪽 정렬 */
    .company-intro {
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
    }
    
    .main-text {
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
        gap: 0.3rem;
    }
    
    /* 키워드 박스 왼쪽 정렬 - 웹 버전과 동일한 마진 적용 */
    .keyword-box {
        text-align: left;
        display: inline-block;
        margin: 0 0.5rem; /* 웹 버전과 동일하게 복원 */
        padding: 0.2rem 0.4rem;
        font-size: 3.2rem;
        line-height: 1.1;
        border-radius: 8px;
    }
    
    /* Advantages section fixes */
    .advantages-section {
        padding: 2rem 1rem;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .advantage-item {
        width: 100%;
        max-width: 384px;
        margin: 0 auto;
        gap: 0;
    }
    
    .advantage-card {
        margin-bottom: -0.5rem;
    }
    
    .advantage-card {
        margin-bottom: 1rem;
        border-radius: 16px;
        width: 100%;
        height: 100%;
        max-height: 480px;
    }
    
    .card-number {
        font-size: 2rem;
        bottom: -2rem;
        left: 0;
    }
    
    .card-number-text {
        font-size: 1.2rem;
        font-weight: 700;
        padding: 1rem 1rem;
        border-radius: 0;
        margin: 0 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 3rem;
        background: rgba(245, 245, 245, 0.95);
        width: calc(100% - 3rem);
    }
    
    /* 4번 카드 텍스트 박스 위치 조정 - 이제 중앙 정렬이므로 제거 */
    
    .card-content {
        padding: 1.2rem;
        opacity: 1;
        background: linear-gradient(
            180deg,
            rgba(17, 17, 17, 0.5) 0%,
            rgba(17, 17, 17, 0.7) 100%
        );
    }
    
    .content-wrapper {
        transform: translateY(0);
        padding: 1.25rem;
    }
    
    .card-content h3 {
        font-size: 1.4rem;
    }
    
    .card-content p {
        font-size: 0.85rem;
        max-width: 240px;
    }
    

    
    .section-header {
        margin-bottom: 3rem;
        margin-top: 2rem;
    }
    
    .section-header h2 {
        font-size: 4.5rem;
        white-space: nowrap;
    }
    
    .section-header h3 {
        font-size: 1.8rem;
        font-weight: 700;
        letter-spacing: -0.03em;
        white-space: nowrap;
        margin: 0.8rem 0 0 0;
    }
    
    .sub-list {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .sub-list li:first-child:after {
        display: none;
    }
    
    .mega-text .sub-title {
        font-size: 1.75rem;
        white-space: normal;
    }
    
    /* Philosophy section mobile fixes */
    .philosophy-text-overlay {
        right: 2rem;
        left: auto;
        max-width: 300px;
        align-items: flex-start;
        text-align: left;
    }
    
    .philosophy-text-overlay h2 {
        font-size: 2rem;
        color: #000000;
        text-shadow: none;
        text-align: left;
        margin-left: -1rem;
    }
    
    .philosophy-text-overlay h2 {
        font-size: 3.2rem;
        text-align: left;
        margin-left: -1rem;
    }
    
    .philosophy-text-overlay .keyword-box {
        opacity: 1;
        font-size: 3.2rem;
    }
}

/* Tablet specific fixes */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-heading {
        font-size: 3.5rem;
    }
    
    .text-line-1 {
        font-size: 4.5rem;
    }
    
    .text-line-2,
    .text-line-3 {
        font-size: 3.5rem;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
    }
    
    .advantage-card {
        aspect-ratio: 1024/1536;
    }
}
