/**
 * IT World BD - Enterprise CSS Design Tokens, Kalpurush Typography & Components
 * Theme: Royal Navy Blue & Deep Slate Enterprise Theme
 */

/* Import Google/CDN Kalpurush Fallback */
@import url('https://fonts.maateen.me/kalpurush/font.css');

/* Local Kalpurush TTF Font Face */
@font-face {
    font-family: 'Kalpurush';
    src: url('../fonts/Kalpurush.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kalpurush';
    src: url('../fonts/Kalpurush.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --bs-primary: #1e3a8a;
    --bs-primary-rgb: 30, 58, 138;
    --bs-link-color: #1e3a8a;
    --bs-link-hover-color: #172554;
    
    --itw-font: 'Kalpurush', 'Hind Siliguri', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    
    --itw-primary: #1e3a8a;
    --itw-primary-light: #3b82f6;
    --itw-primary-dark: #172554;
    --itw-primary-hover: #1d4ed8;
    --itw-secondary: #0f172a;
    --itw-accent: #06b6d4;
    --itw-accent-hover: #0891b2;
    
    --itw-success: #10b981;
    --itw-warning: #f59e0b;
    --itw-danger: #ef4444;
    --itw-info: #38bdf8;
    
    --itw-body-bg: #f8fafc;
    --itw-card-bg: #ffffff;
    --itw-border-color: #e2e8f0;
    --itw-text-main: #1e293b;
    --itw-text-muted: #64748b;
    --itw-radius: 1rem;
    --itw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --itw-shadow-lg: 0 14px 30px -4px rgb(0 0 0 / 0.12), 0 8px 12px -6px rgb(0 0 0 / 0.08);
}

html, body {
    font-family: var(--itw-font);
    color: var(--itw-text-main);
    background-color: var(--itw-body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.btn, .nav-link, .navbar-brand,
.form-control, .form-select, .form-label,
.table, .badge, .dropdown-item,
.stat-widget, .accordion-button, .card-header {
    font-family: var(--itw-font);
}

/* Primary Button Styling */
.btn-primary {
    background-color: var(--itw-primary) !important;
    border-color: var(--itw-primary) !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--itw-primary-hover) !important;
    border-color: var(--itw-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
}

.btn-outline-primary {
    color: var(--itw-primary) !important;
    border-color: var(--itw-primary) !important;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary.active {
    background-color: var(--itw-primary) !important;
    border-color: var(--itw-primary) !important;
    color: #ffffff !important;
}

/* Service Icon Box Container */
.service-icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.service-icon-box i {
    line-height: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Navigation & Branding - Sleek Horizontal Navbar */
.navbar-itw {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-itw .navbar-brand {
    padding: 0 !important;
    margin-right: 1.25rem !important;
}

.navbar-itw .brand-logo-container {
    background: #ffffff;
    padding: 5px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-itw .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.1rem;
    flex-wrap: nowrap;
}

.navbar-itw .nav-item {
    white-space: nowrap;
}

.navbar-itw .nav-link {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    white-space: nowrap !important;
    gap: 5px !important;
    padding: 0.45rem 0.6rem !important;
    color: #cbd5e1 !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.navbar-itw .nav-link i {
    font-size: 0.95rem !important;
    opacity: 0.9;
    line-height: 1 !important;
    display: inline-block !important;
}

.navbar-itw .nav-link:hover {
    color: #38bdf8 !important;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-itw .nav-link.active {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12);
    font-weight: 600 !important;
}

/* Navbar Dropdown Styling */
.navbar-itw .dropdown-menu {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 8px 16px -6px rgba(0, 0, 0, 0.4) !important;
    min-width: 230px;
    padding: 8px 0;
    z-index: 1050;
}
.navbar-itw .dropdown-item {
    color: #cbd5e1 !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 6px;
    width: calc(100% - 12px);
}
.navbar-itw .dropdown-item:hover, .navbar-itw .dropdown-item:focus {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.15) !important;
    transform: translateX(3px);
}
.navbar-itw .dropdown-toggle::after {
    margin-left: 0.4em;
    vertical-align: 0.15em;
    transition: transform 0.2s ease;
}
.navbar-itw .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Desktop Hover Trigger (Opens dropdown on mouse hover without needing click) */
@media (min-width: 992px) {
    .navbar-itw .dropdown:hover > .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    .navbar-itw .dropdown > .dropdown-menu {
        display: block !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(8px) !important;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        pointer-events: none;
        margin-top: 0 !important;
    }
}

.navbar-itw .nav-badge {
    font-size: 0.62rem !important;
    padding: 0.2em 0.5em !important;
    border-radius: 50rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    line-height: 1;
    display: inline-block !important;
    vertical-align: middle;
    margin-left: 2px;
}

@media (min-width: 992px) and (max-width: 1200px) {
    .navbar-itw .nav-link {
        padding: 0.35rem 0.4rem !important;
        font-size: 0.82rem !important;
        gap: 3px !important;
    }
    .navbar-itw .nav-link i {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-itw .navbar-collapse {
        background: #0f172a;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar-itw .navbar-nav {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.35rem !important;
        padding-top: 0.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar-itw .nav-link {
        padding: 0.55rem 0.75rem !important;
        font-size: 0.92rem !important;
        width: 100%;
    }
}

.brand-gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Ultra-Modern Hero Section with Ambient Glowing Orbs */
.hero-gradient {
    background: radial-gradient(circle at 20% 25%, rgb(15, 23, 42) 0%, rgb(10, 15, 30) 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-glow-1 {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.hero-glow-2 {
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

/* Hero Live Search Bar */
.hero-search-wrapper {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 6px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.hero-search-wrapper:focus-within {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}

.hero-search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    box-shadow: none !important;
}
.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

/* Pulsing Beacon */
.pulse-beacon {
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 1.8s infinite;
}
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Modern Card Styling with Smooth Lift & Glow */
.card-enterprise {
    background: var(--itw-card-bg);
    border: 1px solid var(--itw-border-color);
    border-radius: var(--itw-radius);
    box-shadow: var(--itw-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-enterprise:hover {
    box-shadow: var(--itw-shadow-lg);
    transform: translateY(-4px);
    border-color: #cbd5e1;
}

/* Hover Lift Card */
.hover-lift-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
}
.hover-lift-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(30, 58, 138, 0.1);
    border-color: #93c5fd;
}
.hover-lift-card:hover .service-icon-box {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    transform: scale(1.08);
}

/* Tech Pills */
.tech-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

/* Trust Metric Highlights Bar */
.trust-bar {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

/* Stat & KPI Cards */
.stat-widget {
    border-radius: var(--itw-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
    box-shadow: var(--itw-shadow);
}
.stat-widget .stat-icon {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
    font-size: 3.5rem;
    opacity: 0.18;
}

/* Badges */
.badge-soft-primary { background: #dbeafe; color: #1e40af; font-weight: 600; }
.badge-soft-success { background: #d1fae5; color: #065f46; font-weight: 600; }
.badge-soft-warning { background: #fef3c7; color: #92400e; font-weight: 600; }
.badge-soft-danger  { background: #fee2e2; color: #991b1b; font-weight: 600; }
.badge-soft-info    { background: #e0f2fe; color: #075985; font-weight: 600; }

/* Admin Sidebar & Main Layout (Fully Responsive) */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}
.admin-sidebar {
    width: 260px;
    background: #0f172a;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 1050;
    min-height: 100vh;
}
.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    margin: 0.2rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.92rem;
    white-space: nowrap;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.admin-sidebar .nav-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    padding: 1rem 1.5rem 0.4rem;
    font-weight: 700;
}
.admin-main {
    flex-grow: 1;
    width: calc(100% - 260px);
    min-width: 0; /* Critical: prevents flex container from blowing out on wide content */
    background: #f8fafc;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Off-canvas Mobile Drawer for Admin Sidebar */
.admin-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.admin-sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-main {
        width: 100% !important;
    }
}

/* Responsive Nav Pills & Tab Headers */
.card-header-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
@media (max-width: 767.98px) {
    .card-header:has(.card-header-pills) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .card-header-pills {
        flex-wrap: nowrap;
        white-space: nowrap;
        padding-bottom: 0.35rem;
    }
    .card-header-pills .nav-item {
        flex-shrink: 0;
    }
}

/* Nav Tabs Enterprise */
.nav-tabs-enterprise {
    border-bottom: 2px solid var(--itw-border-color);
}
.nav-tabs-enterprise .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--itw-text-muted);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    margin-bottom: -2px;
}
.nav-tabs-enterprise .nav-link.active {
    color: var(--itw-primary-light);
    border-bottom: 2px solid var(--itw-primary-light);
    background: transparent;
}

.nav-pills .nav-link.active {
    background-color: var(--itw-primary) !important;
    color: #fff !important;
}

/* Table styling */
.table-enterprise {
    border-collapse: separate;
    border-spacing: 0;
}
.table-enterprise th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 1px solid var(--itw-border-color);
    padding: 0.85rem 1rem;
}
.table-enterprise td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Public Pricing Cards */
.pricing-card {
    border-radius: var(--itw-radius);
    border: 1px solid var(--itw-border-color);
    transition: all 0.3s;
    background: #fff;
}
.pricing-card.featured {
    border: 2px solid #3b82f6;
    transform: scale(1.03);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Form Controls */
.form-control:focus, .form-select:focus {
    border-color: var(--itw-primary-light);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

/* Footer */
.footer-dark {
    background: #0b1120;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-dark a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-dark a:hover {
    color: #38bdf8;
}
