@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Nanum+Myeongjo:wght@400;700&display=swap');

:root {
    --primary-color: #3a6ea5;
    --secondary-color: #c6e2f7;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #fff;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    background-color: #f5f7fa;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    /* padding: 0.2rem 0.4rem; */
    border-radius: 4px;
}

a:hover {
    background-color: rgba(58, 110, 165, 0.1);
    color: #2c5a89;
    text-decoration: underline;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
}

/* Header */
.header {
    position: relative;
    height: 50vh;
    min-height: 400px;
    background-image: url('/images/1.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: white;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(165, 110, 58, 0.5), rgba(247, 226, 198, 0.5));
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 40px;
    height: 40px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    bottom: 30%;
    right: 10%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.header-content {
    position: relative;
    z-index: 3;
}

h1 {
    font-family: 'Nanum Myeongjo', serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

h1 ruby {
    display: inline;
    text-align: center;
}

h1 rt {
    font-size: 0.5em;
    line-height: 1;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    display: block;
    position: relative;
    top: -0.5em;
}

.subtitle {
    font-weight: 300;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.date-badge {
    background: white;
    color: var(--primary-color);
    border-radius: 30px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Content */
.content {
    padding: 2.5rem;
}

.section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.section-title i {
    margin-right: 0.8rem;
}

.message {
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

.message .sub {
    color: var(--light-text);
    text-align: center;
    font-style: italic;
}

.highlight {
    color: var(--accent-color);
    font-weight: 500;
}

/* Date Section */
.date-section {
    background-color: #f8f9fa;
    padding: 3rem 2rem;
    margin: 2rem -2.5rem;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.date-info {
    max-width: 600px;
    margin: 0 auto;
}

.main-date {
    font-size: 2.5rem;
    font-family: 'Nanum Myeongjo', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.day-time {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.calendar-wrapper {
    margin: 2rem 0;
}

.calendar {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.month {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--light-text);
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    text-align: center;
}

.days div {
    padding: 0.6rem 0;
    font-size: 0.9rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.days .empty {
    visibility: hidden;
}

.highlight-day {
    background-color: var(--accent-color);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
}

.countdown-wrapper {
    margin: 2rem 0;
}

.date-countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.date-countdown-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 0.8rem 1.2rem;
    min-width: 80px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.date-countdown-item .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.date-countdown-item .label {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-top: 0.3rem;
}

.date-section .countdown-message {
    font-size: 1.2rem;
    font-family: 'Nanum Myeongjo', serif;
    margin-top: 1.5rem;
    color: var(--light-text);
}

#days-left {
    font-weight: 700;
    color: var(--accent-color);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 기본적으로 2칸씩 배치 */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-card {
    background: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.info-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--light-text);
}

/* Map */
.map-container {
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: var(--box-shadow);
}

/* 카카오맵 스타일 오버라이드 */
.root_daum_roughmap {
    width: 100% !important;
    border: none !important;
}

.root_daum_roughmap .wrap_map {
    height: 300px !important;
}

.root_daum_roughmap .wrap_controllers {
    display: none !important; /* 컨트롤러 숨김 (선택사항) */
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    padding: 1rem;
    text-align: center;
}

.map-placeholder img {
    max-width: 100%;
    max-height: 80%;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Directions */
.directions-container {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f9f9fa;
    border-radius: var(--border-radius);
    padding: 1.8rem;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    max-width: 100%;
}

.directions-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.directions-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.directions-location {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.transport-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.transport-method {
    display: flex;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.transport-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    margin-top: 0.3rem;
    color: white;
}

.transport-icon i {
    font-size: 1.4rem;
}

.transport-icon.subway {
    background-color: #5a3dbf;
}

.transport-icon.bus {
    background-color: #3b8c47;
}

.transport-icon.car {
    background-color: #d35248;
}

.transport-icon.walk {
    background-color: #4a89dc;
}

.transport-details {
    flex: 1;
}

.transport-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.transport-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.transport-details li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1rem;
}

.transport-details li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.transport-details p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.line {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 3px;
}

.line-2 {
    background-color: #3cb44a; /* 2호선 색상 */
}

.line-5 {
    background-color: #996cac; /* 5호선 색상 */
}

.line-7 {
    background-color: #5d7830; /* 7호선 색상 */
}

.bus-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 3px;
}

.bus-type.green {
    background-color: #37b42d;
}

.bus-type.blue {
    background-color: #2c68b1;
}

.bus-type.red {
    background-color: #d13b40;
}

/* RSVP Form */
.rsvp-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn:hover {
    background: #2c5a89;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    color: var(--light-text);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.contact-info {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.contact-info a:hover {
    background-color: rgba(58, 110, 165, 0.1);
    color: #2c5a89;
    text-decoration: underline;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: var(--primary-color);
    color: white;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

/* Lightgallery overrides */
.lg-backdrop {
    background-color: rgba(0, 0, 0, 0.85);
}

.lg-outer .lg-thumb-outer {
    background-color: rgba(0, 0, 0, 0.75);
}

.gallery-item-clicked {
    transform: scale(0.95);
    opacity: 0.8;
    box-shadow: 0 0 25px rgba(58, 110, 165, 0.5);
    transition: all 0.2s ease;
}

/* 모달 갤러리 스타일 개선 */
.lg-outer .lg-img-wrap {
    padding: 12px;
}

.lg-outer .lg-toolbar {
    background-color: rgba(0, 0, 0, 0.45);
}

.lg-outer .lg-toolbar-next, 
.lg-outer .lg-toolbar-prev {
    color: #fff;
}

.lg-progress-bar .lg-progress {
    background-color: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        width: auto;
    }
    
    .header {
        height: 35vh;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .message {
        font-size: 1rem;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 태블릿에서는 2칸씩 */
    }
    
    /* .gallery-item img {
        height: 150px;
    } */
    
    .date-section {
        margin: 2rem -1.5rem;
        padding: 2rem 1rem;
    }
    
    .main-date {
        font-size: 2rem;
    }
    
    .day-time {
        font-size: 1.1rem;
    }
    
    .calendar {
        padding: 1rem;
    }
    
    .date-countdown-item {
        min-width: 60px;
        padding: 0.6rem 0.8rem;
    }
    
    .date-countdown-item .number {
        font-size: 1.5rem;
    }
    
    .directions-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header {
        height: 30vh;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .date-badge {
        font-size: 0.9rem;
    }
    
    .content {
        padding: 1.2rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr; /* 모바일에서는 1칸씩 */
    }
    
    .info-card {
        padding: 1.2rem;
    }
    
    .info-card i {
        font-size: 1.5rem;
    }
    
    .gallery {
        grid-template-columns: 1fr; /* 모바일에서는 1칸씩 */
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .date-section {
        margin: 1.5rem -1.2rem;
        padding: 1.5rem 0.8rem;
    }
    
    .main-date {
        font-size: 1.8rem;
    }
    
    .day-time {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .calendar-wrapper {
        margin: 1.5rem 0;
    }
    
    .days div {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .date-countdown {
        gap: 0.5rem;
    }
    
    .date-countdown-item {
        min-width: 50px;
        padding: 0.5rem;
    }
    
    .date-countdown-item .number {
        font-size: 1.2rem;
    }
    
    .date-countdown-item .label {
        font-size: 0.8rem;
    }
    
    .countdown-message {
        font-size: 1rem;
    }
    
    .directions-container {
        padding: 1.2rem;
        margin-left: -0.2rem;
        margin-right: -0.2rem;
        border-radius: 8px;
    }
    
    .directions-title {
        font-size: 1.2rem;
    }
    
    .directions-location {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .transport-methods {
        width: 100%;
        padding: 0;
        display: block; /* 그리드 대신 블록으로 변경 */
        max-width: 100%;
    }
    
    /* 모바일에서 교통 방법 레이아웃 변경 */
    .transport-method {
        margin-bottom: 2rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        max-width: 100%;
        display: block; /* flex 대신 block으로 변경 */
    }
    
    .transport-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto 0.8rem auto;
    }
    
    .transport-details {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }
    
    .transport-details h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .transport-details ul {
        text-align: left;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }
    
    .transport-details li {
        text-align: left;
        padding-left: 1.2rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }
    
    .transport-details li, 
    .transport-details p {
        font-size: 0.9rem;
    }
    
    .transport-details p {
        text-align: left;
        padding-left: 0.2rem;
        max-width: 100%;
    }
}
