/* AB TECH Associates — Professional Site Styles */

:root {
    --brand-950: #0a1628;
    --brand-900: #0f2744;
    --brand-800: #1e3a5f;
    --brand-700: #1d4ed8;
    --brand-600: #2563eb;
    --accent: #f59e0b;

    /* International type scale (16px base) */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --text-xs: 0.75rem;      /* 12px — labels, meta */
    --text-sm: 0.875rem;     /* 14px — nav, captions */
    --text-base: 1rem;       /* 16px — body */
    --text-lg: 1.125rem;     /* 18px — lead paragraphs */
    --text-xl: 1.25rem;      /* 20px — card titles */
    --text-2xl: 1.5rem;      /* 24px — section titles mobile */
    --text-3xl: 1.875rem;    /* 30px — section titles */
    --text-4xl: 2.25rem;     /* 36px — page titles */
    --text-5xl: 3rem;        /* 48px — hero */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.625;
    --leading-relaxed: 1.7;
}

* { scroll-behavior: smooth; }

.site-body,
body.site-body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: #334155;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: var(--leading-tight);
}

p { line-height: var(--leading-relaxed); }

/* Type utilities */
.type-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
}

.type-lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: #64748b;
}

.type-section-title {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
}

.type-page-title {
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.type-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

@media (min-width: 1280px) {
    .type-hero-title { font-size: 3.5rem; }
}

/* Top bar */
.top-bar { background: var(--brand-950); }

/* Hero pattern */
.hero-pattern {
    background-color: var(--brand-900);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37,99,235,.35), transparent),
        radial-gradient(circle at 80% 80%, rgba(245,158,11,.08), transparent);
}

/* Cards */
.card-hover {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(15,39,68,.15);
}

/* Category icon box */
.icon-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* Section divider */
.section-label {
    letter-spacing: 0.08em;
    font-size: var(--text-xs);
}

/* WhatsApp pulse */
.wa-pulse {
    animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
    50% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
}

/* Scroll top */
.scroll-top {
    transition: opacity .3s, transform .3s;
}
.scroll-top.hidden-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

/* Mobile menu */
#mobile-menu.open { display: block; }

/* Form focus */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Spec table */
.spec-table tr:last-child td { border-bottom: none; }

/* Page hero overlay */
.page-hero {
    background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 50%, #1e40af 100%);
}

/* Stat counter */
.stat-card {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.12);
}

/* Admin sidebar active */
.admin-nav-active {
    background: rgba(37,99,235,.15);
    color: #93c5fd;
    border-left: 3px solid #3b82f6;
}

/* Hero slider */
.hero-slider .swiper-pagination-bullet {
    background: rgba(255,255,255,.5);
    opacity: 1;
    width: 10px;
    height: 10px;
}
.hero-slider .swiper-pagination-bullet-active {
    background: #fff;
    width: 28px;
    border-radius: 6px;
}
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

/* Rich text / prose */
.prose {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: #475569;
}
.prose p { margin-bottom: 1em; }
.prose h2 { font-size: var(--text-2xl); margin-top: 1.75em; margin-bottom: 0.5em; }
.prose h3 { font-size: var(--text-xl); margin-top: 1.5em; margin-bottom: 0.5em; }
.prose h2, .prose h3 { color: #0f172a; font-weight: 700; }
.prose ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1em; }
.prose ol { list-style: decimal; padding-left: 1.5em; margin-bottom: 1em; }
.prose a { color: #1d4ed8; text-decoration: underline; }
.prose strong { color: #0f172a; font-weight: 700; }
.prose img { border-radius: .75rem; max-width: 100%; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.prose th, .prose td { border: 1px solid #e2e8f0; padding: .5em .75em; }
.prose th { background: #f8fafc; font-weight: 600; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Site header */
.site-header { transition: box-shadow 0.3s, background 0.3s; }
.site-search-input { transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.site-search-input:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}
.site-btn-primary {
    display: inline-flex; align-items: center;
    background: var(--brand-700); color: #fff;
    padding: 0.5625rem 1.125rem; border-radius: 0.75rem;
    font-size: var(--text-sm); font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}
.site-btn-primary:hover { background: var(--brand-800); transform: translateY(-1px); }

/* Page hero enhancement */
.page-hero {
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 80% 20%, rgba(59, 130, 246, 0.2), transparent);
    pointer-events: none;
}
.page-hero > div { position: relative; z-index: 1; }

/* AI Chat Widget */
.chat-widget { position: fixed; bottom: 5rem; left: 1rem; z-index: 45; }
@media (min-width: 640px) { .chat-widget { bottom: 1.5rem; left: 1.5rem; } }
.chat-fab {
    position: relative;
    width: 3.25rem; height: 3.25rem;
    background: linear-gradient(135deg, #1d4ed8, #1e3a5f);
    color: #fff; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4);
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
@media (min-width: 640px) { .chat-fab { width: 3.5rem; height: 3.5rem; } }
.chat-fab:hover { transform: scale(1.05); box-shadow: 0 12px 32px rgba(29, 78, 216, 0.5); }
.chat-fab-pulse {
    position: absolute; inset: 0; border-radius: 50%;
    animation: chat-pulse 2s infinite;
    border: 2px solid rgba(59, 130, 246, 0.5);
}
@keyframes chat-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0; }
}
.chat-panel {
    position: absolute; bottom: calc(100% + 0.75rem); left: 0;
    width: min(22rem, calc(100vw - 2rem));
    background: #fff; border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(15, 39, 68, 0.2);
    border: 1px solid #e2e8f0;
    display: flex; flex-direction: column;
    max-height: min(32rem, calc(100vh - 8rem));
    overflow: hidden;
}
.chat-panel.hidden { display: none; }
.chat-panel-header {
    background: linear-gradient(135deg, #1e3a5f, #1d4ed8);
    padding: 1rem; display: flex; justify-content: space-between; align-items: center;
}
.chat-avatar {
    width: 2.25rem; height: 2.25rem; border-radius: 0.625rem;
    background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center;
}
.chat-online-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
    display: inline-block; animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.chat-messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 0.75rem;
    background: #f8fafc; min-height: 12rem; max-height: 18rem;
}
.chat-bubble { max-width: 90%; padding: 0.75rem 1rem; border-radius: 1rem; font-size: var(--text-sm); line-height: var(--leading-normal); }
.chat-bubble p { margin: 0; }
.chat-bubble-bot { background: #fff; border: 1px solid #e2e8f0; color: #334155; align-self: flex-start; border-bottom-left-radius: 0.25rem; }
.chat-bubble-user { background: #1d4ed8; color: #fff; align-self: flex-end; border-bottom-right-radius: 0.25rem; }
.chat-bubble .chat-link { color: #1d4ed8; text-decoration: underline; font-weight: 600; }
.chat-bubble-user .chat-link { color: #bfdbfe; }
.chat-typing { display: flex; gap: 4px; padding: 0.75rem 1rem; align-items: center; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: typing 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
.chat-suggestions {
    display: flex; flex-wrap: wrap; gap: 0.375rem;
    padding: 0.5rem 0.75rem; border-top: 1px solid #f1f5f9; background: #fff;
}
.chat-suggestion-btn {
    font-size: var(--text-xs); padding: 0.3125rem 0.75rem;
    border-radius: 9999px; border: 1px solid #dbeafe;
    background: #eff6ff; color: #1d4ed8; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
.chat-suggestion-btn:hover { background: #dbeafe; }
.chat-form {
    display: flex; gap: 0.5rem; padding: 0.75rem;
    border-top: 1px solid #e2e8f0; background: #fff;
}
.chat-form input {
    flex: 1; border: 1px solid #e2e8f0; border-radius: 0.75rem;
    padding: 0.5625rem 0.875rem; font-size: var(--text-sm);
}
.chat-form input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.chat-form button {
    width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; border: none;
    background: #1d4ed8; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.chat-form button:hover { background: #1e40af; }

/* Responsive typography */
@media (max-width: 639px) {
    .page-hero { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .site-body { font-size: 0.9375rem; } /* 15px on small screens — still readable */
}
@media (min-width: 1024px) {
    .site-body { font-size: var(--text-base); }
}

/* Site logo */
.site-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    text-decoration: none;
}
.site-logo-wrap--header:hover .site-logo { transform: scale(1.02); }
.site-logo {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.site-logo--header {
    width: 2.75rem;
    height: 2.75rem;
}
@media (min-width: 640px) {
    .site-logo--header { width: 3rem; height: 3rem; }
}
.site-logo--footer {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.site-logo--compact { width: 2.25rem; height: 2.25rem; }
.site-logo-name {
    display: block;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.25;
    color: #0f2744;
    letter-spacing: -0.02em;
}
@media (min-width: 1024px) {
    .site-logo-name { font-size: 1rem; }
}
.site-logo-wrap--footer .site-logo-name { color: #fff; }
.site-logo-tagline {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 0.125rem;
}
.site-logo-wrap--footer .site-logo-tagline { color: #64748b; }

/* Footer */
.site-footer {
    background: var(--brand-950);
    color: #94a3b8;
}
.site-footer-cta {
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 50%, #1e40af 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer-main {
    background: var(--brand-950);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer-bottom {
    background: #070f1a;
}
.site-footer-heading {
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.35);
    display: inline-block;
}
.site-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.site-footer-links a {
    color: #94a3b8;
    font-size: var(--text-sm);
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}
.site-footer-links a:hover {
    color: #fff;
    padding-left: 0.25rem;
}
.site-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.site-footer-contact li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: #94a3b8;
}
.site-footer-contact-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.site-footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6875rem 1.25rem;
    border-radius: 0.75rem;
    font-size: var(--text-sm);
    font-weight: 600;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.site-footer-btn:hover { transform: translateY(-1px); }
.site-footer-btn-primary {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.site-footer-btn-primary:hover { background: #eff6ff; }
.site-footer-btn-whatsapp {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.site-footer-btn-whatsapp:hover { background: #15803d; }
.site-footer-btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.site-footer-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}
