/* ========================================================
   شركة توباكتس للخدمات الإدارية والقانونية وخدمات رجال الأعمال
   Tobaktous Company - Official Corporate Stylesheet (RTL)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --tob-primary: #0f2c59;          /* Deep Corporate Navy */
    --tob-primary-dark: #091a36;     /* Darker Navy */
    --tob-primary-light: #1e427b;    /* Lighter Navy */
    --tob-accent: #2563eb;           /* Corporate Blue */
    --tob-accent-soft: #eff6ff;      /* Very soft blue */
    --tob-gold: #c59b27;            /* Official subtle gold accent */
    --tob-dark: #1e293b;            /* Deep slate */
    --tob-muted: #64748b;           /* Slate grey */
    --tob-light-bg: #f8fafc;        /* Calm light grey background */
    --tob-card-bg: #ffffff;
    --tob-border: #e2e8f0;          /* Clean border color */
    --tob-font: 'Cairo', system-ui, -apple-system, sans-serif;
    --tob-shadow: 0 4px 6px -1px rgba(15, 44, 89, 0.07), 0 2px 4px -2px rgba(15, 44, 89, 0.05);
    --tob-shadow-lg: 0 10px 25px -5px rgba(15, 44, 89, 0.1), 0 8px 10px -6px rgba(15, 44, 89, 0.05);
}

body {
    font-family: var(--tob-font);
    background-color: var(--tob-light-bg);
    color: var(--tob-dark);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
}

/* ========================================================
   Top Contact Bar
   ======================================================== */
.top-bar {
    background-color: var(--tob-primary-dark);
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-bar a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-bar-item i {
    color: #93c5fd;
}

/* ========================================================
   Main Navigation Header
   ======================================================== */
.navbar-tobaktous {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 2px solid var(--tob-primary);
}

.navbar-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--tob-primary);
}

.navbar-brand-logo img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--tob-primary);
    line-height: 1.2;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--tob-muted);
    margin: 0;
    font-weight: 500;
}

.nav-link-custom {
    color: var(--tob-dark) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--tob-primary) !important;
    background-color: var(--tob-accent-soft);
}

.btn-tob-primary {
    background-color: var(--tob-primary);
    border-color: var(--tob-primary);
    color: #ffffff;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.btn-tob-primary:hover,
.btn-tob-primary:focus {
    background-color: var(--tob-primary-dark);
    border-color: var(--tob-primary-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 44, 89, 0.25);
}

.btn-tob-outline {
    background-color: transparent;
    border: 2px solid var(--tob-primary);
    color: var(--tob-primary);
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.btn-tob-outline:hover {
    background-color: var(--tob-primary);
    color: #ffffff;
}

/* ========================================================
   Hero Section
   ======================================================== */
.hero-section {
    background: linear-gradient(135deg, #0a1b38 0%, #0f2c59 55%, #183d73 100%);
    color: #ffffff;
    padding: 70px 0 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e0f2fe;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 35px;
    max-width: 620px;
}

.hero-banner-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.hero-banner-card img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================================
   Section Headers & Common
   ======================================================== */
.section-py {
    padding: 70px 0;
}

.section-tag {
    color: var(--tob-accent);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--tob-primary);
    margin-bottom: 15px;
    position: relative;
}

.section-subtitle {
    color: var(--tob-muted);
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* ========================================================
   Service Cards
   ======================================================== */
.service-card {
    background: #ffffff;
    border: 1px solid var(--tob-border);
    border-radius: 10px;
    padding: 28px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--tob-shadow);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tob-shadow-lg);
    border-color: #93c5fd;
}

.service-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    background-color: var(--tob-accent-soft);
    color: var(--tob-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-box {
    background-color: var(--tob-primary);
    color: #ffffff;
}

.service-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tob-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.service-card-desc {
    color: var(--tob-muted);
    font-size: 0.93rem;
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 20px;
}

.service-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--tob-border);
}

.service-card-action a {
    color: var(--tob-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-card-action a:hover {
    color: var(--tob-accent);
}

/* ========================================================
   Features Box / Smart Systems Section
   ======================================================== */
.features-section {
    background-color: #ffffff;
    border-top: 1px solid var(--tob-border);
    border-bottom: 1px solid var(--tob-border);
}

.feature-box {
    background: var(--tob-light-bg);
    border: 1px solid var(--tob-border);
    border-radius: 12px;
    padding: 32px 24px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-box.highlight {
    background: linear-gradient(145deg, #f0f7ff, #ffffff);
    border-color: #bfdbfe;
}

.feature-icon-lg {
    font-size: 2.4rem;
    color: var(--tob-primary);
    margin-bottom: 18px;
}

.feature-box h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tob-primary);
    margin-bottom: 12px;
}

.feature-box p {
    color: var(--tob-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ========================================================
   Stats Counter Banner
   ======================================================== */
.stats-banner {
    background-color: var(--tob-primary);
    color: #ffffff;
    padding: 50px 0;
}

.stat-item {
    text-align: center;
    padding: 15px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: #cbd5e1;
    font-weight: 600;
}

/* ========================================================
   Blog / Posts Cards
   ======================================================== */
.post-card {
    background: #ffffff;
    border: 1px solid var(--tob-border);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--tob-shadow);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tob-shadow-lg);
}

.post-card-img-wrap {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #0f2c59;
}

.post-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-img-wrap img {
    transform: scale(1.04);
}

.post-card-category {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 44, 89, 0.9);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.post-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-date {
    font-size: 0.8rem;
    color: var(--tob-muted);
    margin-bottom: 8px;
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tob-primary);
    line-height: 1.45;
    margin-bottom: 12px;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--tob-accent);
}

.post-card-summary {
    font-size: 0.9rem;
    color: var(--tob-muted);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 18px;
}

/* ========================================================
   Forms and Inputs
   ======================================================== */
.form-card {
    background: #ffffff;
    border: 1px solid var(--tob-border);
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--tob-shadow);
}

.form-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--tob-dark);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tob-primary);
    box-shadow: 0 0 0 3px rgba(15, 44, 89, 0.15);
}

/* ========================================================
   Floating Chatbot Widget
   ======================================================== */
.chatbot-widget-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1040;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--tob-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 20px rgba(15, 44, 89, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-widget-btn:hover {
    transform: scale(1.08);
    background-color: var(--tob-primary-dark);
    color: #ffffff;
}

.chatbot-badge-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.chatbot-window {
    position: fixed;
    bottom: 96px;
    left: 24px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--tob-border);
    display: flex;
    flex-direction: column;
    z-index: 1045;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom left;
}

.chatbot-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9) translateY(20px);
}

.chatbot-header {
    background: var(--tob-primary);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tob-primary);
    font-size: 1.2rem;
}

.chatbot-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.chat-bubble.bot {
    background-color: #ffffff;
    color: var(--tob-dark);
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-bottom-right-radius: 4px;
}

.chat-bubble.user {
    background-color: var(--tob-primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-left-radius: 4px;
}

.chat-faq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.faq-chip {
    background: #e2e8f0;
    color: var(--tob-primary);
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s ease;
}

.faq-chip:hover {
    background: #cbd5e1;
}

.chat-timestamp {
    font-size: 0.68rem;
    opacity: 0.65;
    text-align: left;
    margin-top: 4px;
}

.chat-bubble.bot .chat-timestamp {
    text-align: left;
    color: var(--tob-muted);
}

.chat-bubble.user .chat-timestamp {
    text-align: left;
    color: rgba(255, 255, 255, 0.8);
}

.chat-track-card {
    background-color: #f8fafc;
    border: 1px solid var(--tob-border);
    transition: all 0.2s ease;
}

.chat-track-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* مؤشر الكتابة المتحرك بالنقاط الثلاث */
.chat-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}

.chat-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--tob-accent);
    display: inline-block;
    animation: chatBouncingDot 1.4s infinite ease-in-out both;
}

.chat-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes chatBouncingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chatbot-input-area {
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid var(--tob-border);
    display: flex;
    gap: 8px;
}

/* ========================================================
   Footer
   ======================================================== */
.footer-tobaktous {
    background-color: var(--tob-primary-dark);
    color: #cbd5e1;
    padding: 60px 0 25px 0;
    border-top: 4px solid var(--tob-primary);
}

.footer-tobaktous h5 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-tobaktous h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 2px;
    background-color: #3b82f6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.92rem;
}

.footer-contact-item i {
    color: #60a5fa;
    font-size: 1.1rem;
    margin-top: 3px;
}

.footer-bottom {
    margin-top: 45px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ========================================================
   Portal & Dashboard Specific
   ======================================================== */
.portal-sidebar {
    background: #ffffff;
    border: 1px solid var(--tob-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--tob-shadow);
}

.portal-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: var(--tob-dark);
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.portal-menu-link:hover,
.portal-menu-link.active {
    background-color: var(--tob-accent-soft);
    color: var(--tob-primary);
}

.portal-stat-card {
    background: #ffffff;
    border: 1px solid var(--tob-border);
    border-radius: 10px;
    padding: 22px;
    box-shadow: var(--tob-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--tob-accent-soft);
    color: var(--tob-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .chatbot-widget-btn {
        bottom: 76px;
    }
    .chatbot-window {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 145px;
    }
}

/* ========================================================
   Floating WhatsApp Business Widget
   ======================================================== */
.whatsapp-float-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
}

.whatsapp-float-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float-btn:hover {
    color: #ffffff;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-float-btn i {
    font-size: 2rem;
    line-height: 1;
}

.whatsapp-float-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: pulse-whatsapp 2s infinite;
    pointer-events: none;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(0.95);
        opacity: 0.9;
    }
    70% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* ========================================================
   Mobile Sticky Quick Contact Bar
   ======================================================== */
.mobile-sticky-contact-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 8px 10px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    border-top: 1px solid #e2e8f0;
}

.btn-mobile-call,
.btn-mobile-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-mobile-call {
    background-color: var(--tob-primary);
    color: #ffffff;
}

.btn-mobile-call:hover,
.btn-mobile-call:active {
    background-color: var(--tob-primary-dark);
    color: #ffffff;
}

.btn-mobile-whatsapp {
    background-color: #25D366;
    color: #ffffff;
}

.btn-mobile-whatsapp:hover,
.btn-mobile-whatsapp:active {
    background-color: #1eb857;
    color: #ffffff;
}

/* ========================================================
   Authentication Pages (Login & Register Split Layout)
   ======================================================== */
.auth-side-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: transparent;
}

.auth-side-branding img {
    border: 1px solid rgba(15, 44, 89, 0.08);
    box-shadow: 0 10px 25px -5px rgba(15, 44, 89, 0.08);
    transition: transform 0.3s ease;
}

.auth-side-branding img:hover {
    transform: translateY(-3px);
}


