/* Explain: Styling for various website components, including form validation states and animations. */
.site-header {
    background: transparent;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.4rem;
    height: 2px;
    background: currentColor;
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(18, 58, 94, 0.12);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.arch-frame::after {
    position: absolute;
    inset: 1.1rem;
    border: 1px solid rgba(18, 58, 94, 0.10);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.arch-frame-large {
    height: min(74vh, 720px);
    min-height: 500px;
    border-radius: 999px 999px 2.5rem 2.5rem;
}

.arch-frame-medium {
    height: 620px;
    max-width: 450px;
    border-radius: 999px 999px 2.1rem 2.1rem;
}

.floating-note {
    position: absolute;
    right: -1.5rem;
    bottom: 4rem;
    display: flex;
    max-width: 250px;
    align-items: center;
    gap: 0.85rem;
    border-radius: 999px;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 600;
}

.story-card {
    position: absolute;
    right: 0;
    bottom: 2.5rem;
    max-width: 290px;
    border-radius: 2rem;
    padding: 1.5rem;
}

.quiet-detail,
.amenity-row,
.contact-note {
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--surface-color);
    padding: 1.25rem;
}

.quiet-detail span {
    display: inline-flex;
    margin-bottom: 0.9rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
}

.quiet-detail p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.class-card {
    min-height: 360px;
    border-radius: 2.2rem;
    padding: 2rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.class-card:hover {
    border-color: rgba(255, 107, 53, 0.55);
    box-shadow: 0 26px 80px rgba(255, 107, 53, 0.12);
    transform: translateY(-6px);
}

.amenity-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
}

.amenity-dot {
    width: 0.8rem;
    height: 0.8rem;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: var(--accent-color);
    box-shadow: 0 0 0 0.45rem var(--terracotta-soft);
}

.amenity-image-wrap {
    height: 660px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 3rem 999px 999px 3rem;
    box-shadow: var(--shadow-soft);
}

.booking-form,
.booking-overlay-panel {
    border-radius: 2.4rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.form-label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-color);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-status {
    transition: all 0.3s ease;
}

.form-status.success {
    background-color: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #E8551F;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
}

.form-status.error {
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
}

.mobile-book-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.94);
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(18px);
}

.booking-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    overflow-y: auto;
    background: rgba(14, 61, 99, 0.6);
    padding: 1rem;
}

.booking-overlay.is-open {
    display: block;
}

.booking-overlay-panel {
    min-height: calc(100vh - 2rem);
    background: var(--surface-color);
    box-shadow: 0 30px 90px rgba(16, 61, 99, 0.25);
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-large,
    .arch-frame-medium,
    .amenity-image-wrap {
        height: 510px;
        min-height: 0;
    }

    .arch-frame-large {
        margin-right: auto;
        margin-left: auto;
        width: min(100%, 450px);
    }

    .floating-note,
    .story-card {
        position: relative;
        right: auto;
        bottom: auto;
        margin: -2.5rem auto 0;
    }

    .amenity-image-wrap {
        border-radius: 999px 999px 2rem 2rem;
    }
}

.gallery-swiper .swiper-pagination-bullet {
    background: var(--text-muted);
    opacity: 0.5;
}
.gallery-swiper .swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
}
.gallery-swiper-next, .gallery-swiper-prev {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s;
}
.gallery-swiper-next:hover, .gallery-swiper-prev:hover {
    background: var(--glass-bg);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.aurum-badge {
    animation: badgeGlow 4s ease-in-out infinite;
}

@keyframes badgeGlow {
    0% { filter: drop-shadow(0 0 6px rgba(212,175,55,0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(212,175,55,0.9)); }
    100% { filter: drop-shadow(0 0 6px rgba(212,175,55,0.4)); }
}

.ai-btn-ring {
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: conic-gradient(from 0deg, transparent 0%, rgba(255, 107, 53, 0.95) 25%, transparent 45%);
    animation: aiRingSpin 3.2s linear infinite;
    opacity: 0.9;
}

.ai-btn-ring::after {
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: var(--surface-color);
    content: "";
}

#aiChatBtn:hover .ai-btn-ring {
    animation-duration: 1.4s;
}

@keyframes aiRingSpin {
    to { transform: rotate(360deg); }
}

.ai-message-content a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}
.ai-message-content a:hover {
    color: var(--primary-hover);
}
.ai-typing-dot {
    animation: aiTyping 1.4s infinite ease-in-out both;
}
.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes aiTyping {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* FAQ – akordeon: istaknuto otvoreno pitanje, glatka animacija i jasna strelica */
.faq-item {
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:has(input:checked) {
    border-color: var(--accent-color);
    box-shadow: 0 18px 50px rgba(212, 175, 55, 0.12);
}

.faq-item input:checked ~ .faq-question {
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

.faq-item input:focus-visible ~ .faq-question {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* Glatko otvaranje i zatvaranje odgovora */
.faq-item .collapse-content {
    transition: grid-template-rows 0.35s ease, padding-top 0.35s ease, padding-bottom 0.35s ease;
}

.faq-item .collapse-content p {
    transition: opacity 0.3s ease;
}

/* Izražena, rotirajuća strelica – usmjerena dolje kad je pitanje zatvoreno */
.faq-item.collapse-arrow > .collapse-title::after {
    width: 0.65rem;
    height: 0.65rem;
    border-color: var(--accent-color);
    border-width: 0 2px 2px 0;
    transition: transform 0.35s ease, border-color 0.3s ease;
}

.faq-item.collapse-arrow > input:checked ~ .collapse-title::after {
    transform: translateY(-30%) rotate(45deg);
    border-color: var(--primary-hover);
}

/* Hero logo – lagana 3D rotacija bez ikakvog zrcaljenja znaka */
.logo3d-wrap {
    perspective: 1400px;
    perspective-origin: 50% 50%;
}

.logo3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: logo3dSpin 20s linear infinite;
    will-change: transform;
}

/* Sjena prebačena na statični pseudo-element radi performansi (uklonjen skupi filter s rotirajućih slika) */
.logo3d::after {
    content: "";
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    filter: blur(30px);
    transform: translateZ(-20px);
}

.logo3d-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Uklonjen filter: drop-shadow za glatko renderiranje bez preopterećenja procesora */
}

.logo3d-face-back {
    transform: rotateY(180deg) translateZ(1px);
}

@keyframes logo3dSpin {
    from {
        transform: rotateY(0deg) translate3d(0, 0, 0);
    }
    to {
        transform: rotateY(360deg) translate3d(0, 0, 0);
    }
}

.price-validity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.35;
    color: var(--text-muted);
}

.price-validity i {
    color: var(--accent-color);
    font-size: 0.72rem;
}

@media (prefers-reduced-motion: reduce) {
    .logo3d {
        animation: none !important;
        transform: none !important;
    }

    .logo3d::after {
        display: none !important;
    }

    .logo3d-face-back {
        display: none !important;
    }
}

/* Validacija obrazaca – jasna poruka neposredno uz neispravno polje */
.field-error-message {
    margin-top: 0.5rem;
    padding-left: 0.7rem;
    border-left: 2px solid #ff6b6b;
    color: #ff9d9d;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
}

.form-field-invalid {
    border-color: #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.07) !important;
}

.form-field-invalid:focus {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.3) !important;
}

input[type="checkbox"].form-field-invalid {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}



