/* Global Styles & Variables */
:root {
    --primary-color: #0056b3;
    /* Deep Blue from original site */
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #F4F4F4;
    --white: #ffffff;
    --border-color: #dddddd;
    --container-width: 1100px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-break: keep-all;
    /* Korean text wrap fix */
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
    /* Prevent content hiding behind fixed header */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    display: block;
}

/* Intro Section */
.about-preview {
    padding: 30px 0 10px 0;
    margin-bottom: 12px !important;
}

.intro-text-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-line {
    margin-bottom: 20px;
    font-size: 21px;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 400;
    text-align: center;
}

.text-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 0;
    font-size: 60px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slider-btn:hover {
    background-color: white;
    color: var(--primary-color);
    height: 60px;
    width: 50px;
    text-shadow: none;
    transform: translateY(-50%) scale(0.8);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 5;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-content h2 {
    font-size: 70px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.4;
    margin-top: 0;
    padding-top: 0;
}

.hero-content h2 .first-line {
    display: block;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 0;
    padding-top: 0;
}

.hero-content h2 strong {
    font-size: 70px;
    font-weight: 700;
    margin-top: 0;
    padding-top: 0;
}

.hero-content p {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 30px;
}

/* Buttons */
.btn-more,
.btn-submit {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
}

.btn-more:hover,
.btn-submit:hover {
    background-color: #003078;
}

.btn-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-image {
    max-height: 41.4px;
    /* 90% of previous 46px */
    width: auto;
}

.logo-text {
    display: none;
}

.main-nav ul {
    display: flex;
    gap: 0;
}

.main-nav a {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    height: var(--header-height);
    padding: 0 20px;
    position: relative;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--white);
    background-color: var(--primary-color);
}

.main-nav a.active::after {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    display: block;
}

/* Section */
.section {
    padding: 50px 0;
}

/* About Page Section */
.about-section {
    padding: 50px 0;
}

.about-section .text-block p.desktop-only {
    text-align: center !important;
}

/* About Preview Section (Index) */
.about-preview {
    padding: 30px 0 10px 0;
    margin-bottom: 12px !important;
}

/* Machine Page Section Padding */
.machine-section {
padding: 0 0 10px 0;
}

/* Jig Page Section Padding */
.jig-section {
padding: 0;
}

/* Mobile Only Text */
.mobile-only {
display: none;
}

/* Desktop Only Text */
.desktop-only {
    display: block;
}

/* Page Title Header */
.page-title-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 0;
}

/* Section Header */
.section-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.about-section .section-header h3 {
    font-size: 24px;
}

/* Section Header p */
.section-header p {
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Gallery Slider Container */
.gallery-slider-container {
    position: relative;
    width: 70%;
    margin: 0 auto;
    overflow: hidden;
    padding: 0;
}

/* Gallery Track */
.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

/* Gallery Item */
.gallery-item {
    flex: 0 0 calc(100% / 6);
    max-width: calc(100% / 6);
    box-sizing: border-box;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: block;
    margin: 0 auto;
}

.gallery-label {
    display: block;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    text-align: center;
}

.gallery-item:hover img {
    transform: none;
}

/* Gallery Section */
.gallery-section {
    padding: 20px 0 40px 0;
    background-color: #f0f0f0;
}

.gallery-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #004098;
    margin: 0 0 30px 0;
}

/* Gallery Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background-color: transparent;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 0;
    font-size: 31px;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.gallery-nav-btn:hover {
    background-color: white;
    color: var(--primary-color);
    height: 60px;
    width: 40px;
    text-shadow: none;
}

.gallery-prev {
    left: 1%;
}

.gallery-next {
    right: 1%;
}

/* Contact Section (Preview) */
.contact-preview {
    background-color: var(--white);
}

/* Contact Section */
.contact-section {
    padding: 50px 0;
}

.contact-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.contact-form-wrapper {
    flex: 1;
    max-width: 60%;
}

.contact-info {
    flex: 1;
    max-width: 40%;
    background-color: #f0f0f0;
    padding: 30px;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    box-shadow: none;
    height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

    .contact-info .info-item p {
        line-height: 1.8;
        text-align: left;
    }

    /* Desktop specific - keep centered vertically */
    @media (min-width: 769px) {
        .contact-info {
            text-align: center !important;
        }

        .contact-info .info-item p {
            text-align: left !important;
        }

        /* Override section-header margin on desktop */
        .contact-info .section-header {
            margin-bottom: 5px !important;
        }

        /* Hide mobile separator on desktop, show desktop separator */
        .separator-desktop {
            display: block !important;
        }

        .separator-mobile {
            display: none !important;
        }

        /* Show desktop version, hide mobile text */
        .form-group-horizontal .checkbox-desktop {
            display: flex !important;
            gap: 6px !important;
        }

        .form-group-horizontal .checkbox-desktop span {
            display: inline !important;
        }

        .form-group-horizontal .privacy-text-mobile {
            display: none !important;
        }
    }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group-horizontal {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label,
.form-group-horizontal label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 16px;
}

.form-group-horizontal label {
    min-width: 80px;
    text-align: left;
}

.form-group input,
.form-group textarea,
.form-group-horizontal input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group-horizontal input {
    flex: 1;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 250px;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.btn-submit:hover {
    background-color: #003078;
}

.info-item {
    margin-bottom: 20px;
}

.info-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.info-item p {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.6;
}

/* Footer (Updated Layout) */
.site-footer {
    background-color: #444444;
    /* Footer background darker gray */
    color: #ffffff;
    padding: 30px 0;
    font-size: 13px;
    /* Reference site font size */
    line-height: 1.6;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    text-align: left;
}

.footer-info p {
    margin-bottom: 5px;
}

.footer-intro-line {
    margin-bottom: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
}

.blog-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 500;
}

.blog-icon-img {
    height: 36px;
    width: auto;
    background-color: #ffffff;
    /* Make transparent text white */
    border-radius: 4px;
    /* Soften edges */
}

.blog-text {
    font-size: 20px;
    color: #ffffff;
}

.copyright {
    margin-top: 15px;
    color: #cccccc;
    font-size: 12px;
}

/* Core Business Section - Desktop Visible, Mobile Hidden */
.core-business-section {
    display: block;
    padding: 20px 0 60px 0;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
}

.core-business-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #004098;
    margin-bottom: 40px;
}

.core-business-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.business-card {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    min-height: 110px;
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.business-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.business-icon svg {
    width: 40px;
    height: 40px;
}

.business-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.business-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Floating Buttons Stack - Desktop Visible */
.floating-buttons-stack {
    display: none;
}

/* Mobile: Show floating buttons */
@media (max-width: 768px) {
    /* Show core business section on mobile */
    .core-business-section {
        display: block !important;
        padding: 40px 20px;
        background-color: #f8f9fa;
    }
    
    .core-business-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .core-business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .business-card {
        padding: 25px 15px;
        min-height: auto;
    }
    
    .business-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    
    .business-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .business-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .business-desc {
        font-size: 13px;
    }
    
    .floating-buttons-stack {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        bottom: 80px !important;
        right: 20px !important;
        z-index: 1000 !important;
        gap: 3px !important;
    }
    
    .floating-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .phone-btn {
        background-color: #279B3F;
        color: white;
        border: none;
        order: 2;
    }
    
    .phone-btn:hover {
        background-color: #1f7a32;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }
    
    .mobile-kakaotalk-btn {
        background-color: #FEE500;
        color: #3B1E1E;
        border: none;
        order: 1;
    }
    
    .mobile-kakaotalk-btn:hover {
        background-color: #E5D100;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
    }
    
    /* Hide desktop buttons on mobile */
    .mail-btn, .kakaotalk-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide mobile-only buttons on desktop */
    .mobile-kakaotalk-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Desktop: Show floating buttons */
@media (min-width: 769px) {
    /* Adjust core business section padding on desktop */
    .core-business-section {
        padding: 30px 0 60px 0;
    }
    
    /* Show desktop business title */
    .core-business-title {
        display: block;
        font-size: 28px;
        font-weight: 700;
        color: #004098;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .floating-buttons-stack {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 145px;
        right: 30px;
        z-index: 1000;
        gap: 10px;
    }
    
    .floating-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Hide phone button immediately on desktop */
    .phone-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide mobile-only buttons on desktop */
    .mobile-kakaotalk-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .mail-btn {
        background-color: #999;
        color: white;
        border: none;
        order: 1;
    }
    
    .qr-icon-container svg {
        width: 36px;
        height: 36px;
    }

    .mail-btn:hover {
        background-color: #134a94;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }
    
    .btn-icon {
        width: 24px;
        height: 24px;
        line-height: 1;
    }
    
    /* QR Button - Desktop Only */
    .qr-btn {
        background-color: #FFD700 !important;
        color: #333 !important;
        order: 3;
        cursor: pointer;
    }
    
    .qr-btn:hover {
        background-color: #FFC700 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    }
    
    /* Kakao Talk Button - Desktop Only */
    .kakaotalk-btn {
        background-color: #FEE500 !important;
        color: #3B1E1E !important;
        border: none !important;
        order: 3;
        cursor: pointer;
    }
    
    .kakaotalk-btn:hover {
        background-color: #E5D100 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
    }
    
    /* Desktop Only Class */
    .desktop-only {
        display: block;
    }
    
    /* QR Modal Styles */
    .qr-modal {
        display: none;
        position: fixed;
        z-index: 2000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        animation: fadeIn 0.3s ease;
    }
    
    .qr-modal-content {
        background-color: white;
        margin: 10% auto;
        padding: 30px;
        border-radius: 10px;
        width: 90%;
        max-width: 400px;
        position: relative;
        animation: slideIn 0.3s ease;
    }
    
    .qr-modal-close {
        position: absolute;
        right: 20px;
        top: 15px;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        color: #666;
    }
    
    .qr-modal-close:hover {
        color: #000;
    }
    
    .qr-modal h3 {
        text-align: center;
        margin-bottom: 20px;
        color: #333;
    }
    
    .qr-code-container {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .qr-placeholder {
        display: inline-block;
        border: 2px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: white;
    }
    
    .qr-contact-info {
        text-align: center;
        font-size: 14px;
        color: #666;
    }
    
    .qr-contact-info p {
        margin: 5px 0;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideIn {
        from {
            transform: translateY(-50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* Responsive */
@media (max-width: 992px) {
    .gallery-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .gallery-slider-container {
        width: 65%;
    }
}

@media (max-width: 768px) {
    /* Page Title Header - Mobile Only */
    .page-title-header h2 {
        font-size: 24px !important;
    }
    
    /* Mobile/Desktop Text Visibility - Mobile Only */
    .mobile-only {
        display: block;
        margin-bottom: 10px;
    }
    
    .mobile-only {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    .desktop-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide desktop Kakao Talk button on mobile */
    .kakaotalk-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide desktop-only br tags on mobile */
    .desktop-only + br {
        display: none;
    }
    
    /* Hide br tag after greeting on mobile */
    .text-block > p:first-child + br {
        display: none;
    }
    
    /* Section Headers */
    .about-section .section-header h3 {
        font-size: 20px;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px;
        margin: 0;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 15px 20px;
        text-align: left;
        height: auto;
        border-radius: 0;
    }
    
    /* Only apply active style to explicitly marked items */
    .main-nav a.active {
        background-color: var(--primary-color);
        color: white;
    }
    
    /* Prevent hover effect on active items */
    .main-nav a.active:hover {
        background-color: var(--primary-color);
        color: white;
    }
    
    /* Remove hover effects completely on mobile */
    .main-nav a:hover {
        background-color: inherit;
        color: inherit;
    }

    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        left: 0px;
        top: 20px;
        z-index: 1001;
    }

    .gallery-item {
        flex: 0 0 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .gallery-slider-container {
        width: 65%;
        margin-top: 17px;
    }

    .contact-content {
        flex-direction: column;
        gap: 20px;
    }

    .contact-info {
        width: 100%;
        max-width: 100%;
        text-align: center !important;
        padding: 15px 20px 25px 20px;
        margin: 0 auto;
        background-color: #f8f9fa;
        border: 1px solid #e0e0e0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Force center alignment for mobile - target all text elements */
    .contact-info .section-header {
        text-align: center !important;
    }

    .contact-info .info-item {
        text-align: center !important;
    }

    .contact-info .info-item p {
        text-align: center !important;
    }

    .contact-info .info-item p[style*="margin-top: 0"] {
        text-align: center !important;
    }

    /* Hide desktop separator on mobile, show mobile separator */
    .separator-desktop {
        display: none !important;
    }

    .separator-mobile {
        display: block !important;
    }

    .contact-info .info-item:first-child {
        margin-top: 0 !important;
    }

    .contact-info .info-item:first-child p {
        margin-top: -30px !important;
    }

    /* Override the section-header margin on mobile for contact page */
    .contact-section .contact-info .section-header {
        margin-bottom: 0px !important;
    }

    /* Target the specific text element more precisely */
    .contact-section .contact-info .info-item:first-child p[style*="margin-top: 0;"] {
        margin-top: -20px !important;
    }

    /* Reduce margin after contact info section on mobile */
    .contact-info .info-item:last-child {
        margin-bottom: 0px !important;
    }

    /* Reduce margin after separator line on mobile */
    .contact-info .info-item:nth-child(5) {
        margin-bottom: 0px !important;
    }

    /* Reduce spacing around separator line and br tags on mobile */
    .contact-info .info-item:nth-child(4) {
        margin-bottom: 0px !important;
        margin-top: 0px !important;
    }

    .contact-info .info-item:nth-child(6) {
        margin-bottom: 0px !important;
        margin-top: 0px !important;
    }

    .contact-info .info-item:nth-child(4) p,
    .contact-info .info-item:nth-child(6) p {
        line-height: 0.3 !important;
        font-size: 1px !important;
    }

    /* Make separator line spacing consistent */
    .contact-info .info-item:nth-child(5) {
        margin-bottom: 5px !important;
        margin-top: 5px !important;
    }

    .contact-info .info-item:nth-child(7) {
        margin-top: 5px !important;
    }

    .contact-form-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content h2 .first-line {
        font-size: 24px;
        white-space: nowrap;
        display: none !important;
    }

    .hero-content h2 strong {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 14px;
        display: none;
    }

    .hero-section {
        display: none;
    }

    .slider-btn {
        transform: translateY(-50%) scale(0.7);
        font-size: 42px;
    }

    .slider-btn:hover {
        transform: translateY(-50%) scale(0.7);
    }

    .footer-content {
        flex-direction: column;
        gap: 0px;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .header-container {
        justify-content: center;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-menu-toggle {
        position: absolute;
        left: 20px;
    }

    .blog-btn {
        display: none;
    }

    .site-footer {
        padding: 15px 0;
    }

    .copyright {
        margin-top: 0px;
    }

    .floating-contact {
        display: none;
    }

    /* Mobile form styling */
    .form-group-horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    /* Exception for checkbox group - keep inline on mobile */
    .form-group-horizontal:has(input[type="checkbox"]) {
        flex-direction: row !important;
        align-items: center !important;
        gap: 2px !important;
        justify-content: center !important;
    }

        .form-group-horizontal input[type="checkbox"] {
            flex-shrink: 0 !important;
        }

        /* Center submit button on mobile */
        .btn-submit {
            align-self: center !important;
        }

        .form-group-horizontal label {
            min-width: auto;
            text-align: left;
        }

        /* Show mobile text inline with checkbox, hide desktop text */
        .form-group-horizontal .checkbox-desktop {
            display: flex !important;
            gap: 2px !important;
        }

        .form-group-horizontal .checkbox-desktop span {
            display: none !important;
        }

        .form-group-horizontal .privacy-text-mobile {
            display: inline-flex !important;
            margin-left: 2px !important;
            align-items: center !important;
        }

    /* Reduce gap between checkbox and text on mobile */
    .form-group-horizontal label input[type="checkbox"] {
        margin-right: 2px !important;
    }

    .form-group-horizontal label span {
        margin-left: 0 !important;
        margin-right: 2px !important;
    }

    .form-group input,
    .form-group textarea,
    .form-group-horizontal input {
        padding: 14px 16px;
        font-size: 16px;
    }

    /* Floating Buttons Stack - Mobile Only */
    .floating-buttons-stack {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 80px;
        right: 20px;
        z-index: 1000;
        gap: 10px;
    }

    .floating-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .mail-btn {
        background-color: #999;
        color: white;
        border: none;
        order: 1;
    }

    .mail-btn:hover {
        background-color: #134a94;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .phone-btn {
        background-color: #279B3F;
        color: white;
        order: 2;
    }

    .phone-btn:hover {
        background-color: #1f7a32;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .btn-icon {
        width: 28px;
        height: 28px;
        line-height: 1;
    }

    /* Core Business Section - Mobile Only */
    .core-business-section {
        display: block;
        padding: 20px 0;
        background-color: #f0f0f0;
        border-top: 1px solid #e0e0e0;
    }

    .core-business-title {
        display: none;
    }

    .core-business-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        max-width: 500px;
        margin: 0 auto;
    }

    .business-card {
        background-color: white;
        border-radius: 12px;
        padding: 20px 15px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .business-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }

    .business-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .business-title {
        font-size: 15px;
        font-weight: 600;
        color: #333;
        margin-bottom: 6px;
    }

    .business-desc {
        font-size: 12px;
        color: #666;
        line-height: 1.3;
        margin: 0;
    }

    .intro-line:first-child {
        font-size: 0;
        line-height: 0;
        margin-bottom: 10px;
    }

    .intro-line:first-child::before {
        content: "특수기계 · 지그 제작 전문";
        font-size: 21px;
        line-height: 1.6;
        display: block;
        font-weight: 700;
        color: var(--primary-color);
    }

    .intro-line:first-child::after {
        content: "맞춤 자동화 설비 설계·제작 업체";
        font-size: 21px;
        line-height: 1.6;
        display: block;
        font-weight: 700;
        color: var(--primary-color);
    }

    .intro-line:nth-child(2),
    .intro-line:nth-child(3) {
        display: none;
    }
}

/* New Gallery Styles for Machine Page */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-grid .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    flex: none;
    max-width: none;
    padding: 0;
}

.gallery-grid .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 8px;
    aspect-ratio: auto;
}

.gallery-grid .gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 15px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-grid .gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* New Gallery Styles for Machine Page - 5 columns, no rounding */
.gallery-grid-5cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.gallery-item-5cols {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
}

.gallery-item-5cols:hover {
    transform: translateY(-3px);
}

.gallery-item-5cols img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border: 1px solid #ddd;
    transition: transform 0.3s ease;
}

.gallery-item-5cols:hover img {
    transform: scale(1.02);
}

.hidden-gallery-item {
    display: none;
}

.gallery-caption {
    margin-top: 8px;
    font-size: 12px;
    color: #333;
    padding: 4px;
    min-height: 20px;
    line-height: 1.3;
}

.gallery-caption:hover {
    outline: 2px solid #0056b3;
    outline-offset: -2px;
}

.gallery-caption:focus {
    outline: 2px solid #0056b3;
    outline-offset: -2px;
}

/* Responsive for 5-column gallery */
@media (max-width: 1200px) {
    .gallery-grid-5cols {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-grid-5cols {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .gallery-item-5cols img {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .gallery-grid-5cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gallery-item-5cols img {
        height: 140px;
    }
    
    .gallery-caption {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .gallery-grid-5cols {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .gallery-item-5cols img {
        height: 200px;
    }
    
    .gallery-caption {
        font-size: 12px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ccc;
}

/* Header Underline for Machine Page */
.header-underline {
    width: 100vw;
    height: 1px;
    background-color: #999999;
    margin: 0 calc(-50vw + 50%) 0;
}

/* Machine Page Header Text Styling */
.machine-section .section-header h3 {
    font-size: 19.2px !important;
    color: #000000 !important;
    font-weight: 400 !important;
    text-shadow: none !important;
    padding: 20px 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

.jig-section .section-header h3 {
    font-size: 19.2px !important;
    color: #000000 !important;
    font-weight: 400 !important;
    text-shadow: none !important;
    padding: 20px 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-grid .gallery-item img {
        height: 200px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gallery-grid .gallery-item img {
        height: 180px;
    }
}

/* Honeypot field for spam protection */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
}

/* Load More Button Container - Simple Center */
.load-more-container {
    text-align: center;
    width: 100%;
}

.load-more-container button {
    /* No special styles needed - center alignment handled by parent */
}

/* Floating Contact Button */
.floating-contact {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 100px;
    height: 60px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    pointer-events: auto;
}

/* Prevent floating contact from inheriting nav styles */
.floating-contact:hover,
.floating-contact.active {
    background-color: var(--primary-color);
    color: white;
}

.floating-contact:hover {
    background-color: #003078;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

.floating-contact::before {
    content: "문의하기";
    font-size: 18px;
    display: block;
}

.floating-contact::after {
    content: "";
}

/* Responsive for floating button */
@media (max-width: 768px) {
    .floating-contact {
        bottom: 90px;
        right: 20px;
        width: 50px;
        height: 40px;
        font-size: 14px;
    }
    
    .floating-contact::before {
        content: "문의" !important;
        font-size: 14px;
    }

    /* Hide Load More Button on Mobile */
    .load-more-container {
        display: none !important;
    }

    /* Show all gallery items on mobile */
    .gallery-grid-5cols .gallery-item-5cols {
        display: block !important;
    }
}

/* Desktop specific */
@media (min-width: 769px) {
    .load-more-container {
        text-align: center;
    }
}