/* ═══════════════════════════════════════════════════
   TCS AI Services — Shared Header, Nav, Footer
   Used by: /ai-services/index.html, /tilevision/
   ═══════════════════════════════════════════════════ */

:root {
    --primary: #0A2540;
    --surface: #0D2D4A;
    --accent: #00D4FF;
    --accent2: #39FF14;
    --warm: #e67e22;
    --text: #E8F0FE;
    --muted: #8BA4C4;
    --danger: #FF4444;
}

/* ── Top Bar ── */
.ai-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: rgba(10,37,64,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,212,255,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ai-topbar .logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.ai-topbar .logo-link img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.ai-topbar .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.ai-topbar .logo-text .brand {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 2px;
}

.ai-topbar .logo-text .sub {
    font-size: 0.55rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Main nav links — flat row */
.ai-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.ai-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.78rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.ai-nav a:hover {
    color: var(--text);
    background: rgba(0,212,255,0.08);
}

.ai-nav a.active {
    color: var(--accent);
    font-weight: 600;
}

.ai-nav .separator {
    width: 1px;
    height: 16px;
    background: rgba(0,212,255,0.15);
    margin: 0 0.25rem;
}

/* Dropdown */
.ai-nav .dropdown {
    position: relative;
}

.ai-nav .dropdown > a::after {
    content: ' ▾';
    font-size: 0.6em;
    opacity: 0.5;
}

.ai-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 220px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 1001;
}

.ai-nav .dropdown:hover .dropdown-menu,
.ai-nav .dropdown:focus-within .dropdown-menu {
    display: block;
}

.ai-nav .dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    border-radius: 0;
}

.ai-nav .dropdown-menu a:hover {
    background: rgba(0,212,255,0.08);
}

.ai-nav .dropdown-menu .tool-tag {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    margin-left: 0.5rem;
}

.ai-nav .dropdown-menu .tag-live {
    background: rgba(57,255,20,0.15);
    color: var(--accent2);
}

.ai-nav .dropdown-menu .tag-soon {
    background: rgba(0,212,255,0.12);
    color: var(--accent);
}

.ai-nav .back-to-tcs {
    color: var(--muted);
    opacity: 0.6;
    font-size: 0.7rem;
}

.ai-nav .back-to-tcs:hover { opacity: 1; }

/* ── Mobile Nav ── */
.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(0,212,255,0.3);
    color: var(--accent);
    font-size: 1.2rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }

    .ai-topbar { padding: 0.5rem 1rem; }

    .ai-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10,37,64,0.98);
        border-bottom: 1px solid rgba(0,212,255,0.2);
        flex-direction: column;
        padding: 0.5rem 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    }

    .ai-nav.open { display: flex; }

    .ai-nav .separator { display: none; }

    .ai-nav a {
        padding: 0.75rem 1.25rem;
        width: 100%;
        font-size: 0.85rem;
    }

    .ai-nav .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: rgba(0,0,0,0.15);
        border-radius: 0;
        min-width: 100%;
    }

    .ai-nav .dropdown:hover .dropdown-menu,
    .ai-nav .dropdown:focus-within .dropdown-menu {
        display: block;
    }

    .ai-topbar { flex-wrap: wrap; position: relative; }
}

/* ── Footer ── */
.ai-footer {
    border-top: 1px solid rgba(0,212,255,0.15);
    background: rgba(10,37,64,0.95);
    padding: 3rem 2rem 1.5rem;
}

.ai-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 2rem;
}

.ai-footer .footer-col h4 {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.ai-footer .footer-col p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

.ai-footer .footer-col a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.ai-footer .footer-col a:hover {
    color: var(--text);
}

.ai-footer .footer-col .phone-link {
    display: inline;
    color: var(--accent);
    font-weight: 600;
}

.ai-footer .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,212,255,0.1);
    max-width: 1100px;
    margin: 0 auto;
}

.ai-footer .footer-bottom p {
    font-size: 0.75rem;
    color: var(--muted);
}

.ai-footer .footer-bottom .socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.ai-footer .footer-bottom .socials a {
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.2s;
}

.ai-footer .footer-bottom .socials a:hover {
    color: var(--accent);
}

/* ── Contact Form Modal ── */
.contact-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.contact-modal-overlay.open {
    display: flex;
}

.contact-modal {
    background: var(--surface);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.contact-modal .close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
}

.contact-modal .close-modal:hover { color: var(--text); }

.contact-modal h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-modal .modal-desc {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.contact-modal label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.contact-modal input,
.contact-modal textarea,
.contact-modal select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.contact-modal input:focus,
.contact-modal textarea:focus,
.contact-modal select:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-modal textarea {
    min-height: 80px;
    resize: vertical;
}

.contact-modal .submit-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-modal .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,212,255,0.3);
}

.contact-modal .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-modal .form-status {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.contact-modal .form-status.success {
    background: rgba(57,255,20,0.1);
    color: var(--accent2);
}

.contact-modal .form-status.error {
    background: rgba(255,68,68,0.1);
    color: var(--danger);
}
