/* ═══════════════════════════════════════════════════════════
   ARIMA — Custom Styles
   Premium institutional design system
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
    --arima-900: #0F3332;
    --arima-800: #174A48;
    --arima-700: #1D5C59;
    --arima-100: #F4F7F7;
    --gold-500: #B89B5E;
    --gold-400: #C9AF78;
    --gold-600: #A08545;
}

/* ── Smooth Scroll ────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ── Alpine.js cloak ──────────────────────────────────────── */
[x-cloak] {
    display: none !important;
}

/* ── Nav Links ────────────────────────────────────────────── */
.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--gold-500);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    color: #fff;
    padding-left: 0.5rem;
}

/* ── Gold CTA Button ─────────────────────────────────────── */
.btn-gold {
    background: var(--gold-500);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 1.75rem;
    border-radius: 0.375rem;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-gold:hover {
    background: var(--gold-600);
    box-shadow: 0 4px 20px rgba(184, 155, 94, 0.3);
    transform: translateY(-1px);
}

/* ── Hero Button Variants ────────────────────────────────── */
.btn-hero-primary {
    background: var(--gold-500);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.875rem 2.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-hero-primary:hover {
    background: var(--gold-600);
    box-shadow: 0 8px 32px rgba(184, 155, 94, 0.35);
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background: transparent;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.875rem 2.25rem;
    border-radius: 0.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-hero-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* ── Scroll Animation ─────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ── Hero Down Arrow ──────────────────────────────────────── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    50% {
        transform: translateY(12px) translateX(-50%);
    }
}

.hero-arrow {
    animation: float 2.5s ease-in-out infinite;
}

/* ── Service Cards ────────────────────────────────────────── */
.service-card {
    background: #fff;
    border: 1px solid #DCE5E4;
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--arima-800), var(--gold-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(15, 51, 50, 0.12);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-subitem {
    padding: 0.5rem 0;
    padding-left: 1.25rem;
    border-left: 2px solid #DCE5E4;
    font-size: 0.875rem;
    color: #4a5568;
    transition: all 0.3s ease;
}

.service-subitem:hover {
    color: var(--arima-800);
    border-left-color: var(--gold-500);
    padding-left: 1.5rem;
}

/* ── Methodology Timeline ─────────────────────────────────── */
.timeline-step {
    position: relative;
    text-align: center;
    flex: 1;
}

.timeline-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--arima-800);
    border: 3px solid var(--gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.timeline-step:hover .timeline-dot {
    background: var(--gold-500);
    transform: scale(1.15);
    box-shadow: 0 0 24px rgba(184, 155, 94, 0.4);
}

.timeline-line {
    position: absolute;
    top: 24px;
    left: calc(50% + 28px);
    right: calc(-50% + 28px);
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), rgba(184, 155, 94, 0.2));
    z-index: 1;
}

/* ── Team Carousel ────────────────────────────────────────── */
.team-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.team-card img {
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.5s ease;
}

.team-card:hover img {
    filter: grayscale(30%) contrast(1.1);
}

/* Swiper lateral fade */
.team-swiper {
    padding: 2rem 0 4rem;
    mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
}

.team-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.team-swiper .swiper-pagination-bullet-active {
    background: var(--gold-500);
    width: 28px;
    border-radius: 5px;
}

/* ── Contact Form ─────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-input:focus {
    border-color: var(--gold-500);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.15);
}

/* ── Section Label ────────────────────────────────────────── */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 0.75rem;
}

.section-label-light {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 0.75rem;
}

/* ── Responsive Mobile Methodology ────────────────────────── */
@media (max-width: 768px) {
    .timeline-line {
        display: none;
    }

    .timeline-container {
        flex-direction: column;
        gap: 2rem;
    }
}

/* ── Subtle Background Pattern ────────────────────────────── */
.bg-pattern {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(184, 155, 94, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(23, 74, 72, 0.05) 0%, transparent 50%);
}

/* ── Profile Overlay ──────────────────────────────────────── */
.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 51, 50, 0.95);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Dropdown Links ──────────────────────────────────────── */
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.dropdown-link:hover {
    background: var(--arima-100);
    color: var(--arima-800);
    padding-left: 1.5rem;
}

/* ── Alternating Section Background ──────────────────────── */
.section-alt {
    background:
        radial-gradient(circle at 20% 80%, rgba(184, 155, 94, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(23, 74, 72, 0.05) 0%, transparent 50%),
        #F9FAFB;
}

/* ═══════════════════════════════════════════════════════════
   DR. ACTUS — Chatbot Widget
   ═══════════════════════════════════════════════════════════ */

/* ── FAB (floating action button) ────────────────────────── */
.chatbot-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--arima-800), var(--arima-700));
    box-shadow: 0 6px 28px rgba(15, 51, 50, 0.45), 0 0 0 0 rgba(184, 155, 94, 0);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 36px rgba(15, 51, 50, 0.55), 0 0 0 6px rgba(184, 155, 94, 0.15);
}

.chatbot-fab--open {
    background: var(--arima-900);
    box-shadow: 0 4px 16px rgba(15, 51, 50, 0.3);
}

/* pulse ring on FAB */
.chatbot-fab::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--gold-500);
    opacity: 0;
    animation: chatbot-pulse 3s ease-out infinite;
}

.chatbot-fab--open::after {
    display: none;
}

@keyframes chatbot-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* ── Chat Window ─────────────────────────────────────────── */
.chatbot-window {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    z-index: 9998;
    width: 380px;
    max-height: min(600px, calc(100dvh - 8rem));
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--arima-900);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ── Header ──────────────────────────────────────────────── */
.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.125rem;
    background: linear-gradient(135deg, var(--arima-900), var(--arima-800));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* ── Remaining questions badge ───────────────────────────── */
.chatbot-remaining-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(184, 155, 94, 0.2);
    color: var(--gold-400);
    vertical-align: middle;
}

.chatbot-remaining--low {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

/* ── Body / Register ─────────────────────────────────────── */
.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.chatbot-register {
    display: flex;
    flex-direction: column;
}

.chatbot-register-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* ── Form Inputs (inside chatbot) ────────────────────────── */
.chatbot-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.8125rem;
    outline: none;
    transition: all 0.25s ease;
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.chatbot-input:focus {
    border-color: var(--gold-500);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.12);
}

/* ── Select Dropdowns (inside chatbot) ───────────────────── */
.chatbot-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 1.8rem;
    cursor: pointer;
}

.chatbot-select option {
    background: var(--arima-900);
    color: #fff;
}

.chatbot-select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Buttons ─────────────────────────────────────────────── */
.chatbot-btn-primary {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.chatbot-btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(184, 155, 94, 0.35);
    transform: translateY(-1px);
}

.chatbot-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Messages Area ───────────────────────────────────────── */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

/* ── Message Bubbles ─────────────────────────────────────── */
.chatbot-msg {
    display: flex;
    max-width: 88%;
}

.chatbot-msg--user {
    align-self: flex-end;
}

.chatbot-msg--bot {
    align-self: flex-start;
}

.chatbot-msg-bubble {
    padding: 0.625rem 0.875rem;
    border-radius: 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    word-break: break-word;
}

.chatbot-msg-bubble--user {
    background: var(--gold-500);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chatbot-msg-bubble--bot {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.88);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Markdown inside bot bubbles */
.chatbot-msg-bubble--bot h2,
.chatbot-msg-bubble--bot h3,
.chatbot-msg-bubble--bot h4 {
    font-weight: 600;
    margin: 0.6em 0 0.3em;
    color: var(--gold-400);
    font-size: 0.85rem;
}

.chatbot-msg-bubble--bot p {
    margin: 0.35em 0;
}

.chatbot-msg-bubble--bot ul,
.chatbot-msg-bubble--bot ol {
    padding-left: 1.2em;
    margin: 0.3em 0;
}

.chatbot-msg-bubble--bot li {
    margin: 0.15em 0;
}

.chatbot-msg-bubble--bot strong {
    color: #fff;
}

.chatbot-msg-bubble--bot code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.78rem;
}

/* ── Typing Indicator ────────────────────────────────────── */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.75rem 1rem;
}

.chatbot-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-400);
    opacity: 0.4;
    animation: chatbot-dot 1.4s ease-in-out infinite;
}

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

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

@keyframes chatbot-dot {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.35;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Suggestion Chips ────────────────────────────────────── */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.chatbot-suggestion-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.chatbot-suggestion-chip:hover {
    background: var(--gold-500);
    border-color: var(--gold-500);
    color: #fff;
}

/* ── Input Bar ───────────────────────────────────────────── */
.chatbot-input-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--gold-500);
    transition: all 0.25s ease;
}

.chatbot-send-btn:hover:not(:disabled) {
    background: var(--gold-600);
    transform: scale(1.08);
}

.chatbot-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 1.5rem);
        right: 0.75rem;
        bottom: 5rem;
        max-height: calc(100dvh - 6rem);
        border-radius: 0.875rem;
    }

    .chatbot-fab {
        bottom: 1rem;
        right: 1rem;
        width: 54px;
        height: 54px;
    }
}