/* ===== RESPONSIVE DESIGN - MOBILE FIRST APPROACH - UPDATED 20250905-24 ===== */

/* ===== PAGE HEADER BASE STYLES ===== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 0px; /* 헤더가 고정되지 않으므로 마진 제거 */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    height: 40vh;
}

.page-header .container {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-end !important;
    text-align: center !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem 2rem 3rem 2rem !important;
    height: 100% !important;
    width: 100% !important;
}

.page-header .page-header-content {
    position: relative !important;
    z-index: 2 !important;
    text-align: center !important;
    max-width: 800px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.page-header .page-title {
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    font-weight: 800 !important;
    color: white !important;
    margin: 0 0 1.5rem 0 !important;
    line-height: 1.1 !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.page-header .page-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0 2rem 0 !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.page-header .breadcrumb {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-align: center !important;
    margin: 0 !important;
    width: 100% !important;
}

.page-header .breadcrumb a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.page-header .breadcrumb a:hover {
    color: white !important;
}

.page-header .breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6) !important;
}

.page-header .breadcrumb .current {
    color: white !important;
    font-weight: 600 !important;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain3" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain3)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb .current {
    color: white;
    font-weight: 600;
}

/* ===== MOBILE DEVICES (320px - 480px) ===== */
@media (max-width: 480px) {
    /* Typography adjustments */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 1.8rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
    }
    
    /* Layout adjustments */
    .container {
        padding: 0 1rem !important;
    }
    
    /* Header improvements */
    .navbar {
        padding: 0.6rem 0 !important;
    }
    
    .logo-text {
        font-size: 2.2rem !important;
    }
    
    .logo-subtitle {
        font-size: 0.7rem !important;
    }
    
    .language-switcher {
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    
    .lang-btn {
        padding: 0.15rem 0.3rem !important;
        font-size: 0.6rem !important;
        height: 1.6rem !important;
    }
    
    .navbar .container {
        gap: 1.5rem !important;
    }
    
    .language-switcher {
        margin-left: 2.5rem !important;
        margin-right: 1.5rem !important;
    }
    
    .header-menu-grid {
        gap: 0.2rem !important;
    }
    
    .header-menu-card {
        min-width: 2.2rem !important;
        height: 2.2rem !important;
        font-size: 0.8rem !important;
        margin: 0 1px !important;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
        color: #ffffff !important;
        border: 2px solid #3498db !important;
        box-shadow: 0 2px 8px rgba(52, 73, 94, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    }
    
    .page-header {
        min-height: 250px !important;
        padding: 3rem 0 !important;
    }
    
    .page-title {
        font-size: 2.2rem !important;
    }
    
    .page-subtitle {
        font-size: 1.1rem !important;
    }
    
    .background-image-section {
        height: 80vh;
        margin-top: 0px;
        padding-top: 0px;
    }
    
    .bg-image {
        height: 80vh;
        background-position: center 95%;
    }
    
    .btn {
        width: 100%;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
    
    /* Navigation adjustments */
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 2rem 1rem;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #e9ecef;
    }
    
    .nav-link {
        display: block;
        padding: 1.2rem 1rem;
        border-radius: 0;
        text-align: left;
        font-size: 1.1rem;
        border: none;
    }
    
    .nav-link:hover {
        background: #f8f9fa;
        color: #2c3e50;
        transform: none;
    }
    
    .navbar-toggle {
        display: flex !important;
    }
    
    /* Services grid adjustments */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    /* About section adjustments */
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }
    
    .about-features {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .about-image img {
        max-width: 100%;
        height: auto;
    }
    
    /* Contact section adjustments */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    .contact-item {
        padding: 1.2rem;
        margin: 0 0.5rem;
    }
    
    /* Footer adjustments - Mobile: Stack vertically */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .footer-section h3 {
        font-size: 1.5rem !important;
    }
    
    .footer-section h4 {
        font-size: 1.2rem !important;
    }
    
    
    .footer-section ul {
        text-align: center !important;
    }
    
    .footer-section ul li {
        margin-bottom: 0.5rem !important;
    }
    
    /* Highlights section responsive */
    .highlights-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1rem !important;
    }
    
    .highlight-item {
        padding: 2rem 1.5rem !important;
    }
    
    .highlight-item h3 {
        font-size: 1.4rem !important;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Form adjustments */
    .form-input,
    .form-textarea {
        padding: 1.2rem;
        font-size: 1.1rem;
    }
    
    /* Spacing adjustments */
    .services,
    .about,
    .contact {
        padding: 4rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
        padding: 0 1rem;
    }
}

/* ===== TABLET DEVICES (481px - 768px) ===== */
@media (min-width: 481px) and (max-width: 768px) {
    /* Typography adjustments */
    .hero-title {
        font-size: 3rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.3rem !important;
    }
    
    .section-title {
        font-size: 2.2rem !important;
    }
    
    /* Layout adjustments */
    .container {
        padding: 0 1.5rem !important;
    }
    
    /* Header improvements */
    .navbar {
        padding: 0.7rem 0 !important;
    }
    
    .logo-text {
        font-size: 2.5rem !important;
    }
    
    .logo-subtitle {
        font-size: 0.75rem !important;
    }
    
    .language-switcher {
        margin-left: 1.5rem !important;
        margin-right: 0 !important;
    }
    
    .navbar .container {
        gap: 1.8rem !important;
    }
    
    .language-switcher {
        margin-left: 2.5rem !important;
        margin-right: 1.5rem !important;
    }
    
    .header-menu-grid {
        gap: 0.3rem !important;
    }
    
    .header-menu-card {
        min-width: 2.3rem !important;
        height: 2.3rem !important;
        font-size: 0.85rem !important;
        margin: 0 1px !important;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
        color: #ffffff !important;
        border: 2px solid #3498db !important;
        box-shadow: 0 2px 8px rgba(52, 73, 94, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    }
    
    .page-header {
        min-height: 280px !important;
        padding: 3.5rem 0 !important;
    }
    
    .page-title {
        font-size: 2.6rem !important;
    }
    
    .page-subtitle {
        font-size: 1.2rem !important;
    }
    
    .background-image-section {
        height: 90vh;
        margin-top: 0px;
        padding-top: 0px;
    }
    
    .bg-image {
        height: 90vh;
        background-position: center 98%;
    }
    
    /* Navigation adjustments */
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
    }
    
    .navbar-menu.active {
        left: 0;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 2rem 1.5rem;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #e9ecef;
    }
    
    .nav-link {
        display: block;
        padding: 1.2rem 1.5rem;
        border-radius: 0;
        text-align: left;
        font-size: 1.1rem;
        border: none;
    }
    
    .nav-link:hover {
        background: #f8f9fa;
        color: #2c3e50;
        transform: none;
    }
    
    .navbar-toggle {
        display: flex !important;
    }
    
    /* Services grid adjustments */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    /* About section adjustments */
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 3rem;
        text-align: center;
    }
    
    .about-features {
        justify-content: center;
        gap: 2rem;
    }
    
    /* Contact section adjustments */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 3rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    /* Footer adjustments - Tablet: 2 columns */
    .footer-content {
        grid-template-columns: 2fr 1fr !important;
        gap: 2.5rem;
        text-align: left;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Spacing adjustments */
    .services,
    .about,
    .contact {
        padding: 5rem 0;
    }
    
    .section-header {
        margin-bottom: 3.5rem;
    }
}

/* ===== SMALL DESKTOP (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Typography adjustments */
    .hero-title {
        font-size: 3.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.4rem !important;
    }
    
    /* Layout adjustments */
    .container {
        padding: 0 2rem !important;
    }
    
    .hero {
        height: 95vh;
        margin-top: 75px;
    }
    
    /* Navigation adjustments */
    .nav-list {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Services grid adjustments */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }
    
    /* About section adjustments */
    .about-content {
        gap: 3rem;
    }
    
    /* Contact section adjustments */
    .contact-content {
        gap: 3rem;
    }
    
    /* Footer adjustments */
    .footer-content {
        gap: 3rem;
    }
    
    .footer-links {
        gap: 2rem;
    }
    
    /* Spacing adjustments */
    .services,
    .about,
    .contact {
        padding: 5.5rem 0;
    }
}

/* ===== LARGE DESKTOP (1025px+) ===== */
@media (min-width: 1025px) {
    /* Navigation adjustments */
    .navbar-toggle {
        display: none !important;
    }
    
    .navbar-menu {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        backdrop-filter: none !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        transition: none !important;
    }
    
    .nav-list {
        flex-direction: row !important;
        gap: 0.3rem !important;
        padding: 0 !important;
        overflow-x: auto !important;
        scrollbar-width: thin !important;
        scrollbar-color: #3498db #f1f1f1 !important;
    }
    
    .nav-item {
        width: auto !important;
        border-bottom: none !important;
    }
    
    .nav-link {
        display: inline-block !important;
        padding: 0.5rem 1rem !important;
        border-radius: 25px !important;
        text-align: center !important;
        font-size: 1rem !important;
        border: none !important;
        background: transparent !important;
    }
    
    .nav-link:hover {
        background: transparent !important;
        color: white !important;
        transform: translateY(-2px) !important;
    }
    
    /* Services grid adjustments */
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2.5rem;
    }
    
    /* About section adjustments */
    .about-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 4rem;
        text-align: left;
    }
    
    .about-features {
        justify-content: flex-start;
        gap: 2rem;
    }
    
    /* Contact section adjustments */
    .contact-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 4rem;
    }
    
    .contact-info {
        order: 1;
    }
    
    .contact-form {
        order: 2;
    }
    
    /* Footer adjustments - Desktop: 2 columns */
    .footer-content {
        grid-template-columns: 2fr 1fr !important;
        gap: 4rem;
        text-align: left;
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: row;
        gap: 0;
        text-align: left;
    }
    
    /* Spacing adjustments */
    .services,
    .about,
    .contact {
        padding: 6rem 0;
    }
    
    .section-header {
        margin-bottom: 4rem;
    }
}

/* ===== LANDSCAPE ORIENTATION ADJUSTMENTS ===== */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        height: 100vh;
        margin-top: 0px;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        margin-bottom: 1rem;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-card,
    .contact-item,
    .about-image img {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .navbar-toggle,
    .hero-buttons,
    .contact-form,
    .footer {
        display: none !important;
    }
    
    .hero {
        height: auto;
        margin-top: 0;
        background: white !important;
        color: black !important;
    }
    
    .hero-title,
    .hero-subtitle {
        color: black !important;
    }
    
    .services,
    .about,
    .contact {
        padding: 2rem 0;
        background: white !important;
    }
    
    .service-card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-buttons {
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .nav-link {
        border: 2px solid transparent;
    }
    
    .nav-link:hover {
        border-color: #2c3e50;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .service-card {
        border: 2px solid #ddd;
    }
}


/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .service-card,
    .contact-item {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
    }
    
    .form-input,
    .form-textarea {
        background: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
}
