/* =========================================================
   DIGITALNA POZIVNICA V8 — slaganje po slici: zaglavlje + sredina + dno
   ========================================================= */
:root {
    --wit-paper: #fff7e8;
    --wit-paper-soft: #fbf1df;
    --wit-gold: #b88742;
    --wit-gold-dark: #6b4a27;
    --wit-ink: #4b3927;
    --wit-muted: #725c45;
    --wit-line: rgba(166, 119, 55, .55);
    --wit-line-soft: rgba(166, 119, 55, .20);
    --wit-shadow: 0 24px 70px rgba(55, 35, 15, .14);
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100% !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(255,255,255,.9), transparent 28%),
        radial-gradient(circle at 95% 74%, rgba(174,126,57,.15), transparent 34%),
        linear-gradient(135deg, #f8ecd7, #e7cfaa) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    color: var(--wit-ink) !important;
}

.wit-hidden { display: none !important; }
.wit2-page { min-height: 100vh; padding: 22px 8px 46px; box-sizing: border-box; }
.wit2-shell { width: min(720px, 100%); margin: 0 auto; }

/* Otvaranje pozivnice */
.wit2-opening {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 18px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 50% 16%, rgba(255,255,255,.94), transparent 34%),
        linear-gradient(135deg, #fff1d8, #dec09a);
    transition: opacity .85s ease, transform .85s ease;
}
.wit2-opening.wit-closing { opacity: 0; transform: scale(1.02); pointer-events: none; }
.wit2-opening-card {
    width: min(430px, calc(100vw - 34px));
    aspect-ratio: 4/5;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        
         url('page-body.png') center / 100% auto no-repeat,
      
        linear-gradient(rgba(255,248,235,.96), rgba(255,248,235,.98));
    border: 1px solid var(--wit-line);
    box-shadow: var(--wit-shadow);
    perspective: 900px;
}
.wit2-opening-card::before {
    content:"";
    position:absolute;
    inset:16px;
    border:1px solid var(--wit-line-soft);
    pointer-events:none;
    z-index:2;
}
.wit2-opening-corner { display:none !important; }
.wit2-envelope-graphic { width:190px; height:136px; position:relative; z-index:6; margin-top:34px; transform-style:preserve-3d; transition:transform .7s ease; }
.wit2-envelope-paper { position:absolute; left:22px; right:22px; top:18px; height:92px; background:rgba(255,248,235,.96); border:1px solid var(--wit-line); transform:translateY(18px); transition:transform .8s ease .15s; }
.wit2-envelope-body { position:absolute; inset:48px 0 0; border:1px solid var(--wit-line); background:rgba(255,248,235,.84); box-shadow:0 16px 34px rgba(105,70,33,.12); border-radius:8px; }
.wit2-envelope-body::before, .wit2-envelope-body::after { content:""; position:absolute; top:0; width:135px; height:135px; border-top:1px solid var(--wit-line); }
.wit2-envelope-body::before { left:-1px; transform:rotate(35deg); transform-origin:top left; }
.wit2-envelope-body::after { right:-1px; transform:rotate(-35deg); transform-origin:top right; }
.wit2-envelope-flap { position:absolute; left:0; right:0; top:48px; height:94px; clip-path:polygon(0 0, 50% 68%, 100% 0); background:rgba(255,248,235,.9); border-top:1px solid var(--wit-line); transform-origin:top center; transition:transform .75s ease; z-index:3; }
.wit2-opening-card.opened .wit2-envelope-flap { transform: rotateX(180deg); }
.wit2-opening-card.opened .wit2-envelope-paper { transform: translateY(-38px); }
.wit2-opening-card.opened .wit2-envelope-graphic { transform: translateY(-8px) scale(.96); }
.wit2-opening-title { position:absolute; z-index:7; top:52px; margin:0; color:var(--wit-gold-dark); font-size:24px; letter-spacing:.4px; }
.wit2-open-btn { position:absolute; z-index:8; bottom:68px; left:50%; transform:translateX(-50%); min-width:215px; border:1px solid rgba(255,255,255,.55); border-radius:999px; background:linear-gradient(135deg,#d6b06b,#a06d2d 58%,#6d461c); color:#fff; padding:14px 24px; font:700 16px Georgia,"Times New Roman",serif; cursor:pointer; box-shadow:0 14px 32px rgba(101,67,29,.24); }
.wit2-open-btn:hover { filter: brightness(1.04); }
.wit-main-visible { animation: witFadeUp .75s ease both; }
@keyframes witFadeUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }

/* Glavna pozivnica */
.wit2-card {
    position: relative;
    overflow: hidden;
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 0 28px 52px;
    box-sizing: border-box;
    background:
         url('page-bottom-04.png') top center / 100% auto no-repeat,
         url('page-header-03.png') bottom center / 100% auto no-repeat,
        url('page-middle2-02.png') center -20px / 100% auto repeat-y,
        linear-gradient(rgba(255,248,235,.965), rgba(255,248,235,.985));
    border: 1px solid var(--wit-line);
    box-shadow: var(--wit-shadow);
    text-align: center;
}

.wit2-footer-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 180px;
    margin-top: -4px;
    padding: 0;
    line-height: 0;
    overflow: visible !important;
}

.wit2-footer-img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 180px;
    object-fit: contain;
    object-position: bottom center;
}


.wit2-card::before {
    content:"";
    position:absolute;
    left:30px;
    right:30px;
    top:28px;
    bottom:28px;
    border-left:1px solid var(--wit-line-soft);
    border-right:1px solid var(--wit-line-soft);
    pointer-events:none;
    z-index:1;
}
.wit2-card::after {
    content:"";
    position:absolute;
    left:44px;
    right:44px;
    top:42px;
    bottom:42px;
    border-left:1px solid rgba(166,119,55,.16);
    border-right:1px solid rgba(166,119,55,.16);
    pointer-events:none;
    z-index:1;
}
.wit2-card > * { position:relative; z-index:5; }
.wit2-line, .wit2-corner { display:none !important; }

.wit2-header { width:100%; height:auto; margin:0 auto 0; display:block; pointer-events:none; }
.wit2-header-motif { width:100%; height:auto; display:block; opacity:0; visibility:hidden; }

.wit2-text-block { width:min(540px, 88%); margin:18px auto 18px; }
.wit2-text-block h1 {
    margin:0 0 18px;
    color:var(--wit-gold-dark);
    font-weight:400;
    font-size:clamp(29px, 5.1vw, 42px);
    line-height:1.08;
    margin-top: 100px;
}
.wit2-text-block p {
    margin:0 auto 16px;
    color:var(--wit-ink);
    font-size:clamp(15px, 2.45vw, 18px);
    line-height:1.68;
}
.wit2-divider { width:min(380px, 70%); height:1px; margin:24px auto; background:linear-gradient(to right, transparent, var(--wit-line), transparent); }
.wit2-divider span { display:block; width:11px; height:11px; margin:-6px auto 0; transform:rotate(45deg); border:1px solid var(--wit-gold); background:var(--wit-paper); }

.wit2-date-block p { margin:0 0 6px; color:var(--wit-ink); font-size:clamp(23px, 4vw, 32px); line-height:1.08; }
.wit2-date-block strong { display:block; color:var(--wit-gold-dark); font-weight:400; font-size:clamp(34px, 6.2vw, 50px); line-height:1.10; letter-spacing:.2px; }

.wit2-program { width:min(560px, 91%); margin:0 auto; }
.wit2-event {
    display:grid;
    grid-template-columns:90px 1fr;
    align-items:center;
    gap:16px;
    padding:18px 6px;
    border-top:1px solid var(--wit-line-soft);
}
.wit2-event:last-child { border-bottom:1px solid var(--wit-line-soft); }
.wit2-event-icon {
    width:76px;
    height:76px;
    opacity:.92;
    justify-self:center;
    filter: drop-shadow(0 6px 10px rgba(95,62,25,.08));
}
.wit2-event h2 { margin:0 0 6px; color:var(--wit-gold-dark); font-weight:400; font-size:clamp(23px, 4vw, 32px); line-height:1.12; }
.wit2-event p { margin:0; color:var(--wit-ink); font-size:clamp(14px, 2.5vw, 18px); line-height:1.42; }
.wit2-event .wit2-time { color:var(--wit-gold-dark); font-size:clamp(17px, 3vw, 22px); margin-bottom:5px; }
.wit2-map { display:inline-block; margin-top:7px; color:var(--wit-gold-dark); font-size:14px; text-decoration:none; border-bottom:1px solid var(--wit-line); padding-bottom:2px; }

.wit2-countdown-block { margin:30px auto 0; width:min(560px, 91%); }
.wit2-countdown-block h2, .wit2-rsvp-panel h2, .wit2-seating h2 { margin:0 0 16px; color:var(--wit-gold-dark); font-weight:400; font-size:clamp(24px, 4.2vw, 34px); }
.wit2-countdown { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.wit2-countdown div { border:1px solid var(--wit-line-soft); border-radius:14px; background:rgba(255,255,255,.24); padding:12px 5px; }
.wit2-countdown strong { display:block; color:var(--wit-gold-dark); font-weight:400; font-size:clamp(24px, 4.2vw, 36px); line-height:1; }
.wit2-countdown span { display:block; margin-top:7px; color:var(--wit-muted); font-size:11px; letter-spacing:.7px; text-transform:uppercase; }
.wit-countdown-finished, .wit2-muted { color:var(--wit-muted); }

.wit2-seating { width:min(560px,91%); margin:30px auto 0; padding-top:22px; border-top:1px solid var(--wit-line-soft); }
.wit2-seating-list { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:9px; }
.wit2-seat-card { border:1px solid var(--wit-line-soft); border-radius:14px; padding:12px; background:rgba(255,255,255,.24); }
.wit2-seat-card strong, .wit2-seat-card span { display:block; }
.wit2-seat-card span { margin-top:5px; color:var(--wit-muted); }

.wit2-rsvp-panel { width:min(560px,91%); margin:34px auto 0; padding:22px 16px; border:1px solid var(--wit-line); border-radius:22px; background:rgba(255,250,241,.54); box-sizing:border-box; }
.wit2-success { margin:0 0 16px; padding:12px 14px; border:1px solid rgba(78,126,71,.34); border-radius:14px; background:rgba(237,248,232,.7); color:#365f30; }
.wit2-form { display:grid; gap:13px; }
.wit2-transport label { cursor:pointer; }
.wit2-people { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.wit2-person, .wit2-plus-one, .wit2-transport { border:1px solid var(--wit-line-soft); border-radius:16px; background:rgba(255,255,255,.24); padding:12px; text-align:left; }
.wit2-person { display:flex; align-items:center; gap:10px; }
.wit2-person span { font-size:15px; }
.wit2-plus-one { grid-column:1 / -1; }
.wit2-plus-one span { display:block; margin-bottom:8px; color:var(--wit-muted); }
.wit2-plus-one input, .wit2-form textarea { width:100%; box-sizing:border-box; border:1px solid var(--wit-line-soft); border-radius:14px; background:rgba(255,255,255,.38); padding:11px; color:var(--wit-ink); font:15px Georgia,"Times New Roman",serif; }
.wit2-form textarea { min-height:90px; resize:vertical; text-align:center; }
.wit2-transport { text-align:center; }
.wit2-transport h3 { margin:0 0 10px; color:var(--wit-gold-dark); font-weight:400; font-size:22px; }
.wit2-transport label { display:inline-flex; align-items:center; gap:7px; margin:4px 10px; }
.wit2-form button { justify-self:center; min-width:220px; border:1px solid rgba(255,255,255,.55); border-radius:999px; background:linear-gradient(135deg,#d6b06b,#a06d2d 58%,#6d461c); color:#fff; padding:14px 22px; font:700 15px Georgia,"Times New Roman",serif; cursor:pointer; box-shadow:0 12px 28px rgba(101,67,29,.20); }

@media (max-width:760px) {
    .wit2-page { padding:10px 5px 28px; }
    .wit2-card { padding-left:10px; padding-right:10px; padding-bottom:38px; }
    .wit2-card::before { left:18px; right:18px; top:18px; bottom:18px; }
    .wit2-card::after { left:24px; right:24px; top:24px; bottom:24px; }
    .wit2-text-block { width:86%; margin-top:10px; }
    .wit2-event { grid-template-columns:74px 1fr; gap:9px; padding:16px 0; }
    .wit2-event-icon { width:62px; height:62px; }
    .wit2-countdown { grid-template-columns:repeat(2, 1fr); }
    .wit2-people, .wit2-seating-list { grid-template-columns:1fr; }
}

@media (max-width:430px) {
    .wit2-opening-card { width:calc(100vw - 18px); }
    .wit2-opening-title { top:48px; font-size:21px; }
    .wit2-open-btn { bottom:54px; min-width:185px; }
    .wit2-text-block p { line-height:1.55; }
    .wit2-event h2 { font-size:25px; }
}
