/* Explain: Styles for various UI components, including the AI chat widget. */
.site-header {
    background: linear-gradient(180deg, rgba(250, 249, 246, 0.9), rgba(250, 249, 246, 0.6));
    backdrop-filter: blur(18px);
}

.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: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(250, 249, 246, 0.82), rgba(255, 255, 255, 0.5));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.country-media {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--glass-border);
    border-radius: 2.4rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.hero-media {
    max-width: 560px;
    margin-right: auto;
    margin-left: auto;
}

.floating-note {
    position: absolute;
    right: -1.5rem;
    bottom: 3rem;
    display: flex;
    max-width: 260px;
    align-items: center;
    gap: 0.85rem;
    border-radius: 999px;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.55);
    padding: 2rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.service-card:hover {
    border-color: rgba(108, 92, 224, 0.45);
    box-shadow: 0 26px 80px rgba(31, 46, 35, 0.11);
    transform: translateY(-6px);
}

.service-icon {
    display: inline-flex;
    width: 3.2rem;
    height: 3.2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-size: 1.35rem;
}

.country-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 1.8rem;
    background: rgba(255, 255, 255, 0.55);
    padding: 1.6rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.country-card:hover {
    border-color: rgba(108, 92, 224, 0.45);
    box-shadow: 0 20px 60px rgba(31, 46, 35, 0.1);
    transform: translateY(-4px);
}

.process-step {
    border: 1px solid var(--glass-border);
    border-radius: 1.8rem;
    background: rgba(250, 249, 246, 0.62);
    padding: 1.75rem;
}

.process-number {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.sector-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--sage-soft);
    padding: 0.35rem 0.9rem;
    color: var(--sage-dark);
    font-size: 0.74rem;
    font-weight: 600;
}

.legal-card {
    border: 1px solid var(--glass-border);
    border-radius: 2.2rem;
    background: linear-gradient(145deg, rgba(250, 249, 246, 0.88), rgba(241, 244, 235, 0.72));
    box-shadow: var(--shadow-soft);
    padding: clamp(1.6rem, 4vw, 2.6rem);
    backdrop-filter: blur(18px);
}

.legal-number {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 6vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.form-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.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-status.success {
    color: #35603E;
}

.form-status.error {
    color: #9B4A3D;
}

.contact-note {
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: rgba(250, 249, 246, 0.6);
    padding: 1.25rem;
}

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

    .floating-note {
        position: relative;
        right: auto;
        bottom: auto;
        margin: -1.75rem auto 0;
    }
}

.quote-step {
    display: none;
}

.quote-step.is-active {
    display: block;
}

.quote-progress {
    position: relative;
    overflow: hidden;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--sage-soft);
}

.quote-progress-bar {
    display: block;
    height: 100%;
    width: 33.3333%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-color), var(--sage-dark));
    transition: width 320ms ease;
}

.quote-check-list {
    display: grid;
    gap: 0.85rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.quote-check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.faq-item {
    border: 1px solid var(--glass-border);
    border-radius: 1.8rem;
    background: rgba(250, 249, 246, 0.62);
    padding: 1.25rem 1.5rem;
    transition: border-color 300ms ease, box-shadow 300ms ease;
}

.faq-item[open] {
    border-color: rgba(108, 92, 224, 0.45);
    box-shadow: 0 20px 60px rgba(31, 46, 35, 0.08);
    background: var(--surface-color);
}

.faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    list-style: none;
    cursor: pointer;
    outline: none;
}

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

.faq-summary:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 1.8rem;
}

.faq-chevron {
    transition: transform 320ms ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.ai-chat-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.85rem;
}

.ai-chat-panel {
    display: none;
    flex-direction: column;
    width: min(92vw, 22rem);
    max-height: min(72vh, 34rem);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: linear-gradient(150deg, rgba(251, 250, 255, 0.98), rgba(243, 241, 252, 0.95));
    box-shadow: 0 30px 80px rgba(36, 31, 61, 0.22);
    backdrop-filter: blur(18px);
}

.ai-chat-panel.is-open {
    display: flex;
}

.ai-chat-toggle {
    display: inline-flex;
    width: 3.6rem;
    height: 3.6rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--sage-dark));
    color: #ffffff;
    font-size: 1.4rem;
    box-shadow: var(--shadow-button);
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.ai-chat-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(108, 92, 224, 0.4);
}

.ai-chat-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.ai-chat-toggle-icon-open {
    display: inline-flex;
}

.ai-chat-toggle-icon-close {
    display: none;
}

.ai-chat-widget.is-open .ai-chat-toggle-icon-open {
    display: none;
}

.ai-chat-widget.is-open .ai-chat-toggle-icon-close {
    display: inline-flex;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--sage-dark));
    color: #ffffff;
}

.ai-chat-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.ai-chat-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.82);
}

.ai-chat-close {
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transition: background 300ms ease;
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

.ai-chat-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 12rem;
    overflow-y: auto;
    padding: 1rem;
}

.ai-chat-msg {
    display: flex;
}

.ai-chat-msg-user {
    justify-content: flex-end;
}

.ai-chat-msg-bot {
    justify-content: flex-start;
}

.ai-chat-bubble {
    max-width: 85%;
    margin: 0;
    padding: 0.65rem 0.9rem;
    border-radius: 1.1rem;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-chat-msg-bot .ai-chat-bubble {
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 0.3rem;
    background: var(--surface-color);
    color: var(--text-color);
}

.ai-chat-msg-user .ai-chat-bubble {
    border-bottom-right-radius: 0.3rem;
    background: var(--primary-color);
    color: #ffffff;
}

.ai-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.ai-chat-typing span {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--text-muted);
    animation: aiChatBounce 1s infinite ease-in-out;
}

.ai-chat-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.ai-chat-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes aiChatBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.ai-chat-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.6);
}

.ai-chat-input {
    flex: 1;
    min-width: 0;
    min-height: 2.6rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--field-bg);
    padding: 0 1rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.ai-chat-send {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    transition: background 300ms ease;
}

.ai-chat-send:hover {
    background: var(--sage-dark);
}

.ai-chat-send:disabled {
    opacity: 0.55;
}