/* SpaceGroup Custom Styles - Mobile First Design */

/* Root Variables */
:root {
    --primary-red: #F02020;
    --primary-hover: #C01818;
    --bg-light: #F8F9FA;
    --text-primary: #222222;
    --text-secondary: #666666;
    --border-color: #E5E7EB;
    --warning-color: #FFC857;
    /* Colour palette */
    --primary: #D62828;
    --secondary: #6C757D;
    --background: #FFFFFF;
    --section-bg: #F8F9FA;
    --text: #212529;
    --border: #E9ECEF;
}


html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  direction: rtl;
}

html, body {
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
}
/*  pinch zoom */
body {
    touch-action: manipulation;
}

.bg-primary-red {
    background: var(--primary-red) !important;
}

/* Body & Typography */
body {
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
}

/* Primary Button */
.btn-space-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: #FFFFFF;
    border-radius: 999px;
    padding: 12px 32px;
    font-weight: 600;
}

.btn-space-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #FFFFFF;
}

/* Navbar */
.navbar-space {
    background-color: var(--primary-red);
    min-height: 60px;
}

.navbar-space .navbar-brand {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-space .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-space .nav-link:hover {
    color: #FFFFFF;
}

/* Bottom Navigation Bar - Mobile Only */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-red);
}

.testimonial-card .card-body {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.faq-banner {
    background: url('https://october.eu/wp-content/uploads/2019/07/FAQs.svg') center/contain no-repeat;
    min-height: 320px;
}
.faq-accordion .accordion-button:not(.collapsed) {
    color: #d32f2f;
    background-color: #fff5f5;
}

.bottom-nav-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

.bottom-nav-item span {
    font-size: 0.75rem;
    display: block;
}

/* Service Cards */
.service-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    border-top: 3px solid var(--primary-red);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Hero Section */
#hero {
  position: relative;
  background: linear-gradient(to bottom right, #ffffff, #F8F9FA);
  padding: 4rem 1rem;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}
.hero-text {
  flex: 1;
}
.hero-text h1 {
  font-size: 2.7rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--secondary);
}
.hero-buttons {
  display: flex;
  gap: 1rem;
}
.hero-buttons a {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.hero-buttons a:hover {
  opacity: 0.85;
}
.hero-form {
  flex: 0 0 400px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.hero-form form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.hero-form form input,
.hero-form form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--section-bg);
  font-size: 0.9rem;
  color: var(--text);
}
.hero-form form button {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.hero-form form button:hover {
  opacity: 0.9;
}

/* Admin Sidebar */
.admin-sidebar {
    background-color: #FFFFFF;
    min-height: calc(100vh - 56px);
    border-left: 1px solid var(--border-color);
    padding: 0;
}

.admin-sidebar .nav-link {
    color: var(--text-primary);
    padding: 12px 20px;
    border-right: 3px solid transparent;
    transition: all 0.3s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(240, 32, 32, 0.05);
    border-right-color: var(--primary-red);
    color: var(--primary-red);
}

/* Badges */
.badge-space {
    background-color: var(--primary-red);
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    background-color: #FFFFFF;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: 60px;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 70px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }
    
    .hero-section {
        padding: 80px 40px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.25rem rgba(240, 32, 32, 0.15);
}

/* Card Hover Effects */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Status Badges */
.status-new {
    background-color: #17a2b8;
}

.status-under_review {
    background-color: #ffc107;
}

.status-in_progress {
    background-color: #007bff;
}

.status-completed {
    background-color: #28a745;
}

.status-rejected {
    background-color: #dc3545;
}

/* Utility Classes */
.text-secondary-light {
    color: var(--text-secondary);
}

.border-light-custom {
    border-color: var(--border-color) !important;
}

/* Widget Container */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    direction: rtl;
}
/* Toggle Button */
.chatbot-button {
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 24px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(240, 32, 32, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.chatbot-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.chatbot-button:hover::before {
    width: 300px;
    height: 300px;
}
.chatbot-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(240, 32, 32, 0.4);
    background: var(--primary-hover);
}
.chatbot-button:active {
    transform: translateY(-1px);
}
.chatbot-button i {
    font-size: 22px;
    z-index: 1;
}
.chatbot-button span {
    z-index: 1;
}
/* Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--warning-color);
    color: var(--text-primary);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid white;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
/* Chat Panel */
.chatbot-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 400px;
    max-height: 650px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.chatbot-panel.open {
    display: flex;
}
/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.chatbot-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}
.chatbot-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: white;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    object-fit: cover;
}
.chatbot-header-text {
    flex: 1;
}
.chatbot-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-indicator {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 2s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.chatbot-subtitle {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 400;
}
.chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}
.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}
/* Messages Area */
.chatbot-messages {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: var(--bg-light);
    min-height: 350px;
    max-height: 450px;
}
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}
.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.welcome-icon i {
    font-size: 36px;
    color: white;
}
.welcome-message h5 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 18px;
}
.welcome-message p {
    font-size: 14px;
    line-height: 1.6;
}
/* Message Wrapper */
.message-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeInUp 0.4s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.message-wrapper.user {
    flex-direction: row-reverse;
}
.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Message Bubbles */
.chatbot-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 75%;
    word-wrap: break-word;
    position: relative;
}
.chatbot-bubble.user {
    background: var(--primary-red);
    color: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(240, 32, 32, 0.2);
}
.chatbot-bubble.bot {
    background: white;
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}
/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}
.chatbot-typing.d-none {
    display: none !important;
}
.typing-dots {
    display: flex;
    gap: 4px;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-red);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}
.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}
/* Error Message */
.chatbot-error {
    color: var(--primary-red);
    font-size: 13px;
    padding: 8px 20px;
    background: rgba(240, 32, 32, 0.05);
    border-top: 1px solid rgba(240, 32, 32, 0.1);
    display: none;
}
.chatbot-error:not(:empty) {
    display: block;
}
/* Form */
.chatbot-form {
    padding: 16px 20px 20px;
    background: white;
    border-top: 1px solid var(--border-color);
}
.chatbot-form label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}
.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chatbot-form textarea {
    flex: 1;
    resize: none;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s;
    min-height: 46px;
    max-height: 120px;
}
.chatbot-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(240, 32, 32, 0.1);
}
.chatbot-form textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}
.send-button {
    background: var(--primary-red);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}
.send-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 32, 32, 0.3);
}
.send-button:active:not(:disabled) {
    transform: translateY(0);
}
.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.send-button i {
    font-size: 18px;
}
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-secondary);
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }
    .chatbot-button {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .chatbot-button span {
        display: none;
    }
    .chatbot-panel {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 100px);
        left: 0;
        right: 0;
    }
    .chatbot-messages {
        max-height: calc(100vh - 340px);
    }
    .chatbot-bubble {
        max-width: 85%;
    }
}
@media (max-width: 480px) {
    .chatbot-header {
        padding: 16px;
    }
    .chatbot-avatar {
        width: 44px;
        height: 44px;
    }
    .chatbot-title {
        font-size: 15px;
    }
    .chatbot-subtitle {
        font-size: 12px;
    }
    .chatbot-messages {
        padding: 16px;
    }
    .welcome-icon {
        width: 70px;
        height: 70px;
    }
    .welcome-icon i {
        font-size: 30px;
    }
}
/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .chatbot-panel {
        max-height: calc(100vh - 80px);
    }
    .chatbot-messages {
        max-height: calc(100vh - 280px);
        min-height: 200px;
    }
    .welcome-message {
        padding: 20px;
    }
}