/* ===========================================================================
 * Wedding Invitation — main stylesheet
 *
 * Sections:
 *   1. CSS custom properties
 *   2. Minimal reset
 *   3. Layout (.container)
 *   4. Utilities (.bg-light, .sticky-top, flex helpers, .text-uppercase, .ml-auto)
 *   5. Navbar (.ww-nav-*)
 *   6. Common wedding styles (.ww-section etc.)
 *   7. Home / hero
 *   8. Calendar
 *   9. Photo gallery (Swiper)
 *  10. Map / transport
 *  11. Contact
 *  12. Account modal (currently hidden in HTML)
 *  13. Footer
 * =========================================================================== */


/* ============================================================
 * 1. CSS custom properties
 * ============================================================ */
:root {
    --red: #dc3545;
    --blue: #007bff;
    --primary: #f58a77;
    --light: #f8f9fa;
}


/* ============================================================
 * 2. Minimal reset
 * ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    text-align: left;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    vertical-align: middle;
    border-style: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    color: #f04d30;
    text-decoration: underline;
}

button {
    margin: 0;
    overflow: visible;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-transform: none;
    -webkit-appearance: button;
    cursor: pointer;
}

ul,
ol {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

b,
strong {
    font-weight: bolder;
}


/* ============================================================
 * 3. Layout: container
 * ============================================================ */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}


/* ============================================================
 * 4. Utilities
 * ============================================================ */
.bg-light            { background-color: var(--light); }
.sticky-top          { position: sticky; top: 0; z-index: 1020; }
.d-flex              { display: flex; }
.align-items-center  { align-items: center; }
.justify-content-start { justify-content: flex-start; }
.text-uppercase     { text-transform: uppercase; }
.ml-auto             { margin-left: auto; }


/* ============================================================
 * 5. Navbar (replaces Bootstrap navbar / collapse)
 * ============================================================ */
.ww-nav-bar {
    padding: 0.5rem 1rem;
}

.ww-nav-bar > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.ww-nav-toggler {
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    color: rgba(0, 0, 0, 0.5);
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
}

.ww-nav-toggler:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.ww-nav-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background: 50% / 100% 100% no-repeat
        url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%280,0,0,0.5%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.ww-nav-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    display: none;
}

.ww-nav-collapse.show {
    display: block;
}

.ww-nav-menu {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.ww-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(0, 0, 0, 0.5);
}

.ww-nav-link:hover,
.ww-nav-link:focus {
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
}

.ww-nav-bar .heart {
    fill: #f26147;
    position: relative;
    top: 2px;
    width: 40px;
    -webkit-animation: pulse 1s ease infinite;
    animation: pulse 1s ease infinite;
}

@-webkit-keyframes pulse {
    0%   { -webkit-transform: scale(1);   transform: scale(1); }
    50%  { -webkit-transform: scale(1.3); transform: scale(1.3); }
    100% { -webkit-transform: scale(1);   transform: scale(1); }
}
@keyframes pulse {
    0%   { -webkit-transform: scale(1);   transform: scale(1); }
    50%  { -webkit-transform: scale(1.3); transform: scale(1.3); }
    100% { -webkit-transform: scale(1);   transform: scale(1); }
}

.ww-nav-bar .ww-nav-item {
    font-size: 1rem;
    padding: 0.5rem 0 0.5rem 0.5rem;
    font-weight: 500;
}

@media (min-width: 992px) {
    .ww-nav-toggler {
        display: none;
    }
    .ww-nav-collapse {
        display: flex !important;
        flex-basis: auto;
    }
    .ww-nav-menu {
        flex-direction: row;
    }
}


/* ============================================================
 * 6. Common wedding styles
 * ============================================================ */
.ww-section {
    padding: 3rem 0;
}

.ww-section-title {
    font-family: "MYYeongnamnu";
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1.2;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.ww-section-content {
    margin-bottom: 0.5rem;
    text-align: center;
}

.ww-section-comment {
    font-size: 0.7rem;
    text-align: center;
}

.ww-section hr {
    width: 30%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.bottom_right {
    overflow: hidden;
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 0px 15px 15px 15px;
}

.bottom_left {
    overflow: hidden;
    position: fixed;
    text-align: right;
    bottom: 0;
    left: 0;
    margin: 0px 15px 15px 15px;
}

#go-to-top {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--primary);
    line-height: 0;
}

#go-to-top svg {
    width: 32px;
    height: 32px;
    display: block;
}

#go-to-top:hover {
    color: #f04d30;
}

.ww-image {
    max-width: 100%;
    height: auto;
    padding: 1rem 0;
}

.ww-image-divider {
    display: block;
    margin: auto;
    padding: 2.5rem 0 0 0;
    width: 30%;
}

figure {
    margin: 0 0 1rem;
    text-align: center;
}

figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: #000;
    padding-top: 0.5rem;
}

.map-icon {
    width: 48px;
    height: auto;
    margin-left: 5px;
    margin-right: 5px;
}


/* ============================================================
 * 7. Home / hero
 * ============================================================ */
.ww-home {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        url("../images/main.webp") no-repeat center center;
    background-size: cover;
    background-position: 50%;
    height: 100vh;
    min-height: 480px;
}

.ww-wedding-announcement {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    height: 140%;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
}

.ww-announcement-container {
    max-width: 600px;
    text-align: center;
    z-index: 999;
}

.ww-wedding-announcement img {
    max-height: 350px;
    width: auto;
}

@media (max-width: 480px) {
    .ww-wedding-announcement img {
        max-height: 250px;
        width: auto;
    }
}

.ww-home-title {
    font-size: 3rem;
}

@media (max-width: 576px) {
    .ww-home-title {
        font-size: 2rem;
    }
}

.ww-home-description {
    font-size: 1.3rem;
}

@media (max-width: 576px) {
    .ww-home-description {
        font-size: 1rem;
    }
}

.ww-home:before {
    content: "";
    background-color: rgba(245, 138, 119, 0.15);
    width: 100%;
    height: 100%;
    height: 100vh;
    min-height: 480px;
    position: absolute;
    left: 0;
    top: 0;
}

/* Countdown timer (originally css/jquery.countdown.css) */
ul#countdown {
    list-style: none;
    margin: 30px 0;
    padding: 0;
    display: block;
    text-align: center;
    font-family: "KoPub Dotum";
}

ul#countdown li {
    display: inline-block;
}

ul#countdown li span {
    font-size: 30px;
    font-weight: 500;
    line-height: 30px;
}

ul#countdown li.separator {
    font-size: 30px;
    line-height: 25px;
    vertical-align: top;
}

ul#countdown li p {
    color: #fff;
    font-size: 16px;
}


/* ============================================================
 * 8. Calendar
 * ============================================================ */
.ww-section-calendar {
    padding: 1.5rem 0;
    height: auto;
}

.ww-section-calendar img {
    display: block;
    margin: auto;
    width: 30%;
}

.ww-calendar {
    display: block;
    margin: auto;

    position: relative;
    width: 100%;
    max-width: 480px;
    background-color: #f8f9fa;
    box-sizing: border-box;
    overflow: hidden;
    padding: 1rem;
    border-radius: 10px;
}

.ww-calendar__header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.ww-calendar__date {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(7, minmax(25px, 1fr));
    grid-gap: 10px;
    box-sizing: border-box;

    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.ww-calendar__day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    font-weight: bold;
}

.ww-calendar__day:nth-child(1) { color: var(--red); }
.ww-calendar__day:nth-child(7) { color: var(--blue); }

.ww-calendar__number {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
}

.ww-calendar-prev,
.ww-calendar-next {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    color: #ccc;
}

.ww-calendar-current {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;

    background-color: #eda09f;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
}

.ww-calendar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1.5rem;
    text-align: center;
}


/* ============================================================
 * 9. Photo gallery — grid + lightbox
 *    그리드(.ww-gallery-grid)는 정사각 크롭 썸네일을 깐다.
 *    썸네일 클릭 시 .ww-lightbox 모달이 열리고 내부 Swiper
 *    (.ww-lightbox-swiper)가 자연 비율로 큰 사진을 보여준다.
 * ============================================================ */
.ww-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .ww-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ww-gallery-thumb {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
}

.ww-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ww-gallery-thumb:hover img,
.ww-gallery-thumb:focus img {
    transform: scale(1.05);
}

/* Lightbox */
.ww-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ww-lightbox[hidden] {
    display: none;
}

.ww-lightbox-close,
.ww-lightbox-prev,
.ww-lightbox-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ww-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-size: 1.75rem;
    line-height: 1;
}

.ww-lightbox-prev,
.ww-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.ww-lightbox-prev { left: 1rem; }
.ww-lightbox-next { right: 1rem; }

.ww-lightbox-prev svg,
.ww-lightbox-next svg {
    width: 1.5rem;
    height: 1.5rem;
}

.ww-lightbox-swiper {
    width: 100%;
    height: 100%;
}

.ww-lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ww-lightbox-swiper .swiper-slide img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}


/* ============================================================
 * 10. Map / transport
 * ============================================================ */
.ww-map-app {
    padding: 0 3rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ww-map-app a:hover {
    color: transparent;
}

.ww-transport-title {
    font-weight: bold;
}

.ww-transport-title > img {
    width: 32px;
    height: 32px;
    margin-left: 5px;
    margin-right: 5px;
}

.ww-transport {
    padding: 0 3rem;
    line-height: 2rem;
}


/* ============================================================
 * 11. Contact
 * ============================================================ */
.ww-section-contact {
    display: grid;
    grid-template-columns: auto auto;
    padding: 0 2rem;
}

.ww-contact-title-groom {
    color: #86c1e6;
    text-align: center;
}

.ww-contact-title-bride {
    color: #eda09f;
    text-align: center;
}

.ww-contact-name {
    text-align: center;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.ww-contact-icon {
    width: 48px;
    height: 48px;
    text-align: center;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}


/* ============================================================
 * 12. Footer
 * ============================================================ */
.ww-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0 1.5rem 0;
    text-align: center;
}

.ww-footer a.credit {
    color: inherit;
    border-bottom: 1px dashed;
    text-decoration: none;
    cursor: pointer;
}


/* ============================================================
 * 14. Scroll-triggered animations (AOS library replacement)
 *
 * Triggered by IntersectionObserver in js/main.js — when a
 * [data-aos] element scrolls into the viewport, the script adds
 * the .aos-animate class which transitions the element to its
 * final state.
 *
 * The page only uses data-aos="fade-up" with linear easing, so
 * we only support that combination. Other AOS effects would need
 * additional rules.
 * ============================================================ */
[data-aos] {
    opacity: 0;
    transition: opacity 800ms linear, transform 800ms linear;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: none;
}
