/* =========================================================
   PALETA - zimska, plavo-siva (prema slici)
   ========================================================= */
:root {
    --naslov-color: #3b4760;   /* navy - tekst u inputima, dugmad */
       --slate:        #585f6a;
    --slate-dark:   #505760;
    --slate-light:  #606773;
    --ice:          #c9d6e4;
    --ice-soft:     #e8eef5;
    --bijela:       #ffffff;

    /* GRADIJENT KRUGOVA TAJMERA - osnova je plavo-siva sa slike */
    --krugovi-boja: linear-gradient(180deg, #9aa5b9 0%, #56627a 100%);
}

::-webkit-scrollbar { display: none; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    touch-action: pan-x pan-y;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-y: scroll;
    scrollbar-width: none;
    background-color: var(--ice-soft);
    display: flex;
    justify-content: center;
    touch-action: pan-y;
}

/* Blokada skrola dok je koverta tu */
body.stop-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100vh;
}


/* =========================================================
   KOVERTA
   ========================================================= */
#overlay-pocetni {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #f7f8fa;
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#koverta-video-wrapper {
    position: relative;
    width: 100vw;
    max-width: 450px;
    height: 100%;
    height: 100dvh;
}

#video-koverta {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#koverta-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    pointer-events: none;
}

.klik-zona {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 10000000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sakrij-uvertiru {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}


/* =========================================================
   KONTEJNER
   ========================================================= */
.phone-container {
    width: 100vw;
    max-width: 450px;
    background-color: var(--bijela);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}


/* =========================================================
   GLAVNA SLIKA + ZONE
   ---------------------------------------------------------
   Pozicije u % visine slike. Otvori stranicu sa ?debug
   na kraju linka i pomjeraj brojeve dok crvene zone ne
   legnu tačno na dugmad sa slike.
   ========================================================= */
.section-1 {
    position: relative;
    width: 100%;

    --kalendar-top:  29.4%;   /* "Dodaj u kalendar"              */
    --mapa1-top:     44.5%;   /* Skup svatova - Otvori mapu      */
    --mapa2-top:     52.8%;   /* Crkveno vjenčanje - Otvori mapu */
    --mapa3-top:     60.5%;   /* Proslava - Otvori mapu          */
    --tajmer-top:    70.1%;   /* SREDINA tamnog pojasa           */
    --galerija-top:  96.3%;   /* "Otvori Galeriju"               */
}

.glavna-slika {
    width: 100%;
    height: auto;
    display: block;
}

.zona {
    position: absolute;
    display: block;
    height: 1.3%;
    border-radius: 50px;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

.zona-kalendar { top: var(--kalendar-top); left: 18%; width: 64%; }
.zona-mapa     { left: 18%; width: 64%; }
.zona-mapa-1   { top: var(--mapa1-top); }
.zona-mapa-2   { top: var(--mapa2-top); }
.zona-mapa-3   { top: var(--mapa3-top); }
.zona-galerija { top: var(--galerija-top); left: 27%; width: 46%; }

/* DEBUG - vidljive zone (index.html?debug) */
body.debug .zona   { background: rgba(255, 0, 0, 0.35); outline: 1px dashed red; }
body.debug .tajmer { outline: 1px dashed red; }


/* =========================================================
   KALENDAR MENI
   ========================================================= */
.calendar-options {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    z-index: 99999;
    overflow: hidden;
}

.calendar-options.show-menu { display: block; }

.calendar-options a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    -webkit-tap-highlight-color: transparent;
}

.calendar-options a img {
    width: 20px;
    height: auto;
    margin-right: 12px;
}


/* =========================================================
   TAJMER (isti izgled kao ranije, sjedi u tamnom pojasu)
   ========================================================= */
.tajmer {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--tajmer-top);
    transform: translateY(-50%);
    z-index: 8;
    text-align: center;
    pointer-events: none;
}

.tajmer h1 {
    text-align: center;
    color: var(--bijela);
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#time {
    display: flex;
    gap: 7px;
    justify-content: center;
}

/* GLAVNI BROJ za veličinu kruga - isti broj upiši i u .label-box */
#time .circle {
    position: relative;
    width: 67px;
    height: 67px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--krugovi-boja);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* "kanal" u kojem leži bijela linija */
#time .circle svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(270deg);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

#time .circle svg circle {
    fill: transparent;
    stroke-width: 2.5;
    stroke: #fff;
    stroke-linecap: round;
    stroke-dasharray: 207;
    stroke-dashoffset: 207;
}

#time .broj {
    position: relative;
    z-index: 2;
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    line-height: 1;
}

.labels-container {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    width: 100%;
}

.label-box {
    width: 67px;
    text-align: center;
}

.label-box h3 {
    color: var(--bijela);
    font-family: 'Libre Baskerville', serif;
    font-size: 13px;
    margin-top: 5px;
}

@media (min-width: 428px) {
    #time .circle { width: 85px; height: 85px; }
    .label-box    { width: 85px; }
    #time .broj   { font-size: 20px; }
}


/* =========================================================
   RSVP
   ---------------------------------------------------------
   Razmaci separatora su u % ŠIRINE ekrana, pa se ponašaju
   isto na malim i velikim telefonima (slike se skaliraju
   sa širinom, pa i razmak mora).
   ========================================================= */
.rsvp-wrapper {
    width: 100%;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;

    --gornji-podizanje: 44%;  /* koliko se gornje cvijeće podiže preko praznog dijela ispod galerije.
                                  Veći broj = cvijeće bliže galeriji */
    --gornji-preklop:   29%;  /* koliko gornje cvijeće ulazi u plavu RSVP pozadinu */
    --donji-preklop:    35%;  /* koliko donje cvijeće ulazi u plavu RSVP pozadinu */
}

.header-floral-box {
    position: relative;
    z-index: 1000;
    width: 100%;
    margin-top: calc(var(--gornji-podizanje) * -1);
    margin-bottom: calc(var(--gornji-preklop) * -1);
    line-height: 0;
    pointer-events: none;
}

.footer-floral-box {
    position: relative;
    z-index: 10;
    width: 100%;
    margin-top: calc(var(--donji-preklop) * -1);
    line-height: 0;
    pointer-events: none;
}

.header-floral-box img,
.footer-floral-box img {
    width: 100%;
    height: auto;
    display: block;
}

.section-rsvp {
    position: relative;
    z-index: 5;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: -1px 0;
}

.rsvp-container {
    width: 100%;
    background: radial-gradient(
        ellipse 90% 70% at 50% 45%,
        var(--slate-light) 0%,
        var(--slate) 55%,
        var(--slate-dark) 100%
    );

      background: radial-gradient(
        ellipse 90% 70% at 50% 45%,
        #606773 0%,     /* centar - najsvjetlija */
        #585f6a 55%,    /* prelazna nijansa */
        #505760 100%    /* ivice - najtamnija */
    );


    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--gornji-preklop) + 40px) 30px calc(var(--donji-preklop) + 40px);
    text-align: center;
}

.rsvp-content {
    width: 100%;
    max-width: 350px;
}

.rsvp-naslov {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #ffffff;
    font-size: 40px;
    letter-spacing: 0;
    line-height: 1.05;
    margin-bottom: 32px;
}

.rsvp-naslov-italic {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 34px;
    font-weight: 400;
    display: inline-block;
}

.rsvp-opis {
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 40px;
    letter-spacing: 0.1px;
    padding: 0 15px;
}

.datum-istaknuto {
    display: inline-block;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0.1px;
    margin-top: 5px;
    margin-bottom: 20px;
}

/* Inputi */
.input-group {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 22px;
}

.input-group input,
.companion-add-row input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #ffffff;
    border-radius: 12px;
    color: var(--naslov-color);
    text-align: center;
    padding: 11px 14px;
    outline: none;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 4vw, 16px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.input-group input:focus,
.companion-add-row input:focus {
    border-color: var(--ice);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.input-group input::placeholder,
.companion-add-row input::placeholder {
    font-family: 'Quicksand', sans-serif;
    color: var(--naslov-color);
    opacity: 0.75;
    text-align: center;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: var(--naslov-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Pratioci */
.companion-hint {
    color: #ffffff;
    opacity: 0.85;
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(13px, 3.8vw, 15px);
    line-height: 1.5;
    margin-bottom: 14px;
}

.companion-add-row {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 16px;
}

.companion-add-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
}

#add-companion-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1.5px solid #ffffff;
    color: #ffffff;
    border-radius: 12px;
    padding: 0 18px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(13px, 3.8vw, 15px);
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

#add-companion-btn:hover,
#add-companion-btn:active {
    background: #ffffff;
    color: var(--naslov-color);
}

.companion-list {
    list-style: none;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.companion-list:empty { margin: 0; }

.companion-list li {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 4vw, 16px);
    padding: 9px 16px;
    border-radius: 10px;
    word-break: break-word;
}

/* Radio dugmad */
.potvrda-group {
    margin: 10px 0 45px;
}

.potvrda-group p {
    color: white;
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: 18px;
    margin-bottom: 18px;
}

.radio-options {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: white;
    -webkit-tap-highlight-color: transparent;
}

.radio-label span {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 4.5vw, 18px);
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 18px;
    width: 18px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    position: relative;
    background: transparent;
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
}

.radio-label input:checked ~ .checkmark::after { display: block; }

/* Dugme */
.custom-rsvp-btn {
    display: block;
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 300px;
    margin: 30px auto 0;
    padding: 13px 0;
    background-color: #ffffff;
    color: var(--naslov-color);
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(16px, 4.5vw, 19px);
    letter-spacing: 0.2px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
}

.custom-rsvp-btn:disabled { opacity: 0.65; cursor: default; }


/* =========================================================
   POPUP
   ========================================================= */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: white;
    padding: 50px 25px;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    width: 380px;
    max-width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.popup-content h3 {
    font-family: 'Source Serif 4', serif;
    font-size: 24px;
    color: #333;
    margin: 15px 0 8px;
    line-height: 1.2;
}

.popup-content p {
    font-family: 'Source Serif 4', serif;
    font-size: 16px;
    color: #666;
    white-space: nowrap;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.checkmark-svg {
    width: 60px;
    height: 60px;
    display: block;
    stroke-width: 3;
    stroke: var(--slate);
    fill: none;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-miterlimit: 10;
    animation: strokeAnim 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: strokeAnim 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes strokeAnim {
    to { stroke-dashoffset: 0; }
}


/* =========================================================
   MUTE DUGME
   ========================================================= */
#mute-kontrola {
    position: fixed;
    bottom: 40px;
    left: max(15px, calc(50vw - 215px));
    width: 45px;
    height: 45px;
    background: var(--krugovi-boja);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#mute-kontrola svg {
    display: block;
    width: 24px;
    height: 24px;
}


/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    background: white;
    font-size: 14px;
}


/* =========================================================
   MALI EKRANI
   ========================================================= */
@media (max-width: 340px) {
    .rsvp-naslov { font-size: 30px; }
    .rsvp-naslov-italic { font-size: 28px; }
    .rsvp-opis { font-size: 16px; }
    .input-group input { font-size: 15px; }
}

@media (max-width: 320px) {
    #time .circle { width: 60px; height: 60px; }
    .label-box    { width: 60px; }
    #time .broj   { font-size: 15px; }
    .companion-add-row input,
    #add-companion-btn { font-size: 14px; }
}

@media (max-width: 240px) {
    .rsvp-container { padding-left: 10px; padding-right: 10px; }
    .radio-options { gap: 15px; }
    .checkmark { margin-right: 5px; }
}


#time .circle {
    position: relative;
    width: 67px;
    height: 67px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;

    /* bijela unutrašnjost + svijetlo siva "staza" ispod linije */
    background: radial-gradient(circle closest-side,
        #ffffff 84.5%,
        #e4e9ef 84.5% 91.5%,
        #ffffff 91.5%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#time .circle svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(270deg);
}

#time .circle svg circle {
    fill: transparent;
    stroke-width: 2.5;
    stroke: #5a6d84;          /* linija koja se puni */
    stroke-linecap: round;
    stroke-dasharray: 207;
    stroke-dashoffset: 207;
}

#time .broj {
    position: relative;
    z-index: 2;
    color: #5a6d84;           /* brojevi u istoj boji kao linija */
    font-weight: 600;
    font-size: 17px;
    line-height: 1;
}