/* ========================================
   WEDDING SITE - PUBLIC SHARED STYLES
   ======================================== */

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

:root {
    --ws-radius-sm: 4px;
    --ws-radius-md: 12px;
    --ws-radius-lg: 24px;
    --ws-shadow-card: 0 10px 40px -10px rgba(0,0,0,.08), 0 2px 8px -2px rgba(0,0,0,.04);
    --ws-shadow-hover: 0 20px 60px -10px rgba(0,0,0,.15), 0 4px 12px -2px rgba(0,0,0,.06);
    --ws-ease: cubic-bezier(.22,1,.36,1);
}

.ws-body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Decorative utility shapes that templates can position */
.ws-ornament {
    position: absolute;
    pointer-events: none;
    opacity: .55;
}

img { max-width: 100%; height: auto; display: block; }

.ws-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.ws-narrow { max-width: 720px; }
.ws-text-center { text-align: center; }
.ws-text-muted { color: rgba(0,0,0,0.5); }

/* ============== TYPOGRAPHY ============== */
.ws-section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}
.ws-section-subtitle {
    text-align: center;
    color: rgba(0,0,0,0.6);
    margin-bottom: 3rem;
    font-style: italic;
}

/* ============== SECTIONS ============== */
.ws-section {
    padding: 5rem 0;
    position: relative;
}
.ws-section:nth-child(odd) {
    background: var(--bg);
}
.ws-section:nth-child(even) {
    background: var(--accent);
}

/* ============== HERO ============== */
.ws-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-color: var(--secondary);
    position: relative;
    padding: 2rem;
}
.ws-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}
.ws-hero-content {
    position: relative;
    z-index: 2;
    animation: ws-fadeIn 1.2s ease;
}
.ws-hero-greeting {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}
.ws-hero-names {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 400;
}
.ws-hero-names .ws-hero-and {
    display: block;
    font-size: 0.6em;
    margin: 0.5rem 0;
    color: var(--primary);
    font-style: italic;
}
.ws-hero-date {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}
.ws-hero-place {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}
.ws-hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    animation: ws-bounce 2s infinite;
}

/* ============== BUTTONS ============== */
.ws-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 2px solid var(--primary);
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}
.ws-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
.ws-btn-outline {
    background: transparent;
    color: var(--primary);
}
.ws-btn-outline:hover {
    background: var(--primary);
    color: white;
}
.ws-btn-lg { padding: 1.1rem 2.5rem; font-size: 1rem; }
.ws-btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.ws-btn-block { display: block; width: 100%; text-align: center; }

/* ============== COUNTDOWN ============== */
.ws-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}
.ws-countdown-box {
    background: white;
    padding: 1.5rem 0.5rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}
.ws-countdown-num {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary);
    font-weight: 700;
    line-height: 1;
}
.ws-countdown-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0,0,0,0.5);
    margin-top: 0.5rem;
}

/* ============== STORY ============== */
.ws-story-text {
    font-size: 1.1rem;
    line-height: 1.9;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
    color: rgba(0,0,0,0.75);
}

/* ============== DETAILS ============== */
.ws-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.ws-detail-card {
    background: white;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
}
.ws-detail-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.ws-detail-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}
.ws-detail-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.ws-detail-time, .ws-detail-address {
    color: rgba(0,0,0,0.65);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.ws-detail-card .ws-btn { margin-top: 1rem; }

/* ============== RSVP FORM ============== */
.ws-rsvp-form {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}
.ws-form-group {
    margin-bottom: 1.5rem;
}
.ws-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--secondary);
}
.ws-form-group input,
.ws-form-group textarea,
.ws-form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    transition: border 0.2s;
}
.ws-form-group input:focus,
.ws-form-group textarea:focus,
.ws-form-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.ws-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.ws-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.ws-radio {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ws-radio input { margin: 0; width: auto; }
.ws-radio:has(input:checked) {
    border-color: var(--primary);
    background: rgba(212,165,116,0.08);
}
.ws-form-success {
    text-align: center;
    padding: 2rem;
    background: rgba(76,175,80,0.1);
    border-radius: 8px;
    color: #1b5e20;
}
.ws-form-success h3 { margin-bottom: 0.5rem; }

/* ============== GALLERY ============== */
.ws-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.ws-gallery-item {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
    cursor: pointer;
}
.ws-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.ws-gallery-item:hover img {
    transform: scale(1.08);
}

/* ============== DRESSCODE ============== */
.ws-dresscode-card {
    background: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}
.ws-dresscode-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.ws-dresscode-code {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.ws-color-suggestions {
    margin-top: 2rem;
}
.ws-colors-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.ws-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* ============== GIFTS ============== */
.ws-gift-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}
.ws-gift-card h3 {
    font-family: var(--font-heading);
    color: var(--secondary);
    margin-bottom: 1rem;
}
.ws-gift-card p { margin-bottom: 0.75rem; }
.ws-gift-card code {
    font-family: 'Courier New', monospace;
    background: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}
.ws-copy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--accent);
    border-radius: 6px;
    flex-wrap: wrap;
}

/* ============== FAQ ============== */
.ws-faq-list {
    max-width: 700px;
    margin: 0 auto;
}
.ws-faq-item {
    background: white;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
.ws-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ws-faq-item summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--secondary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ws-faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.2s;
}
.ws-faq-item[open] summary::after {
    transform: rotate(45deg);
}
.ws-faq-item p {
    margin-top: 1rem;
    color: rgba(0,0,0,0.7);
    line-height: 1.7;
}

/* ============== PLAYLIST ============== */
.ws-playlist-list ul {
    list-style: none;
    padding: 0;
}
.ws-playlist-list li {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
}

/* ============== LOCATIONS ============== */
.ws-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}
.ws-location-card {
    background: white;
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}
.ws-location-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.ws-location-card h3 {
    font-family: var(--font-heading);
    color: var(--secondary);
    margin-bottom: 0.75rem;
}
.ws-location-address {
    color: rgba(0,0,0,0.6);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* ============== BRANDING ============== */
.ws-branding {
    text-align: center;
    padding: 1.5rem;
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}
.ws-branding a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

/* ============== MUSIC TOGGLE ============== */
.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.2s;
    animation: ws-spin 4s linear infinite paused;
}
.music-toggle.playing { animation-play-state: running; }
.music-toggle:hover { transform: scale(1.1); }

/* ============== ENVELOPE ANIMATION ============== */
.ws-envelope-wrapper {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--bg));
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s;
}
.ws-envelope-wrapper.opened {
    opacity: 0;
    pointer-events: none;
}
.ws-envelope {
    position: relative;
    width: 350px;
    max-width: 90vw;
    text-align: center;
}
.ws-envelope-flap {
    width: 100%;
    height: 130px;
    background: var(--primary);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transition: transform 0.8s;
    transform-origin: top;
}
.ws-envelope-wrapper.opened .ws-envelope-flap {
    transform: rotateX(180deg);
}
.ws-envelope-body {
    background: var(--secondary);
    padding: 3rem 2rem;
    color: white;
    border-radius: 0 0 8px 8px;
    margin-top: -2px;
}
.ws-envelope-card {
    background: white;
    color: var(--text);
    padding: 2rem;
    border-radius: 8px;
    font-family: var(--font-heading);
}
.ws-envelope-card h2 {
    font-size: 2rem;
    margin: 0.5rem 0;
    color: var(--secondary);
}
.ws-envelope-greeting {
    color: var(--primary);
    font-style: italic;
    margin-bottom: 0.5rem;
}
.ws-envelope-open {
    margin-top: 1.5rem;
    padding: 0.85rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

/* ============== ANIMATIONS ============== */
@keyframes ws-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ws-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 10px); }
}
@keyframes ws-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ws-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.ws-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
    .ws-section { padding: 3.5rem 0; }
    .ws-form-row { grid-template-columns: 1fr; }
    .ws-rsvp-form { padding: 1.5rem; }
    .ws-countdown-grid { gap: 0.5rem; }
    .ws-countdown-box { padding: 1rem 0.25rem; }
}

/* ============== LIGHTBOX ============== */
.ws-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.ws-lightbox.open {
    display: flex;
}
.ws-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}
.ws-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}
