/**
 * BDS Mobile Optimization - Unified Mobile Experience
 * Index 페이지와 동일한 보기 편한 모바일 레이아웃
 */

/* ========================================
   MOBILE HERO OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Hero Section */
    .page-hero {
        padding: 4rem 0 2.5rem !important;
        min-height: 280px !important;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-badge {
        font-size: 0.688rem;
        padding: 0.438rem 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-badge i {
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.875rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem !important;
        margin-bottom: 1.75rem;
        line-height: 1.6;
    }
    
    /* Hero Features Grid */
    .hero-features {
        grid-template-columns: 1fr !important;
        gap: 0.875rem;
        margin-top: 2rem;
    }
    
    .hero-feature-card {
        padding: 1.5rem 1.25rem;
    }
    
    .hero-feature-icon {
        width: 48px;
        height: 48px;
    }
    
    .hero-feature-icon i {
        font-size: 1.375rem;
    }
    
    .hero-feature-title {
        font-size: 0.938rem;
    }
    
    .hero-feature-desc {
        font-size: 0.813rem;
    }
}

/* ========================================
   MOBILE SEARCH & FILTER OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Search Bar */
    .search-bar {
        padding: 1rem;
        margin-top: -1rem;
        border-radius: 1rem;
    }
    
    .search-input-wrapper {
        margin-bottom: 1rem;
    }
    
    .search-input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 0.875rem;
        border-radius: 0.75rem;
    }
    
    .search-icon {
        left: 0.875rem;
        font-size: 1rem;
    }
    
    /* Filter Chips - 모바일에서 적절한 크기 */
    .filter-chips {
        gap: 0.5rem;
    }
    
    .filter-chip {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        border-width: 1.5px;
    }
    
    .filter-label {
        font-size: 0.688rem;
        margin-bottom: 0.5rem;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
}

/* ========================================
   MOBILE SECTION OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Section Spacing */
    .section {
        padding: 2.5rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .section-badge {
        font-size: 0.625rem;
        padding: 0.375rem 0.875rem;
        margin-bottom: 0.875rem;
        letter-spacing: 0.08em;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 0.938rem !important;
        line-height: 1.6;
    }
    
    /* Container Padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   MOBILE CARD OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Service/Resource/Partner Cards */
    .service-card,
    .resource-card,
    .partner-card,
    .management-card,
    .update-card {
        padding: 1.25rem !important;
        border-radius: 1rem !important;
    }
    
    /* Card Icons */
    .service-icon,
    .resource-icon,
    .partner-logo,
    .management-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        border-radius: 0.875rem !important;
    }
    
    /* Card Titles */
    .service-title,
    .resource-title,
    .partner-name,
    .management-card h3,
    .update-title {
        font-size: 1.125rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    /* Card Descriptions */
    .service-description,
    .resource-description,
    .partner-description,
    .management-card p,
    .update-description {
        font-size: 0.813rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Card Meta Info */
    .service-meta,
    .resource-meta,
    .partner-meta,
    .management-meta,
    .update-meta {
        font-size: 0.75rem !important;
        gap: 0.5rem !important;
    }
    
    /* Card Badges */
    .service-badge,
    .resource-badge,
    .partner-badge,
    .category-badge {
        font-size: 0.688rem !important;
        padding: 0.25rem 0.625rem !important;
        border-radius: 0.375rem !important;
    }
    
    /* Card Buttons */
    .card .btn,
    .service-card .btn,
    .resource-card .btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.813rem !important;
        min-height: 38px !important;
    }
}

/* ========================================
   MOBILE GRID OPTIMIZATION (2 COLUMNS)
======================================== */
@media (max-width: 768px) {
    /* Grid Layout */
    .grid,
    .services-grid,
    .resources-grid,
    .partners-grid,
    .updates-grid {
        gap: 1rem !important;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* Stats Grid - 2 columns */
    .stats-showcase {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 1.5rem 1rem !important;
    }
    
    .stat-box {
        padding: 1.25rem 1rem !important;
    }
    
    .stat-number {
        font-size: 1.75rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
}

/* ========================================
   MOBILE BUTTON OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Primary Buttons */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn i {
        font-size: 0.875rem;
    }
    
    .btn-lg {
        min-height: 52px;
        padding: 0.875rem 1.5rem;
        font-size: 0.938rem;
    }
    
    .btn-block {
        width: 100%;
    }
    
    /* Button Groups */
    .hero-cta {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   MOBILE CTA BOX OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    .cta-box {
        padding: 2rem 1.5rem !important;
        border-radius: 1.25rem !important;
        margin: 1rem !important;
    }
    
    .cta-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .cta-subtitle {
        font-size: 0.875rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .cta-content {
        padding: 0;
    }
}

/* ========================================
   MOBILE STATS OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
    
    .hero-stat {
        padding: 1rem 0.75rem !important;
    }
    
    .hero-stat-number {
        font-size: 1.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .hero-stat-label {
        font-size: 0.75rem !important;
    }
}

/* ========================================
   MOBILE NOTICE BOX OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    .notice-box {
        padding: 1rem 1.25rem !important;
        margin-top: 1rem !important;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .notice-box i {
        font-size: 1.25rem !important;
    }
    
    .notice-box span {
        font-size: 0.813rem !important;
    }
}

/* ========================================
   EXTRA SMALL MOBILE (480px 이하)
======================================== */
@media (max-width: 480px) {
    /* Hero */
    .page-hero {
        padding: 3.5rem 0 2rem !important;
        min-height: 250px !important;
    }
    
    .hero-title {
        font-size: 1.625rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.813rem !important;
    }
    
    /* Section */
    .section {
        padding: 2rem 0 !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .section-subtitle {
        font-size: 0.875rem !important;
    }
    
    /* Cards - Still 2 columns */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .service-card,
    .resource-card,
    .partner-card,
    .management-card,
    .update-card {
        padding: 1rem !important;
    }
    
    .service-icon,
    .resource-icon,
    .partner-logo,
    .management-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .service-title,
    .resource-title,
    .partner-name,
    .management-card h3,
    .update-title {
        font-size: 1rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    .service-description,
    .resource-description,
    .partner-description,
    .management-card p,
    .update-description {
        font-size: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Buttons */
    .btn {
        min-height: 42px;
        padding: 0.625rem 1rem;
        font-size: 0.813rem;
    }
    
    .btn-lg {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Stats */
    .stat-box {
        padding: 1rem 0.75rem !important;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.688rem !important;
    }
    
    /* CTA Box */
    .cta-box {
        padding: 1.5rem 1.25rem !important;
        margin: 0.75rem !important;
    }
    
    .cta-title {
        font-size: 1.25rem !important;
    }
    
    .cta-subtitle {
        font-size: 0.813rem !important;
        margin-bottom: 1.25rem !important;
    }
}

/* ========================================
   MOBILE TEXT OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Prevent text overflow */
    h1, h2, h3, h4, h5, h6,
    p, span, a, button {
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* Responsive font sizes */
    body {
        font-size: 0.875rem;
        line-height: 1.6;
    }
}

/* ========================================
   MOBILE SPACING UTILITIES
======================================== */
@media (max-width: 768px) {
    .mb-mobile-sm { margin-bottom: 0.5rem !important; }
    .mb-mobile-md { margin-bottom: 1rem !important; }
    .mb-mobile-lg { margin-bottom: 1.5rem !important; }
    
    .mt-mobile-sm { margin-top: 0.5rem !important; }
    .mt-mobile-md { margin-top: 1rem !important; }
    .mt-mobile-lg { margin-top: 1.5rem !important; }
    
    .px-mobile-sm { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .px-mobile-md { padding-left: 1rem !important; padding-right: 1rem !important; }
    .px-mobile-lg { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
    
    .py-mobile-sm { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .py-mobile-md { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .py-mobile-lg { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
}

/* ========================================
   MOBILE VISIBILITY UTILITIES
======================================== */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .show-mobile-only {
        display: none !important;
    }
}

/* ========================================
   MOBILE TOUCH OPTIMIZATION
======================================== */
@media (max-width: 768px) {
    /* Increase tap targets */
    button,
    a,
    .btn,
    .filter-chip,
    .card {
        -webkit-tap-highlight-color: rgba(14, 165, 233, 0.1);
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .card:hover,
        .btn:hover,
        .filter-chip:hover {
            transform: none;
        }
    }
}
