/* ============================================================
   APEX TECHNICAL SOLUTIONS — ENTERPRISE LAYER
   File: apex-enterprise.css
   Loads AFTER style.css (and apex-portfolio.css on projects.html).
   Purely ADDITIVE: every selector is .ent- prefixed or scoped, so
   nothing in the original stylesheet is overridden or removed.
   Palette: #0056D6 / #00A3FF / #333 only (existing brand tokens).
   ============================================================ */

/* ---------- Dropdown navigation (additive to existing topbar) ---------- */
.topbar nav li.ent-has-dropdown { position: relative; }
.topbar nav li.ent-has-dropdown > a::before {
    content: '\25BE';
    font-size: 0.7em;
    margin-left: 6px;
    vertical-align: middle;
}
.ent-dropdown {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 230px;
    background: var(--dark-gray, #333);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1200;
}
.topbar nav li.ent-has-dropdown:hover > .ent-dropdown,
.topbar nav li.ent-has-dropdown:focus-within > .ent-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.ent-dropdown li { margin: 0; }
.ent-dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95em;
    white-space: nowrap;
}
.ent-dropdown a::after { display: none; }
.ent-dropdown a:hover { background: rgba(0,163,255,0.15); }

@media (max-width: 768px) {
    .topbar nav ul.active { max-height: 85vh; overflow-y: auto; }
    .ent-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: rgba(0,0,0,0.25);
        display: none;
    }
    .topbar nav li.ent-has-dropdown.open > .ent-dropdown { display: block; }
    .ent-dropdown a { padding: 14px 20px; font-size: 1em; }
}

/* ---------- Shared enterprise primitives ---------- */
.ent-eyebrow {
    display: inline-block;
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--light-blue, #00A3FF);
    margin-bottom: 8px;
}
.ent-center { text-align: center; }
.ent-lead {
    max-width: 850px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.15em;
    color: var(--dark-gray, #333);
}
.ent-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ent-grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.ent-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ent-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.ent-card > i {
    font-size: 2.2em;
    color: var(--primary-blue, #0056D6);
}
.ent-card h3 {
    text-align: left;
    font-size: 1.3em;
    margin: 0;
    color: var(--primary-blue, #0056D6);
}
.ent-card h3::after { display: none; }
.ent-card p {
    margin: 0;
    color: var(--dark-gray, #333);
    font-size: 0.97em;
    flex: 1;
}
.ent-card .cta-btn { margin: 10px 0 0; align-self: flex-start; }

.ent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    background: #f4f4f4;
    border: 1px solid #e5e7eb;
    color: var(--dark-gray, #333);
}
.ent-badge.blue { background: var(--primary-blue, #0056D6); border-color: var(--primary-blue, #0056D6); color: #fff; }
.ent-badge.light { background: var(--light-blue, #00A3FF); border-color: var(--light-blue, #00A3FF); color: #fff; }

/* ---------- Stats band ---------- */
.ent-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    text-align: center;
    background: var(--primary-blue, #0056D6);
    color: #fff;
    border-radius: 20px;
    padding: 45px 30px;
}
.ent-stats .ent-stat i { font-size: 1.8em; color: #fff; opacity: 0.9; }
.ent-stats .ent-num {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 2.4em;
    font-weight: 700;
    margin: 8px 0 2px;
}
.ent-stats .ent-label { font-size: 0.9em; opacity: 0.9; }

/* ---------- Tabs ---------- */
.ent-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
}
.ent-tab-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: 2px solid var(--primary-blue, #0056D6);
    background: transparent;
    color: var(--primary-blue, #0056D6);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}
.ent-tab-btn.active, .ent-tab-btn:hover {
    background: var(--primary-blue, #0056D6);
    color: #fff;
}
.ent-tab-panel { display: none; }
.ent-tab-panel.active { display: block; }

/* ---------- Progress bars (ongoing projects) ---------- */
.ent-progress {
    background: #f4f4f4;
    border-radius: 20px;
    height: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.ent-progress > span {
    display: block;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--primary-blue, #0056D6), var(--light-blue, #00A3FF));
    width: 0;
    transition: width 1.2s ease;
}
.ent-meta-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85em;
    color: var(--dark-gray, #333);
}

/* ---------- Forms ---------- */
.ent-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}
.ent-form label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--dark-gray, #333);
}
.ent-form input, .ent-form textarea, .ent-form select {
    padding: 13px 16px;
    border: 1px solid #d5d9e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: 'Open Sans', sans-serif;
    background: #fff;
    color: var(--dark-gray, #333);
}
.ent-form input:focus, .ent-form textarea:focus, .ent-form select:focus {
    outline: 2px solid var(--light-blue, #00A3FF);
    border-color: var(--primary-blue, #0056D6);
}
.ent-form textarea { min-height: 120px; resize: vertical; }
.ent-form .cta-btn { align-self: flex-start; cursor: pointer; }
.ent-form-note { font-size: 0.85em; color: #666; }
.ent-alert {
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.93em;
    border: 1px solid var(--light-blue, #00A3FF);
    background: rgba(0,163,255,0.08);
    color: var(--dark-gray, #333);
}
.ent-alert.demo { border-style: dashed; }
.ent-alert i { color: var(--primary-blue, #0056D6); margin-right: 8px; }

/* ---------- Tables (dashboards) ---------- */
.ent-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid #e5e7eb; }
.ent-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.92em; }
.ent-table th, .ent-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eef0f3; }
.ent-table th {
    background: var(--dark-gray, #333);
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ent-table tr:last-child td { border-bottom: none; }
.ent-table tr:hover td { background: rgba(0,86,214,0.04); }

/* ---------- Portal / dashboard layout ---------- */
.ent-portal-shell { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; }
.ent-side {
    background: var(--dark-gray, #333);
    border-radius: 18px;
    padding: 22px 0;
    position: sticky;
    top: 160px;
}
.ent-side a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
    text-decoration: none;
    padding: 12px 24px;
    font-size: 0.95em;
    transition: 0.25s ease;
}
.ent-side a i { width: 18px; text-align: center; color: var(--light-blue, #00A3FF); }
.ent-side a:hover, .ent-side a.active { background: rgba(0,163,255,0.15); color: #fff; }
.ent-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 30px; }
.ent-kpi {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
}
.ent-kpi .ent-kpi-num { font-family: 'Roboto', sans-serif; font-size: 1.7em; font-weight: 700; color: var(--primary-blue, #0056D6); }
.ent-kpi .ent-kpi-label { font-size: 0.82em; color: #666; }
@media (max-width: 900px) {
    .ent-portal-shell { grid-template-columns: 1fr; }
    .ent-side { position: static; display: flex; flex-wrap: wrap; padding: 8px; }
    .ent-side a { padding: 10px 14px; }
}

/* ---------- Page hero (compact, for inner pages) ---------- */
.ent-hero { padding: 90px 30px; }
.ent-hero h1 { font-size: 2.4em; }
@media (max-width: 768px) { .ent-hero h1 { font-size: 1.9em; } }

/* ---------- Pricing ---------- */
.ent-price {
    font-family: 'Roboto', sans-serif;
    font-size: 1.9em;
    font-weight: 700;
    color: var(--primary-blue, #0056D6);
}
.ent-price small { font-size: 0.45em; font-weight: 400; color: #666; }
.ent-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.93em; }
.ent-list li { display: flex; gap: 10px; align-items: flex-start; }
.ent-list li i { color: var(--light-blue, #00A3FF); margin-top: 4px; }

/* ---------- Newsletter band ---------- */
.ent-newsletter {
    background: var(--dark-gray, #333);
    color: #fff;
    border-radius: 20px;
    padding: 45px 30px;
    text-align: center;
}
.ent-newsletter h3 { color: #fff; margin-top: 0; }
.ent-newsletter h3::after { background: var(--light-blue, #00A3FF); }
.ent-newsletter form { display: flex; gap: 12px; max-width: 520px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.ent-newsletter input { flex: 1 1 260px; padding: 13px 16px; border-radius: 30px; border: none; font-size: 1em; }
.ent-newsletter .cta-btn { margin: 0; background: var(--light-blue, #00A3FF); border-color: var(--light-blue, #00A3FF); color: #fff; cursor: pointer; }
.ent-newsletter .cta-btn:hover { background: #fff; color: var(--primary-blue, #0056D6); }

/* ---------- Testimonials ---------- */
.ent-quote { font-style: italic; }
.ent-quote-author { font-weight: 700; color: var(--primary-blue, #0056D6); font-size: 0.9em; }

/* ---------- FAQ accordion ---------- */
.ent-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.ent-faq details {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 4px 22px;
}
.ent-faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-blue, #0056D6);
    padding: 14px 0;
    list-style: none;
}
.ent-faq summary::-webkit-details-marker { display: none; }
.ent-faq summary::before { content: '\002B'; margin-right: 12px; color: var(--light-blue, #00A3FF); font-weight: 700; }
.ent-faq details[open] summary::before { content: '\2212'; }
.ent-faq details p { padding: 0 0 16px; margin: 0; color: var(--dark-gray, #333); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .ent-card, .ent-dropdown, .ent-progress > span, .ent-tab-btn { transition: none; }
}
