/* ==========================================================================
   1. VARIABLES & BASE STYLES
   ========================================================================== */
:root {
  --primary: #2dc0e8;
  --primary-dark: #3294c3;
  --primary-light: #00c6fb;
  --secondary: #626262;
  --dark: #2d2d2d;
  --light-gray: #f4f4f4;
  --border-color: #ebebeb;
  --light-text: #adadad;
}

body { 
  color: var(--secondary); 
  font-family: 'Open Sans', sans-serif; 
}

h1, h2, h3, h4, h5, h6 { 
  color: var(--dark); 
  font-family: 'Roboto', sans-serif; 
  font-weight: 500; 
}

a { 
  color: var(--primary); 
  text-decoration: none; 
  transition: .3s; 
}

a:hover { 
  color: var(--primary-dark); 
}

/* ==========================================================================
   2. UTILITIES & BUTTONS
   ========================================================================== */
.bg-primary { 
  background: linear-gradient(45deg, var(--primary-light) 0%, var(--primary-dark) 100%) !important; 
}

.text-primary { 
  color: var(--primary) !important; 
}

.bg-light { 
  background-color: var(--light-gray) !important; 
}

.btn-primary { 
  background: var(--primary); 
  border-color: var(--primary); 
}

.btn-primary:hover { 
  background: var(--primary-dark); 
  border-color: var(--primary-dark); 
}

.btn-light { 
  background: rgba(255, 255, 255, .7); 
  border-color: var(--border-color); 
}

.btn-light:hover { 
  background: rgba(255, 255, 255, .39); 
}

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
.navbar { 
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1); 
}

.navbar-light .navbar-nav .nav-link {
  color: var(--secondary); 
  text-transform: uppercase; 
  font-size: .9rem; 
  letter-spacing: 1px;
  padding: 10px; 
  margin: 10px; 
  font-family: 'Lato', sans-serif;
  border-top: 3px solid transparent;
  transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--dark); 
  border-top: 3px solid var(--primary); 
  padding-top: 7px;
}

.navbar-light .navbar-nav .nav-link.active { 
  color: var(--dark); 
}

/* ==========================================================================
   4. SECTIONS & HERO CAROUSEL
   ========================================================================== */
.hero-section { 
  margin-bottom: 0; 
}

.carousel-item {
  height: 400px; 
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat;
}

.carousel-overlay { 
  position: absolute; 
  inset: 0; 
  background: rgba(0, 0, 0, .35); 
  pointer-events: none; 
  z-index: 1; 
}

.hero-section .carousel .container { 
  position: relative; 
  z-index: 2; 
}

.intro-section { 
  background: linear-gradient(45deg, var(--primary-light) 0%, var(--primary-dark) 100%); 
  color: #fff; 
}

#op-home .card-title { 
  margin-top: 1rem; 
  margin-bottom: .75rem; 
}

#op-feat .feature-card { 
  padding: 20px; 
  height: 100%; 
}

#op-feat i, #op-feat h5 { 
  color: #fff; 
}

#op-feat h5 { 
  margin-bottom: 1rem; 
}

/* ==========================================================================
   5. GALLERY & LIGHTBOX
   ========================================================================== */
.screenshots-gallery img { 
  transition: .3s; 
  margin-bottom: 1rem; 
}

.screenshots-gallery img:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 10px 20px rgba(0, 0, 0, .1); 
}

.gallery-img { 
  cursor: pointer; 
  transition: transform .3s ease; 
}

.gallery-img:hover { 
  transform: scale(1.03); 
}

.lightbox {
  display: none; 
  position: fixed; 
  inset: 0; 
  z-index: 9999; 
  background: rgba(0, 0, 0, .9);
  justify-content: center; 
  align-items: center;
}

.lightbox-content { 
  max-width: 90%; 
  max-height: 90%; 
}

.lightbox-close {
  position: absolute; 
  top: 20px; 
  right: 20px; 
  color: #fff; 
  font-size: 30px; 
  background: none; 
  border: none; 
  cursor: pointer;
}

/* ==========================================================================
   6. FORMS & MODALS
   ========================================================================== */
.contact-form .form-control {
  padding: .75rem 1rem; 
  border-radius: .25rem; 
  background: #fff; 
  border: 1px solid #d0d7de;
}

.contact-form .form-control:focus {
  border-color: var(--primary-dark); 
  box-shadow: 0 0 0 .2rem rgba(50, 148, 195, .15);
}

.hp-field {
  position: absolute !important; 
  left: -10000px !important; 
  top: auto !important;
  width: 1px !important; 
  height: 1px !important; 
  overflow: hidden !important;
}

.modal.modal-right .modal-dialog {
  position: fixed; 
  margin: 0; 
  right: 0; 
  top: 0; 
  height: 100dvh; 
  transform: none !important;
}

.modal.modal-right .modal-content { 
  height: 100dvh; 
  border-radius: 0; 
  border-left: 1px solid rgba(0, 0, 0, .1); 
}

.modal.modal-right .modal-header { 
  background: #fff; 
  color: inherit; 
  border-bottom: 1px solid #e9ecef; 
}

.modal.modal-right .modal-body { 
  background: #f7f9fc; 
  overflow-y: auto; 
}

/* ==========================================================================
   7. AI ASSISTANT WIDGET
   ========================================================================== */
.ai-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ai-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ffc107;
  color: #212529;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-fab:hover {
  transform: scale(1.1);
  background-color: #e0a800;
}

#aiChatBox {
  width: 350px;
  height: 500px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid #e9ecef;
}

.chat-box-hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  position: absolute; 
}

.chat-box-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  position: relative;
}

.chat-header {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #212529;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-body {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f8f9fa;
}

.chat-footer {
  padding: 12px;
  background: #fff;
  border-top: 1px solid #e9ecef;
}

/* Chat Bubbles */
.user-bubble {
  background-color: var(--primary);
  color: #fff;
  border-radius: 15px 15px 0 15px;
  display: inline-block;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ai-bubble {
  background-color: #fff;
  color: #333;
  border: 1px solid #e9ecef;
  border-radius: 15px 15px 15px 0;
  display: inline-block;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* AI Typing Indicator */
.typing-indicator { display: inline-block; }
.typing-dots { display: inline-block; }
.typing-dots span {
  animation: typing 1.4s infinite;
  opacity: 0.6;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.6; }
  30% { opacity: 1; }
}

/* Chat Custom Scrollbar */
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }
.chat-body::-webkit-scrollbar-thumb { background: #cbd3da; border-radius: 10px; }
.chat-body::-webkit-scrollbar-thumb:hover { background: #aeb7c0; }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.footer-map iframe { 
  filter: grayscale(100%) contrast(1.05); 
}

footer.bg-dark h4 { 
  color: #d8dde3 !important; 
}

footer.bg-dark .text-secondary { 
  color: #c2c8cf !important; 
}

/* ==========================================================================
   9. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (min-width: 992px) {
  .modal.modal-right .modal-dialog { 
    max-width: 50vw; 
    width: 50vw; 
  }
}

@media (max-width: 991.98px) {
  .modal.modal-right .modal-dialog { 
    width: 100vw; 
    max-width: 100vw; 
  }
}

@media (max-width: 768px) {
  .carousel-item { 
    height: 380px; 
  }
  .py-5 { 
    padding-top: 3rem !important; 
    padding-bottom: 3rem !important; 
  }
  
  /* Make AI chat fit better on mobile screens */
  #aiChatBox {
    width: calc(100vw - 50px);
    height: 450px;
  }
}

@media (max-width: 480px) {
  .carousel-item { 
    height: 200px; 
  }
  .py-5 { 
    padding-top: 2rem !important; 
    padding-bottom: 2rem !important; 
  }
}