/* ============================================
   FAQ HERO — Dark Premium Section
   ============================================ */
.faq-hero-dark {
    background: #1e2e28;
    padding: clamp(40px, 5vh, 60px) clamp(24px, 3vw, 60px) clamp(40px, 5vh, 60px);
    min-height: calc(100vh - var(--header-height) - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.faq-hero-dark::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 70% 60% at 0% 0%, rgba(125, 170, 152, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 100% 100%, rgba(125, 170, 152, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.faq-hero-dark::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 170, 152, 0.25), transparent);
    pointer-events: none;
}

.faq-hero-dark-inner {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    text-align: left;
    position: relative;
    z-index: 2;
}

.faq-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 24px;
}

.faq-hero-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #7daa98;
}

.faq-hero-dark h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin: 0 0 18px;
}

.faq-hero-dark p {
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 40px;
    font-weight: 450;
}

@media screen and (max-width: 768px) {
    .faq-hero-dark { padding: 32px 20px 40px; min-height: calc(100vh - var(--header-height) - 36px); }
    .faq-hero-dark h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
    .faq-hero-dark p { max-width: 100%; }
}

/* ============================================
   FAQ LAYOUT - Premium Vertical Stack
   ============================================ */
.faq-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 24px;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    padding: clamp(48px, 6vh, 72px) 0 clamp(60px, 8vh, 100px);
}

.faq-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(61, 79, 74, 0.12);
    border-radius: 0;
    overflow: visible;
    transition: border-color 0.3s ease;
    padding: 0;
}

.faq-item:first-child {
    border-top: 1px solid rgba(61, 79, 74, 0.12);
}

.faq-item:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(61, 79, 74, 0.25);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1e2e28;
    list-style: none;
    position: relative;
    user-select: none;
    transition: all 0.25s ease;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 22px 48px 22px 0;
    margin: 0;
    line-height: 1.4;
}

.faq-item summary:hover {
    color: #3d4f4a;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d4f4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    font-size: 0;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item[open] summary {
    background: transparent;
    border: none;
    color: #3d4f4a;
}

.faq-answer {
    padding: 12px 0 22px;
    color: #4b5e58;
    line-height: 1.72;
    font-size: 0.96rem;
    max-width: 90%;
}

.faq-answer p {
    margin: 0 0 10px 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ============================================
   CHATBOT - Pearl Button Style (Header Position)
   ============================================ */

.chatbot-container {
    position: fixed;
    top: 1rem;
    right: 4rem;
    display: none !important;
    z-index: 99999;
    animation: chatbot-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 1.2s;
}

@keyframes chatbot-entrance {
    from { opacity: 0; transform: translateY(20px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot-toggle {
    --pearl-bg: #111111;
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 100px;
    background-color: var(--pearl-bg);
    border: 0;
    cursor: pointer;
    box-shadow:
        inset 0 0.3rem 0.9rem rgba(255, 255, 255, 0.3),
        inset 0 -0.1rem 0.3rem rgba(0, 0, 0, 0.7),
        inset 0 -0.4rem 0.9rem rgba(255, 255, 255, 0.5),
        0 1.5rem 2rem rgba(0, 0, 0, 0.25),
        0 0.5rem 0.8rem -0.4rem rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: translateY(-3px);
    box-shadow:
        inset 0 0.3rem 0.9rem rgba(255, 255, 255, 0.35),
        inset 0 -0.1rem 0.3rem rgba(0, 0, 0, 0.7),
        inset 0 -0.4rem 0.9rem rgba(255, 255, 255, 0.55),
        0 3.5rem 3.5rem rgba(0, 0, 0, 0.35),
        0 1.2rem 1.2rem -0.6rem rgba(0, 0, 0, 0.85);
}

/* Toggle button je uvijek vidljiv */

.chatbot-icon {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.95);
}

.chatbot-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, #3f514b, #2e3c37);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid #111;
}

/* ============================================
   CHATBOT WINDOW - Glassmorphism
   ============================================ */

.chatbot-window {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border: 1px solid rgba(61, 79, 74, 0.2);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overscroll-behavior: contain;
    z-index: 999999;
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ============================================
   CHATBOT HEADER
   ============================================ */

.chatbot-header {
    padding: 20px 24px;
    background: rgba(61, 79, 74, 0.08);
    border-bottom: 1px solid rgba(61, 79, 74, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.chatbot-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.chatbot-status {
    font-size: 0.75rem;
    color: #4ade80;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-primary);
    transition: all 0.2s ease;
    border-radius: 8px;
}

.chatbot-close:hover {
    background: rgba(61, 79, 74, 0.1);
    transform: rotate(90deg);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   CHATBOT MESSAGES
   ============================================ */

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(61, 79, 74, 0.05);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(61, 79, 74, 0.2);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(61, 79, 74, 0.3);
}

.chatbot-message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
    background: rgba(61, 79, 74, 0.08);
    color: #1f2937;
    border: 1px solid rgba(61, 79, 74, 0.1);
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
}

.bot-message .letter {
    display: inline;
    animation: letterFadeIn 0.25s ease-out forwards;
    opacity: 0;
}

@keyframes letterFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #3f514b, #2e3c37);
    color: white;
    box-shadow: 0 4px 12px rgba(61, 79, 74, 0.2);
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 16px 18px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: rgba(61, 79, 74, 0.4);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ============================================
   CHATBOT SUGGESTIONS
   ============================================ */

.chatbot-suggestions {
    padding: 0 24px 16px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chatbot-suggestion {
    padding: 8px 16px;
    background: rgba(61, 79, 74, 0.06);
    border: 1px solid rgba(61, 79, 74, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.chatbot-suggestion:hover {
    background: rgba(61, 79, 74, 0.12);
    border-color: rgba(61, 79, 74, 0.3);
    transform: translateY(-1px);
}

/* ============================================
   CHATBOT INPUT
   ============================================ */

.chatbot-input-wrapper {
    padding: 20px 24px;
    border-top: 1px solid rgba(61, 79, 74, 0.15);
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 16px 16px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(61, 79, 74, 0.2);
    border-radius: 24px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    color: #1f2937;
    outline: none;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.chatbot-input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(61, 79, 74, 0.1);
}

.chatbot-input::placeholder {
    color: rgba(31, 41, 55, 0.5);
}

.chatbot-send {
    --pearl-bg: #111111;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--pearl-bg);
    border: 0;
    cursor: pointer;
    box-shadow:
        inset 0 0.2rem 0.6rem rgba(255, 255, 255, 0.3),
        inset 0 -0.1rem 0.2rem rgba(0, 0, 0, 0.7),
        inset 0 -0.3rem 0.6rem rgba(255, 255, 255, 0.5),
        0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 0.2rem 0.6rem rgba(255, 255, 255, 0.35),
        inset 0 -0.1rem 0.2rem rgba(0, 0, 0, 0.7),
        inset 0 -0.3rem 0.6rem rgba(255, 255, 255, 0.55),
        0 0.6rem 1.2rem rgba(0, 0, 0, 0.35);
}

.chatbot-send:active {
    transform: translateY(0);
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   RESPONSIVE - Mobile First
   ============================================ */

@media (max-width: 900px) {
    .faq-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .faq-container {
        padding: 0 20px;
    }

    .faq-grid {
        margin-top: 0;
        padding-top: 24px;
        gap: 16px;
    }

    .faq-item {
        padding: 0;
        overflow: visible;
    }

    .faq-item summary {
        padding: 20px 50px 20px 20px;
        font-size: 1rem;
        margin: 0;
    }

    .faq-item summary::after {
        right: 20px;
        width: 22px;
        height: 22px;
    }

    .faq-answer {
        padding: 8px 20px 20px 20px;
        font-size: 0.9rem;
    }

    .chatbot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 140px);
        top: 70px;
        right: 16px;
    }

    /* Mobile: chatbot-toggle 25px above whatsapp */
    .chatbot-container {
        top: auto;
        bottom: calc(12px + 48px + 25px);
        right: 16px;
    }

    .chatbot-toggle {
        width: 48px;
        height: 48px;
    }

    .chatbot-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .faq-container {
        padding: 0 16px;
    }

    .faq-grid {
        padding-top: 16px;
    }

    .faq-item {
        padding: 0;
        overflow: visible;
    }

    .faq-item summary {
        padding: 18px 48px 18px 16px;
        font-size: 0.95rem;
        margin: 0;
    }

    .faq-item summary::after {
        right: 16px;
        width: 20px;
        height: 20px;
    }

    .faq-answer {
        padding: 8px 16px 18px 16px;
        font-size: 0.875rem;
    }

    .chatbot-window {
        top: 60px;
        height: calc(100vh - 100px);
        right: 12px;
        width: calc(100vw - 24px);
    }

    /* Mobile: chatbot-toggle 25px above whatsapp */
    .chatbot-container {
        top: auto;
        bottom: calc(12px + 48px + 25px);
        right: 16px;
    }

    .chatbot-toggle {
        width: 48px;
        height: 48px;
    }

    .chatbot-icon {
        width: 20px;
        height: 20px;
    }

    .chatbot-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .chatbot-header {
        padding: 16px 20px;
    }

    .chatbot-header-info h3 {
        font-size: 1rem;
    }

    .chatbot-messages {
        padding: 20px;
        gap: 12px;
    }

    .chatbot-message {
        font-size: 0.875rem;
        padding: 12px 16px;
    }

    .chatbot-suggestions {
        padding: 0 20px 12px 20px;
    }

    .chatbot-suggestion {
        font-size: 0.8rem;
        padding: 7px 14px;
    }

    .chatbot-input-wrapper {
        padding: 16px 20px;
    }

    .chatbot-input {
        font-size: 0.875rem;
        padding: 10px 14px;
    }

    .chatbot-send {
        width: 40px;
        height: 40px;
    }

    .chatbot-send svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   FAQ LARGE SCREEN ENHANCEMENTS
   ============================================ */
@media screen and (min-width: 1440px) {
    .faq-hero-dark {
        padding: clamp(40px, 5vh, 60px) clamp(40px, 5vw, 80px) clamp(40px, 5vh, 60px);
    }

    .faq-hero-dark h1 {
        font-size: clamp(2.8rem, 3.5vw, 3.8rem);
    }

    .faq-hero-dark p {
        max-width: 660px;
    }

    .faq-item summary {
        font-size: 1.12rem;
        padding: 28px 60px 28px 28px;
    }

    .faq-answer {
        padding: 0 28px 28px;
        font-size: 1.02rem;
    }
}

@media screen and (min-width: 1920px) {
    .faq-hero-dark {
        padding: clamp(50px, 6vh, 70px) clamp(60px, 6vw, 100px) clamp(50px, 6vh, 70px);
    }

    .faq-hero-dark h1 {
        font-size: clamp(3.2rem, 4vw, 4.5rem);
    }

    .faq-hero-dark p {
        max-width: 740px;
        font-size: clamp(1.08rem, 1.2vw, 1.25rem);
    }

    .faq-item summary {
        font-size: 1.18rem;
        padding: 32px 64px 32px 32px;
    }

    .faq-answer {
        padding: 0 32px 32px;
        font-size: 1.06rem;
    }

    .faq-grid {
        gap: 16px;
    }
}
