/* layout.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
}

.page-background {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; 
    overflow-y: auto; 
}

/* --- Header --- */
.page-header {
    padding: 20px 20px 10px; 
    flex-shrink: 0;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.baby-name-svg-container {
    width: 100%;
    max-width: 480px; 
    margin: 0 auto 12px auto; 
    line-height: 0; 
}

#babyNameSvg {
    width: 100%;
    display: block;
}

.baby-name-animated {
    stroke-width: 1.5px; 
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200; 
    stroke-dashoffset: 1200; 
}

.header-submessage {
    max-width: 700px;
    margin: 0 auto 15px auto; 
}

/* --- Site Navigation --- */
.site-navigation {
    margin-top: 10px; 
    padding: 8px 0; 
    border-radius: 6px; 
    margin-bottom: 15px; 
}

.site-navigation a {
    margin: 0 10px; 
    padding: 7px 14px; 
    border-radius: 5px; 
    border: 1px solid transparent; 
    transition: transform 0.2s ease; 
}

.site-navigation a:hover,
.site-navigation a:focus {
    transform: translateY(-1px); 
}

/* --- Main Content Area --- */
.main-content-area {
    flex-grow: 1;
    padding: 20px 15px;        
    max-width: 850px;         
    width: 95%;               
    margin: 10px auto;        
    border-radius: 15px;
    overflow-y: visible; 
}

.content-section {
    margin-bottom: 25px; 
    padding-top: 25px;   
    padding-bottom: 15px; 
}

.content-section:first-child {
    margin-top: 0; 
    padding-top: 10px; 
    border-top: none; 
}

.content-section:last-child {
    margin-bottom: 0; 
    padding-bottom: 10px; 
}

.section-heading {
    margin-top: 0; 
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon {
    margin-right: 10px;
    font-size: 0.8em;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
}

#registry-section .section-heading::after,
#baby-growth-info-section .section-heading::after,
#countdown-section .section-heading::after,
#share-section .section-heading::after {
    width: 100px;
}

.section-message {
    max-width: 580px; 
    margin: 20px auto; 
    padding: 18px; 
    background-color: rgba(248, 245, 252, 0.75); 
    border-radius: 8px; 
    border: 1px solid rgba(220, 210, 240, 0.4); 
    box-shadow: 0 2px 4px rgba(90,77,123,0.06); 
}

/* --- Countdown --- */
.countdown-due-date {
    margin-bottom: 18px;
}

#countdown {
    display: flex;
    justify-content: space-around;
    align-items: baseline;
    gap: 15px;
    margin: 15px auto 0;
    padding: 15px 10px;
    border-radius: 10px;
}

#countdown div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 65px;
    padding: 10px 0;
}

#countdown span { 
    margin-bottom: 5px;
    display: inline-block;
    min-width: 1.8em; 
    position: relative;
}

/* --- Registry & Buttons --- */
.registry-buttons {
    margin-top: 10px;
    margin-bottom: 15px;
}

.button { 
    display: inline-block;
    padding: 12px 28px;
    border-radius: 25px;
    margin: 8px 6px;
    border: none; 
    position: relative; 
    overflow: hidden;   
    transition: transform 0.35s ease-out; 
}

.button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%; 
    width: 100%;
    height: 100%;
    transition: left 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.button:hover, .button:focus {
    transform: translateY(-2px) scale(1.02); 
    outline: none; 
}

.button:hover::before,
.button:focus::before {
    left: 100%; 
}

/* Share Button Container & Button Styling */
.share-button-container {
    margin-top: 15px;
    text-align: center;
}

#share-button {
    display: none; /* Button is hidden by default */
}

#share-button:hover {
    cursor: pointer;
}

/* Modal Styles */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.modal-content-box {
    background-color: #fff;
    color: #333;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
    font-size: 1.1em;
    font-family: 'Montserrat', sans-serif;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content-box {
    transform: scale(1);
}

/* --- Footer --- */
.page-footer {
    padding: 35px 20px;
    margin-top: auto;
    flex-shrink: 0;
    border-top: none; 
    width: 100%;
}

.page-footer p { 
    margin: 0;
}

.page-footer p .heart-icon { 
    margin-left: 0.25em; 
}
