/*
 * Awantera Solutions — Custom Stylesheet
 * Extends Tailwind CSS (loaded via CDN in header.php).
 * Add component-level or layout-specific overrides here.
 */

/* ============================================================
   Base & Typography
============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    color: #1e293b;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile body padding to avoid content hidden behind mobile bar */
@media (max-width: 1023px) {
    body {
        padding-bottom: 56px; /* Height of mobile contact bar */
    }
}

/* ============================================================
   Header shadow on scroll (controlled by JS)
============================================================ */
#site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Focus visible (accessibility)
============================================================ */
:focus-visible {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Chatbot
   NOTE: Show/hide is driven by JS via element.style.display.
   Do NOT add display rules for #chatbot-window here — it
   would override the JS-controlled visibility.
============================================================ */
#chatbot-messages {
    scroll-behavior: smooth;
}

/* Chat bubbles */
.chat-bubble-bot {
    background-color: #eff6ff;
    color: #1e293b;
    border-radius: 4px 16px 16px 16px;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    max-width: 85%;
    word-break: break-word;
}

.chat-bubble-user {
    background-color: #1d4ed8;
    color: #ffffff;
    border-radius: 16px 4px 16px 16px;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    max-width: 85%;
    word-break: break-word;
    margin-left: auto;
}

.chat-bubble-bot a.chatbot-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.chat-bubble-bot a.chatbot-link:hover {
    color: #1d4ed8;
}

/* Typing indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #eff6ff;
    border-radius: 4px 16px 16px 16px;
    width: fit-content;
}

.chatbot-typing span {
    width: 7px;
    height: 7px;
    background-color: #93c5fd;
    border-radius: 50%;
    display: inline-block;
    animation: chatbot-bounce 1.2s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatbot-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-6px); }
}

/* ============================================================
   FAQ Accordion
============================================================ */
.faq-item .faq-answer {
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

/* ============================================================
   Form input focus ring override
============================================================ */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* ============================================================
   Hero section — floating cards don't get clipped on small screens
============================================================ */
@media (max-width: 639px) {
    #hero-heading ~ div .relative {
        margin-top: 12px;
        margin-bottom: 12px;
    }
}

/* Translucent CTA button used in hero */
.bg-white\/8 {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   Animations
============================================================ */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease forwards;
}

/* ============================================================
   Utility: anchor offset for sticky header
============================================================ */
[id] {
    scroll-margin-top: 80px;
}

/* ============================================================
   Print styles
============================================================ */
@media print {
    #site-header,
    #chatbot-container,
    .lg\:hidden,
    footer {
        display: none !important;
    }
}
