/* --- Font Imports & Body Styling --- */
@import url('https://fonts.googleapis.com/css2?family=Marck+Script&family=Patrick+Hand&display=swap');

body {
    background-color: #FAFAD2; /* Pale yellow (LightGoldenrodYellow) */
    font-family: 'Patrick Hand', cursive;
    color: #6b4c4c;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    width: 100%;
    position: relative;
    margin: 0 auto;
    background-image: url('https://stefftest.neocities.org/IMG_2763.JPG');
    background-repeat: repeat;
    background-size: 50%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    padding: 1px 20px 20px 20px;
    border-radius: 8px;
    box-sizing: border-box;
    padding-bottom: 80px;
}

.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
    position: relative;
}

/* --- Header --- */
.header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    height: 120px;
}

.header-logo {
    width: 300px;
    max-width: 80%;
    cursor: pointer;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

.header-decoration {
    position: absolute;
    top: 25px;
    right: 40px;
    width: 200px;
    transform: translate(-30%, 100%);
}

/* --- Main Content Layout --- */
.main-content {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 20px;
}

/* --- Left Navigation --- */
.nav-column {
    flex: 0 0 140px;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 65px;
    margin-left: 40px;
    margin-right: 20px;
}

.pincushion {
    width: 200px;
    margin-bottom: 15px;
    position: absolute;
    left: 90px;
    top: 55px;
    transform: none;
}

.nav-buttons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-buttons li {
    margin-bottom: 10px;
}

.nav-buttons a {
    display: block;
    background-color: #ffeff7;
    border: 2px solid #f2a4c8;
    border-radius: 50%;
    padding: 8px 10px;
    text-decoration: none;
    color: #e578a8;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.nav-buttons a:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.9), 2px 2px 5px rgba(0,0,0,0.1);
    color: #d16091;
}

/* --- Right Content Column --- */
.content-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

.big-ribbon {
    width: 150px;
    position: absolute;
    transform: translate(-45%, 220%) rotate(40deg);
    z-index: 11;
}

.content-box {
    position: relative;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.content-box.fading {
    opacity: 0;
}

.lace-border {
    border-style: solid;
    border-width: 28px;
    border-image-source: url('https://stefftest.neocities.org/IMG_2761.PNG');
    border-image-slice: 40 fill;
    border-image-repeat: round;
    padding: 15px;
    background-clip: padding-box;
    margin-top: 50px;
    height: auto;
}

#bottom-content.lace-border {
    transform: none;
    margin-left: auto;
    margin-right: auto;
    max-width: 810px;
}

.content-box .main-image {
    width: 100%;
    height: auto;
    display: block;
}

#top-content .main-image {
    padding: 0 20px;
}

.steffs-overlay {
    position: absolute;
    width: 250px;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 65%);
}

/* --- MODIFIED: Rules for background sections --- */
#middle-section-wrapper {
    padding: 60px 20px;
    background-image: url('https://stefftest.neocities.org/background2.JPG');
    background-position: top center;
    background-repeat: repeat;
    background-size: auto;
    position: relative;
    overflow: hidden;
}

#bottom-section-wrapper {
    background-image: url('https://stefftest.neocities.org/background3.JPG');
    padding: 60px 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.middle-section-container {
    position: relative;
    text-align: center;
}

.middle-section-container > .main-image:first-of-type { /* Two girls at the table */
    max-width: 70%;
    height: auto;
    display: block;
    margin: 20px auto;
    z-index: 2;
    position: relative;
}

.decoration-embellishment-img {
    position: absolute;
    width: 35%;
    max-width: 400px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.text-overlay {
    position: absolute;
    font-family: 'Marck Script', cursive;
    font-size: 7rem;
    color: #ff99c8;
    text-shadow: 3px 3px 0 #fff, 5px 5px 0 rgba(0,0,0,0.1);
    opacity: 0.9;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    z-index: 3;
}

.logo-sticker-img {
    position: absolute;
    width: 100px;
    top: 20px;
    right: 20px;
    z-index: 4;
}

.ribbon-img {
    position: absolute;
    width: 150px;
    bottom: 10px;
    left: 10px;
    transform: rotate(-15deg);
    z-index: 4;
}

/* --- Falling Notes Styles --- */
.notes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.note {
    position: absolute;
    opacity: 0;
    background-image: url('https://stefftest.neocities.org/musicnote.PNG');
    background-size: contain;
    background-repeat: no-repeat;
    animation: fall linear infinite;
}

.note:nth-child(1)  { left: 10%; animation-duration: 10s; animation-delay: 0s;  width: 40px; height: 40px; }
.note:nth-child(2)  { left: 20%; animation-duration: 8s;  animation-delay: 1s;  width: 25px; height: 25px; }
.note:nth-child(3)  { left: 30%; animation-duration: 12s; animation-delay: 2s;  width: 50px; height: 50px; }
.note:nth-child(4)  { left: 40%; animation-duration: 7s;  animation-delay: 3s;  width: 35px; height: 35px; }
.note:nth-child(5)  { left: 50%; animation-duration: 9s;  animation-delay: 4s;  width: 45px; height: 45px; }
.note:nth-child(6)  { left: 60%; animation-duration: 11s; animation-delay: 0.5s; width: 30px; height: 30px; }
.note:nth-child(7)  { left: 70%; animation-duration: 8s;  animation-delay: 1.5s; width: 40px; height: 40px; }
.note:nth-child(8)  { left: 80%; animation-duration: 13s; animation-delay: 2.5s; width: 20px; height: 20px; }
.note:nth-child(9)  { left: 90%; animation-duration: 6s;  animation-delay: 3.5s; width: 55px; height: 55px; }
.note:nth-child(10) { left: 5%;  animation-duration: 10s; animation-delay: 4.5s; width: 35px; height: 35px; }
.note:nth-child(11) { left: 85%; animation-duration: 9s;  animation-delay: 5s;  width: 40px; height: 40px; }
.note:nth-child(12) { left: 45%; animation-duration: 11s; animation-delay: 2s;  width: 25px; height: 25px; }
.note:nth-child(13) { left: 15%; animation-duration: 7s;  animation-delay: 1s;  width: 45px; height: 45px; }
.note:nth-child(14) { left: 75%; animation-duration: 10s; animation-delay: 3s;  width: 30px; height: 30px; }
.note:nth-child(15) { left: 65%; animation-duration: 8s;  animation-delay: 5s;  width: 50px; height: 50px; }

.lovely-day-section {
    text-align: center;
}

.floating-text {
    width: 260px;
    margin-bottom: 5px;
}

.hearts {
    font-size: 1.8rem;
    letter-spacing: 8px;
}

#bottom-content {
    background-color: #e0f5ff;
    padding: 20px;
}

#bottom-content .main-image {
    border: 8px solid white;
}

.bottom-logo-overlay {
    position: absolute;
    width: 200px;
    left: 30px;
    top: 30px;
}

.footer-elements {
    position: relative;
    height: 140px;
    margin-top: -10px;
}

.thank-you-text-img {
    width: 280px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

.teddy-bear {
    position: absolute;
    width: 120px;
    bottom: 0px;
    right: 30px;
}

/* === CALENDAR WIDGET STYLES === */
#calendar-widget-container {
    background-color: #ffeff7;
    border: 2px solid #f2a4c8;
    border-radius: 15px;
    padding: 10px;
    margin-top: 20px;
    font-size: 13px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    color: #d16091;
}

.month-nav {
    cursor: pointer;
    font-size: 1.4em;
    font-weight: bold;
    padding: 0 8px;
    user-select: none;
    transition: color 0.2s ease-in-out;
}

.month-nav:hover {
    color: #e578a8;
}

#month-year-display {
    font-weight: bold;
    font-size: 1.1em;
}

#calendar-grid table {
    width: 100%;
    border-collapse: collapse;
}

#calendar-grid th,
#calendar-grid td {
    text-align: center;
    padding: 4px 2px;
    width: 14.28%;
}

#calendar-grid thead th {
    color: #e578a8;
    font-weight: bold;
}

#calendar-grid .current-day {
    background-color: #f2a4c8;
    color: white;
    font-weight: bold;
    border-radius: 50%;
}

/******************************************/
/* === Animation Keyframes Section === */
/******************************************/

@keyframes fall {
    0% {
        opacity: 0.9;
        transform: translateY(-20vh) rotate(0deg);
    }
    100% {
        opacity: 0.9;
        transform: translateY(120vh) rotate(360deg);
    }
}

/******************************************/
/* === FINAL Mobile Responsive Section === */
/******************************************/

@media (max-width: 900px) {
    body {
        background-color: #fff;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 10px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .content-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Keep horizontal padding for the background sections on mobile */
    #middle-section-wrapper,
    #bottom-section-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .big-ribbon, .teddy-bear, .pincushion {
        display: none;
    }

    .notes-container {
       display: none; 
    }
    
    .header {
        height: auto;
        padding: 15px 5px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-bottom: 0;
    }

    .header-logo {
      position: static; 
      transform: none;
      order: 1;
      max-width: 130px;
      flex-shrink: 0;
    }

    .header-decoration {
      position: static;
      transform: none;
      order: 2;
      width: 110px;
      flex-shrink: 0;
    }
    
    .main-content {
        padding-left: 0;
    }

    .lace-border {
        max-width: 95%; 
        margin: 20px auto;
    }
    
    #bottom-content.lace-border {
        max-width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }

    .nav-column {
        width: 100%;
        max-width: 450px;
        margin-top: 15px;
        padding-top: 0;
        padding-bottom: 20px;
    }

    .content-column {
        width: 100%;
    }

    .nav-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .steffs-overlay {
        width: 180px;
    }

    .text-overlay {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header {
        gap: 5px;
    }

    .header-logo { max-width: 120px; }
    .header-decoration { width: 100px; }

    #top-content .main-image {
        padding: 0 10px;
    }
    
    .lace-border {
        border-width: 20px;
        border-image-slice: 30 fill;
        padding: 10px;
    }
    
    .text-overlay {
        font-size: 3.5rem;
        text-shadow: 2px 2px 0 #fff, 3px 3px 0 rgba(0,0,0,0.1);
    }
    
    .decoration-embellishment-img {
        width: 240px;
    }

    .floating-text {
        width: 200px;
    }
    
    .thank-you-text-img {
        width: 220px;
    }
}