/* ==================== 입주정보 섹션 전체 스타일 ==================== */

/* 섹션 컨테이너 */
#accommodation {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

/* 건물 탭 */
.accommodation-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.accommodation-tab {
    padding: 1rem 2.5rem;
    border: 2px solid var(--olive-color);
    border-radius: 50px;
    background: white;
    color: var(--olive-color);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accommodation-tab:hover {
    background: var(--olive-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 127, 65, 0.15);
}

.accommodation-tab.active {
    background: var(--olive-color);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 127, 65, 0.3);
}

.accommodation-tab i {
    margin-right: 0.5rem;
}

/* 건물 콘텐츠 */
.building-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.building-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 청년동 - 성별 선택 버튼 ==================== */
.gender-buttons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 1rem;
}

.gender-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    border: 3px solid transparent;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gender-btn.open {
    border-color: #e9ecef;
}

.gender-btn.open:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(107, 127, 65, 0.2);
    border-color: currentColor;
}

.gender-btn.male.open {
    border-color: #4a90d9;
}

.gender-btn.male.open:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
}

.gender-btn.female.open {
    border-color: #d94a7b;
}

.gender-btn.female.open:hover {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    border-color: #e91e63;
}

.gender-btn.closed {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.gender-btn-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.gender-btn.open:hover .gender-btn-icon {
    transform: scale(1.1) rotate(5deg);
}

.gender-btn.male .gender-btn-icon {
    background: linear-gradient(135deg, #4a90d9 0%, #2196f3 100%);
    color: white;
}

.gender-btn.female .gender-btn-icon {
    background: linear-gradient(135deg, #d94a7b 0%, #e91e63 100%);
    color: white;
}

.gender-btn.closed .gender-btn-icon {
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
}

.gender-btn-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.gender-btn-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.gender-btn-status {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gender-btn-status.open {
    color: #2e7d32;
}

.gender-btn-status.closed {
    color: #c62828;
}

.gender-btn-status.upcoming {
    color: #f57c00;
}

.gender-btn.upcoming {
    border-color: #ffa726;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.gender-btn.upcoming .gender-btn-icon {
    color: #f57c00;
}

.gender-btn-arrow {
    font-size: 1.5rem;
    color: var(--olive-color);
    transition: transform 0.3s ease;
    opacity: 0.5;
    margin-top: 0.5rem;
}

.gender-btn.open:hover .gender-btn-arrow {
    transform: translateY(5px);
    opacity: 1;
}

/* 청년동 안내 박스 */
.youth-info-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8faf9 100%);
    border: 2px solid var(--olive-light);
    border-left: 5px solid var(--olive-color);
    padding: 2rem;
    border-radius: 15px;
    max-width: 700px;
    margin: 2rem auto 0;
    box-shadow: 0 4px 15px rgba(107, 127, 65, 0.1);
}

.youth-info-box h4 {
    color: var(--olive-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.youth-info-box ul {
    list-style: none;
    padding: 0;
}

.youth-info-box li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    color: #495057;
    line-height: 1.6;
}

.youth-info-box li:last-child {
    border-bottom: none;
}

.youth-info-box li i {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ==================== 선교사동 - 달력 예약 UI ==================== */
.missionary-booking-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .missionary-booking-container {
        grid-template-columns: 1fr;
    }
}

/* 달력 섹션 */
.booking-calendar-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid #e9ecef;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--olive-light);
}

.calendar-nav-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--olive-color);
    border-radius: 50%;
    background: white;
    color: var(--olive-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.calendar-nav-btn:hover {
    background: var(--olive-color);
    color: white;
    transform: scale(1.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 10px 4px;
}

.weekday {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #495057;
    padding: 0.5rem 0;
}

.weekday.sun { color: #dc3545; }
.weekday.sat { color: #2196f3; }

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: #fafbfc;
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.booked) {
    background: var(--olive-light);
    border-color: var(--olive-color);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(107, 127, 65, 0.2);
    z-index: 10;
}

.calendar-day.today {
    font-weight: 700;
    color: var(--olive-color);
    background: #fff;
    border-color: var(--olive-color);
    box-shadow: 0 0 0 3px rgba(107, 127, 65, 0.1);
}

.calendar-day.selected {
    background: var(--olive-color) !important;
    color: white !important;
    border-color: var(--olive-color);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(107, 127, 65, 0.4);
}

.calendar-day.in-range {
    background: var(--olive-light);
    color: var(--olive-color);
    border-color: var(--olive-light);
}

.calendar-day.disabled {
    color: #ced4da;
    cursor: not-allowed;
    background: transparent;
}

.calendar-day.disabled:hover {
    transform: none;
}

.calendar-day.booked {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    cursor: not-allowed;
    border-color: #ffcdd2;
    position: relative;
}

.calendar-day.booked::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #c62828;
    border-radius: 50%;
}

.calendar-day.booked:hover {
    transform: none;
}

.calendar-day.sun:not(.selected):not(.disabled) { color: #dc3545; }
.calendar-day.sat:not(.selected):not(.disabled) { color: #2196f3; }
.calendar-day.selected.sun,
.calendar-day.selected.sat { color: white !important; }

/* 달력 범례 */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 2px solid #e9ecef;
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #495057;
}

.legend-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-dot.available {
    background: #fafbfc;
    border: 2px solid var(--olive-color);
}

.legend-dot.selected {
    background: var(--olive-color);
    border: 2px solid var(--olive-color);
}

.legend-dot.booked {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 2px solid #ffcdd2;
}

/* 예약 정보 섹션 */
.booking-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selected-dates-box,
.room-select-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.selected-dates-box h4,
.room-select-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.selected-dates-box h4 i,
.room-select-box h4 i {
    color: var(--olive-color);
}

.selected-dates-display {
    font-size: 1rem;
    color: #495057;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.selected-dates-display .date-range {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.selected-dates-display .date-range > div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.selected-dates-display .date-range i {
    color: var(--olive-color);
    font-size: 1.2rem;
}

/* 호실 선택 */
.room-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.room-options::-webkit-scrollbar {
    width: 6px;
}

.room-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.room-options::-webkit-scrollbar-thumb {
    background: var(--olive-color);
    border-radius: 10px;
}

.room-option {
    cursor: pointer;
    display: block;
}

.room-option input {
    display: none;
}

.room-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.room-option:hover .room-option-content {
    border-color: var(--olive-color);
    background: var(--olive-light);
    transform: translateX(4px);
}

.room-option input:checked + .room-option-content {
    border-color: var(--olive-color);
    background: var(--olive-light);
    box-shadow: 0 4px 12px rgba(107, 127, 65, 0.2);
}

.room-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.room-option-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.room-option-detail {
    font-size: 0.95rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.room-option-description {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    line-height: 1.4;
}

.room-option-detail {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 예약 요약 */
.booking-summary {
    background: linear-gradient(135deg, var(--olive-light) 0%, rgba(107, 127, 65, 0.15) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid var(--olive-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #495057;
}

.summary-row.total {
    border-top: 2px solid var(--olive-color);
    margin-top: 0.75rem;
    padding-top: 1rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--olive-color);
}

/* 예약 버튼 */
.proceed-booking-btn {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--olive-color) 0%, var(--olive-dark) 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 127, 65, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.proceed-booking-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--olive-dark) 0%, var(--olive-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(107, 127, 65, 0.4);
}

.proceed-booking-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.proceed-booking-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* 선교사동 안내 박스 */
.missionary-info-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8faf9 100%);
    border: 2px solid var(--olive-light);
    border-left: 5px solid var(--olive-color);
    padding: 2rem;
    border-radius: 15px;
    max-width: 700px;
    margin: 2rem auto 0;
    box-shadow: 0 4px 15px rgba(107, 127, 65, 0.1);
}

.missionary-info-box h4 {
    color: var(--olive-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.missionary-info-box ul {
    list-style: none;
    padding: 0;
}

.missionary-info-box li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    color: #495057;
    line-height: 1.6;
}

.missionary-info-box li:last-child {
    border-bottom: none;
}

.missionary-info-box li i {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ==================== 반응형 - 태블릿 ==================== */
@media (max-width: 992px) {
    .accommodation-tabs {
        gap: 0.75rem;
    }
    
    .accommodation-tab {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .missionary-booking-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .booking-calendar-section {
        padding: 1.5rem;
    }
}

/* ==================== 반응형 - 모바일 ==================== */
@media (max-width: 640px) {
    .accommodation-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .accommodation-tab {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .gender-buttons-container {
        padding: 0.5rem;
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gender-btn {
        padding: 1.5rem;
        gap: 1rem;
        aspect-ratio: 1 / 1;
    }
    
    .gender-btn-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .gender-btn-label {
        font-size: 1.3rem;
    }
    
    .gender-btn-status {
        font-size: 0.9rem;
    }
    
    .youth-info-box,
    .missionary-info-box {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .booking-calendar-section {
        padding: 1rem;
    }
    
    .calendar-day {
        height: 42px;
        font-size: 0.85rem;
    }
    
    .calendar-legend {
        gap: 1rem;
        font-size: 0.75rem;
    }
    
    .legend-dot {
        width: 12px;
        height: 12px;
    }
    
    .selected-dates-box,
    .room-select-box {
        padding: 1rem;
    }
    
    .booking-summary {
        padding: 1rem;
    }
    
    .proceed-booking-btn {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .room-options {
        max-height: 240px;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        height: 38px;
        font-size: 0.8rem;
    }
    
    .calendar-weekdays {
        padding: 8px 4px;
    }
    
    .weekday {
        font-size: 0.75rem;
    }
}


/* 호실 상세보기 버튼 */
.room-detail-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-detail-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.4);
}

.room-detail-btn i {
    font-size: 0.75rem;
}
