/* ============================================
   SecureTechBee - Advanced UI | Mobile-First
   ============================================ */

/* Fonts: Plus Jakarta Sans + Inter loaded in header */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #6ea8fe;
    --secondary: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    --dark: #1a1d21;
    --light: #f8f9fa;
    --body-bg: #f0f2f5;
    --card-bg: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0d6efd 0%, #0a58ca 50%, #084298 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #0d6efd 50%, #0a58ca 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    --shadow-nav: 0 4px 20px rgba(13,110,253,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --safe-top: env(safe-area-inset-top, 0);
    --safe-bottom: env(safe-area-inset-bottom, 0);
    --safe-left: env(safe-area-inset-left, 0);
    --safe-right: env(safe-area-inset-right, 0);
}

/* Base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: #212529;
    background-color: var(--body-bg);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13,110,253,0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(13,110,253,0.05), transparent);
    min-height: 100vh;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .fw-bold {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ========== Topbar ========== */
.topbar-securetechbee {
    background: var(--dark) !important;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-securetechbee small {
    opacity: 0.9;
}
.topbar-securetechbee a {
    color: #fff !important;
    text-decoration: none;
    transition: opacity var(--transition);
}
.topbar-securetechbee a:hover {
    opacity: 0.85;
}

/* ========== Navbar - Advanced ========== */
.navbar-securetechbee {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-nav);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.navbar-securetechbee .container {
    max-width: 1320px;
}
.navbar-brand-securetechbee {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    transition: transform var(--transition), opacity var(--transition);
}
.navbar-brand-securetechbee:hover {
    color: #fff !important;
    opacity: 0.95;
    transform: scale(1.02);
}
.navbar-brand-securetechbee .logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.navbar-securetechbee .nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.95) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.navbar-securetechbee .nav-link:hover,
.navbar-securetechbee .nav-link:focus {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
}
.navbar-securetechbee .dropdown-toggle::after {
    transition: transform var(--transition);
}
.navbar-securetechbee .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}
.navbar-securetechbee .navbar-toggler {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
}
.navbar-securetechbee .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}
.navbar-securetechbee .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown - Desktop */
.navbar-securetechbee .dropdown-menu {
    background: #fff;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.35rem;
    min-width: 220px;
    animation: dropdownFade 0.2s ease;
}
.navbar-securetechbee .dropdown-item {
    color: #212529;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.navbar-securetechbee .dropdown-item:hover {
    background: rgba(13,110,253,0.08);
    color: var(--primary);
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.navbar-securetechbee .dropdown-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding: 0.35rem 1rem;
}
.navbar-securetechbee .dropdown-divider {
    margin: 0.35rem 0;
}

/* Navbar buttons */
.navbar-securetechbee .btn-outline-light {
    border-width: 1.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}
.navbar-securetechbee .btn-warning {
    background: #ffc107;
    color: #000;
    border: none;
    font-weight: 700;
    border-radius: var(--radius-sm);
}
.navbar-securetechbee .btn-warning:hover {
    background: #e0a800;
    color: #000;
}

/* ========== Mobile Nav (collapse) ========== */
@media (max-width: 991.98px) {
    .navbar-securetechbee .navbar-collapse {
        background: rgba(0,0,0,0.2);
        margin: 0.5rem -1rem -0.5rem -1rem;
        padding: 1rem;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .navbar-securetechbee .nav-link {
        padding: 0.65rem 0.75rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .navbar-securetechbee .dropdown-menu {
        background: rgba(255,255,255,0.95);
        margin: 0.25rem 0 0.5rem 1rem;
        box-shadow: var(--shadow-md);
    }
    .navbar-securetechbee .dropdown-item {
        color: #212529 !important;
    }
    .navbar-securetechbee .dropdown-item:hover {
        background: rgba(13,110,253,0.1);
        color: #0d6efd !important;
    }
    .navbar-securetechbee .dropdown-header {
        color: #6c757d;
    }
    .navbar-securetechbee .d-flex.align-items-center {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.15);
    }
    .navbar-securetechbee .d-flex.align-items-center .btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ========== Cards ========== */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.card-header {
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: none;
}
.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* ========== Buttons ========== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    transition: transform var(--transition), box-shadow var(--transition);
    border: none;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 14px rgba(13,110,253,0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(13,110,253,0.45);
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
}

/* ========== Forms ========== */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13,110,253,0.15);
}

/* ========== Tables ========== */
.table thead th {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 1rem;
}
.table-hover tbody tr:hover {
    background-color: rgba(13,110,253,0.04);
}

/* ========== Hero Sections (global) ========== */
.hero-section {
    background: var(--gradient-hero);
    min-height: 420px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
    pointer-events: none;
}
.hero-section .container {
    position: relative;
    z-index: 1;
}
.stat-counter {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.feature-card {
    transition: all var(--transition);
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.service-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    background: rgba(13,110,253,0.1);
    color: var(--primary);
}

/* ========== Page hero banners (all solution/content pages) ========== */
.container-fluid.bg-primary.py-4 {
    background: var(--gradient-hero) !important;
    position: relative;
    overflow: hidden;
}
.container-fluid.bg-primary.py-4 .breadcrumb-item a,
.container-fluid.bg-primary.py-4 .text-white {
    color: #fff !important;
}
.container-fluid.bg-primary.py-4 .text-white-50 {
    color: rgba(255,255,255,0.85) !important;
}

/* ========== Page Heroes (CCTV, Exam, etc.) ========== */
.cctv-hero, .exam-hero {
    background: var(--gradient-hero) !important;
    position: relative;
    overflow: hidden;
}
.cctv-hero::before, .exam-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.cctv-hero .container, .exam-hero .container {
    position: relative;
    z-index: 1;
}

/* ========== Footer ========== */
footer.footer-securetechbee {
    background: var(--dark) !important;
    color: #e9ecef;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
footer.footer-securetechbee h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #fff;
}
footer.footer-securetechbee a {
    transition: opacity var(--transition);
}
footer.footer-securetechbee a:hover {
    opacity: 0.85;
}
footer.footer-securetechbee .text-white-50 {
    opacity: 0.85;
}
footer.footer-securetechbee hr {
    border-color: rgba(255,255,255,0.1);
}

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    right: calc(20px + var(--safe-right));
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1020;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition), opacity var(--transition);
}
.back-to-top:hover {
    transform: translateY(-4px);
    opacity: 0.95;
}

/* ========== Badges & Alerts ========== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.75em;
    border-radius: 9999px;
}
.alert {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ========== Modal Fix (existing) ========== */
.modal {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
}
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 1px solid #dee2e6;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========== OTP & Utilities ========== */
.otp-input {
    font-size: 1.75rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}
.dashboard-card {
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
}
.progress {
    height: 10px;
    border-radius: 9999px;
    background: #e9ecef;
}
.progress-bar {
    border-radius: 9999px;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    font-size: 0.9rem;
}
.breadcrumb-item a {
    text-decoration: none;
    opacity: 0.9;
}
.breadcrumb-item a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========== Responsive - Mobile First ========== */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 80px;
    }
    .hero-section {
        min-height: auto;
        padding: 2.5rem 0;
    }
    .hero-section h1,
    .display-3, .display-4, .display-5 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    .hero-section .lead {
        font-size: 1rem !important;
    }
    .stat-counter {
        font-size: 2rem !important;
    }
    .service-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 1.5rem !important;
    }
    .navbar-brand-securetechbee {
        font-size: 1.2rem;
    }
    .navbar-brand-securetechbee .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    footer.footer-securetechbee .row > div {
        margin-bottom: 1.5rem;
    }
    footer.footer-securetechbee h5 {
        font-size: 1rem;
    }
    .card-body.p-5 {
        padding: 1.25rem !important;
    }
    .container, .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .d-flex.gap-3.flex-wrap {
        flex-direction: column;
    }
    .d-flex.gap-3.flex-wrap .btn {
        width: 100%;
    }
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: calc(16px + var(--safe-bottom));
        right: calc(16px + var(--safe-right));
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1,
    .display-4, .display-5 {
        font-size: 1.5rem !important;
    }
    .table-responsive {
        font-size: 0.85rem;
    }
    .table th, .table td {
        padding: 0.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand-securetechbee {
        font-size: 1.05rem;
    }
    .navbar-brand-securetechbee .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    .hero-section .bi-shield-check {
        font-size: 180px !important;
    }
}

/* Touch targets (accessibility) */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .dropdown-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .dropdown-item {
        min-height: 44px;
        padding: 0.65rem 1rem !important;
    }
    input:not([type="checkbox"]):not([type="radio"]),
    select, textarea {
        min-height: 44px;
        font-size: 16px !important; /* prevents zoom on iOS */
    }
}

/* ========== Section spacing (all pages) ========== */
section.container,
section.container-fluid {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}
@media (min-width: 992px) {
    section.container,
    section.container-fluid .container {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
}

/* ========== CTA sections ========== */
.cta-section {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ========== Exam / CCTV page cards ========== */
.exam-card, .cctv-card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.exam-card:hover, .cctv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.exam-chip, .spec-chip {
    border: 1px solid #e9ecef;
    border-radius: 9999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0.35rem 0.2rem 0;
}
.exam-cta-blur, .cta-blur {
    background: linear-gradient(180deg, rgba(13,110,253,0.06) 0%, rgba(13,110,253,0.12) 100%);
    border: 1px solid rgba(13,110,253,0.15);
    border-radius: var(--radius-md);
}

/* ========== Images ========== */
.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}
img.rounded {
    border-radius: var(--radius-md);
}

/* ========== Accordion ========== */
.accordion-button {
    font-family: var(--font-heading);
    font-weight: 600;
}
.accordion-button:not(.collapsed) {
    background: rgba(13,110,253,0.08);
    color: var(--primary);
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: 0 0 0 4px rgba(13,110,253,0.15);
}
