/* Hero Section */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 0 clamp(1rem, 5%, 2rem);*/
    margin-top: clamp(40vh, 60vh, 600px);
}

@media (max-width: 768px) {
    .main-container {
        margin-top:360px;
    }
}


.main-hero {
    height: clamp(40vh, 60vh, 600px);
    overflow: hidden;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
}

.main-hero__slider {
    height: 100%;
    position: relative;
}

.main-hero__slides {
    height: 100%;
    position: relative;
}

.main-hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

.main-hero__slide--active {
    opacity: 1;
}

.main-hero__slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.main-hero__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 100%;
    padding: 0 var(--space-4);
    z-index: 1;
}

.main-hero__title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
}

.main-hero__date,
.main-hero__location {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

/* Slick Customization */
.main-hero__controls {
    position: absolute;
    bottom: var(--space-8);
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
}

.main-hero__indicators {
    display: flex;
    gap: var(--space-2);
}

.main-hero__indicator {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.main-hero__indicator--active {
    background: var(--white);
}

.main-hero__buttons {
    margin-left: var(--space-4);
}

.main-hero__button {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--white);
    cursor: pointer;
    padding: 0;
}

/* Section Styles */
.main-section {
    padding: var(--space-16) 0;
    border-bottom: 1px solid var(--gray-200);
}

.main-section:last-child {
    border-bottom: none;
}

.main-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--gray-900);
}

.main-section__title-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.main-section__icon {
    font-size: var(--text-2xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-lg);
}

.main-section__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
    color: var(--gray-900);
}

.main-section__description {
    color: var(--gray-500);
    font-size: var(--text-base);
}

.main-section__more-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-600);
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
    border: none;
    background: transparent;
    position: relative;
}

.main-section__more-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

.main-section__more-btn:hover::after {
    width: 100%;
}

/* Card Styles */
.main-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    min-height: 203px;
}

.main-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    height: 100%;
}

.main-card__content {
    padding: var(--space-6);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.main-card__header {
    margin-bottom: var(--space-4);
}

.main-card__title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--gray-900);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.main-card__meta {
    margin-top: auto;
    margin-bottom: var(--space-4);
}

.main-card__date,
.main-card__location {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-600);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.main-card__date i,
.main-card__location i {
    color: var(--primary);
    width: 16px;
}

.main-card__btn {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--primary);
    border-radius: var(--radius-base);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    background: var(--white);
    color: var(--primary);
    transition: all var(--transition-base);
}

.main-card__btn:hover {
    background: var(--primary);
    color: var(--white);
}

.main-card__btn--closed {
    border-color: var(--gray-400);
    color: var(--gray-500);
}

.main-card__btn--closed:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Video Grid */
.main-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    min-height: 220px;
}

.main-video {
    aspect-ratio: 16/9;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.main-video__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-video__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
}

.main-video__title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.main-video__category {
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* Map Container */
.map-container {
    height: 400px;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.location-info {
    background: var(--gray-50);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}

/* Board Section */
.main-boards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
}

.main-board {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.main-board__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--gray-900);
}

.main-board__title-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.main-board__icon {
    font-size: var(--text-xl);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-lg);
}

.main-board__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--gray-900);
}

.main-board__more-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-600);
    font-size: var(--text-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.main-board__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    height: calc(32px* 4 + var(--space-3)* 3);
    min-height: calc(32px* 4 + var(--space-3)* 3);
}

.main-board__item {
    padding: var(--space-2) 0;
}

.main-board__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--gray-900);
    text-decoration: none;
    width: 100%;
}

.main-board__text {
    max-width: 300px;
    flex: 1;
    min-width: 0;
    font-size: var(--text-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-board__date {
    flex-shrink: 0;
    color: var(--gray-500);
    font-size: var(--text-sm);
    margin-left: auto;
    padding-left: var(--space-4);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .main-cards,
    .main-videos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-hero {
        height: 40vh;
    }

    .main-hero__title {
        font-size: var(--text-2xl);
    }

    .main-section {
        padding: var(--space-8) 0;
    }

    .main-section__header {
        flex-direction: column;
        gap: var(--space-4);
    }

    .main-cards,
    .main-videos {
        grid-template-columns: 1fr;
    }

    .main-card {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .main-boards {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .main-board__link {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: var(--space-3);
    }

    .main-board__text {
        flex: 1;
        min-width: 0;
    }

    .main-board__date {
        width: auto;
        text-align: right;
        order: unset;
    }
}

/* Popup Styles */
.main-popup {
    position: fixed;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    will-change: transform;
}

.main-popup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    cursor: move;
}

.main-popup__title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
}

.main-popup__close {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: var(--space-2);
}

.main-popup__content {
    padding: var(--space-4);
    overflow: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-popup__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.main-popup__footer {
    padding: var(--space-4);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-popup__checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.main-popup__close-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-base);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.main-popup__close-btn:hover {
    background: var(--gray-200);
}

/* 모바일에서는 항상 중앙 정렬 */
@media (max-width: 768px) {
    .main-popup {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        will-change: auto;
    }
}
