/* responsive.css - 반응형 디자인 */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .quick-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-menu-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding: 1.25rem 0.75rem;
    }
    
    .quick-menu-item:nth-child(3n) {
        border-right: none;
    }
    
    .quick-menu-item:nth-child(n+4) {
        border-bottom: none;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .board-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* 모바일 (768px 이하) - 박스 제거, 여백 최소화, 가독성 위주 */
@media (max-width: 768px) {
    /* 기본 설정 */
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    section {
        padding: 1.5rem 0;
    }
    
    /* Hero Section - 높이 조정 */
    .hero-section {
        height: 400px;
    }
    
    .hero-video iframe {
        width: 100vw;
        height: 56.25vw;
        min-height: 100%;
        min-width: 177.77vh;
    }
    
    /* Quick Menu - 2열 */
    .quick-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-menu-item {
        padding: 1.5rem 0.5rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .quick-menu-item:nth-child(2n) {
        border-right: none;
    }
    
    .quick-menu-item:nth-child(n+5) {
        border-bottom: none;
    }
    
    .quick-menu-item i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .quick-menu-item p {
        font-size: 0.85rem;
    }
    
    /* News Section - 박스 제거, 여백 최소화 */
    .news-section {
        padding: 1rem 0;
        background: white;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-box {
        border: none;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #ddd;
        margin-bottom: 1rem;
    }
    
    .news-box:last-child {
        border-bottom: none;
    }
    
    .news-header {
        background: transparent;
        padding: 0.75rem 0;
        border-bottom: 1px solid #ddd;
    }
    
    .news-header h3 {
        margin: 0;
        color: #333;
        font-size: 20px !important;
        font-weight: 700;
    }

    .news-header i {
        font-size: 20px !important;
        margin-right: 6px;
        color: #667eea;
    }
    
    .news-tabs {
        background: white;
        border-bottom: 1px solid #ddd;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .news-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .news-tab-btn {
        color: #333;
        font-weight: 600 !important;
        font-size: 16px;
        cursor: pointer;
        min-width: fit-content;
        white-space: nowrap;
    }
    
    .news-content {
        min-height: 160px;
    }
    
    .news-list li a {
        padding: 4px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-title {
        flex: 1;
        font-size:16px !important;
        padding: 0px;
        font-weight: 500;
        height: 24px;
        overflow: hidden;
    }
    
    .news-date {
        display: none;
    }
    
    /* Gallery Section - 박스 제거 */
    .gallery-section {
        padding: 12px 0;
        background: #fff;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-box,
    .notice-box {
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: white;
    }
    
    .gallery-header,
    .notice-header {
        background: transparent;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .gallery-header h3,
    .notice-header h3 {
        margin: 0;
        font-size: 20px !important;
        font-weight: 700;
        color: #2c3e50;
    }

    .gallery-header i,
    .notice-header i {
        font-size: 20px !important;
        margin-right: 6px;
        color: #667eea;
    }
        
    .more-link {
        font-size: 0.85rem;
    }
    
    .gallery-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .gallery-item-title {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    /* Banner Slider - 모바일 최적화 */
    .banner-slider-container {
        margin: 0;
        background: #fff;
    }
    
    .banner-slider {
        padding-bottom: 100%;
    }
    
    .banner-prev,
    .banner-next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .banner-controls {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .banner-dot {
        width: 7px;
        height: 7px;
    }
    
    .banner-dot.active {
        width: 12px;
        height: 12px;
    }
    
    /* Bottom Banners - 모바일 최적화 */
    .bottom-banner-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 6px 12px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .bottom-banner-row:last-child {
        border-bottom: none;
    }
    
    .bottom-banner-title {
        display: none;
    }
    
    .bottom-banner-title h4 {
        display: none;
    }
    
    .bottom-banner-slider-wrapper {
        width: 100%;
        background: #fff;
        padding: 0;
    }
    
    .bottom-banner-items {
        gap: 15px; /* 모바일: 165px(아이템) + 15px(gap) = 180px 단위 */
        padding: 0;
    }
    
    .bottom-banner-item {
        width: 165px; /* 모바일에서 좀 더 작게 */
    }
    
    .bottom-banner-item img {
        max-width: 165px;
    }
    
    .bottom-banner-nav {
        display: none;
    }
    
    /* Board Cards */
    .board-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .board-card {
        border: none;
        border-bottom: 1px solid #e0e0e0;
        border-radius: 0;
        padding: 1rem;
    }
    
    .board-card:last-child {
        border-bottom: none;
    }
}

/* 작은 모바일 (480px 이하) - 최대 여백 최소화 */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    section {
        padding: 1rem 0;
    }
    
    .hero-section {
        height: 400px;
    }
    
    .quick-menu-item {
        padding: 1rem 0.5rem;
    }
    
    .quick-menu-item i {
        font-size: 1.5rem;
    }
    
    .quick-menu-item p {
        font-size: 0.75rem;
    }

    .news-header h3,
    .gallery-header h3,
    .notice-header h3 {
        color: #333;
        font-size: 20px !important;
        font-weight: 700;
    }
    
    .news-header i,
    .gallery-header i,
    .notice-header i {
        argin-right: 0.5rem;
        color: #667eea;
    }
    
    .news-tab-btn {
        padding: 10px 16px !important;
        font-weight: 600;
        font-size: 16px !important;
        cursor: pointer;
    }

    .news-list li {
        border-bottom: 1px solid #ddd;
    }    
    .news-list li a {
        padding: 4px 0;
    }
    
    .news-title {
        flex: 1;
        font-size:16px !important;
        padding: 0px;
        font-weight: 500;
        height: 24px;
        overflow: hidden;            
    }
    
    .gallery-items {
        padding: 4px 0;
    }

    .bottom-banners-section {
        width:100%;
        margin:0 auto;
        background: #fff;
        padding: 8px 12px 20px 12px;
        border-top: 1px solid #e0e0e0;
    }

    .bottom-banner-title {
        padding: none;
    }
    
    .bottom-banner-items {
        gap: 15px; /* 작은 모바일도 동일한 gap */
        padding: 0;
    }
    
    .bottom-banner-item {
        width: 165px; /* 일관성 유지 */
    }
    
    .bottom-banner-item img {
        max-width: 165px;
    }
}

/* 가로 모드 모바일 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 400px;
    }
    
    .quick-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}