/* =========================================================
   LIBRAA OFFSHORE & SHIP MANAGEMENT - REDESIGN STYLES
   Motto: Our Strength: International Expertise + Local Knowledge
   RPSL No: RPSL-CHN-014
   ========================================================= */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --bg-primary: #030816;
  --bg-secondary: #071228;
  --bg-card: rgba(12, 27, 56, 0.65);
  --border-subtle: rgba(30, 58, 112, 0.4);
  --border-cyan: rgba(56, 189, 248, 0.3);

  --cyan-primary: #0ea5e9;
  --cyan-light: #38bdf8;
  --amber-accent: #f59e0b;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-primary);
  scrollbar-width: thin;
  scrollbar-color: #0c1b38 #030816;
}

body {
  background-color: #030816;
  color: #f1f5f9;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Maritime Scrollbar (WebKit & Gecko) */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #030816;
}
::-webkit-scrollbar-thumb {
  background: #0c1b38;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: #1b3b78;
}

/* Typography Helpers */
.font-display {
  font-family: var(--font-display);
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Glassmorphic Marine Cards */
.glass-card {
  background: rgba(7, 18, 40, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(30, 58, 112, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.7), 0 0 20px -5px rgba(14, 165, 233, 0.15);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
  color: #ffffff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  background: rgba(12, 27, 56, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(27, 59, 120, 0.8);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Form Controls */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(3, 8, 22, 0.85);
  border: 1px solid #1e3a70;
  border-radius: 0.75rem;
  color: #f8fafc;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-input::placeholder {
  color: #64748b;
}

/* Custom Select Dropdown Arrow */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2338bdf8' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem 1.25rem;
  padding-right: 2.75rem;
  cursor: pointer;
}

/* Nav Link Hover Underline */
.nav-link {
  position: relative;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #38bdf8;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Fade in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .btn-primary, .btn-secondary {
    padding: 0.65rem 1.25rem;
  }
}

/* =========================================================
   CINEMATIC HERO BACKGROUND VIDEO
   ========================================================= */
#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* =========================================================
   THEME TOGGLE BUTTON
   ========================================================= */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem;
  border-radius: 0.75rem;
  background: rgba(12, 27, 56, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.theme-btn:hover {
  background: rgba(27, 59, 120, 0.9);
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* =========================================================
   LIGHT THEME MODE (.light-theme)
   ========================================================= */
body.light-theme {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

body.light-theme header#main-header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .nav-link {
  color: #475569 !important;
}

body.light-theme .nav-link:hover {
  color: #0284c7 !important;
}

body.light-theme #hero {
  background-color: #f8fafc !important;
}

body.light-theme #hero .bg-gradient-to-b {
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.65) 0%, rgba(248, 250, 252, 0.45) 40%, rgba(248, 250, 252, 0.98) 100%) !important;
}

body.light-theme #hero h1 {
  color: #0f172a !important;
}

body.light-theme #hero p {
  color: #334155 !important;
}

body.light-theme #hero strong {
  color: #0f172a !important;
}

body.light-theme #hero .inline-flex.rounded-full {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08) !important;
}

body.light-theme section {
  background-color: #f8fafc;
  border-color: #e2e8f0 !important;
}

body.light-theme section:nth-of-type(even) {
  background-color: #ffffff;
}

body.light-theme .glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06) !important;
}

body.light-theme .glass-card:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 16px 32px -4px rgba(14, 165, 233, 0.12) !important;
}

/* Typography in Light Mode */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: #0f172a !important;
}

body.light-theme p,
body.light-theme .text-slate-300,
body.light-theme .text-slate-400 {
  color: #334155 !important;
}

body.light-theme .text-slate-100,
body.light-theme .text-slate-200 {
  color: #1e293b !important;
}

body.light-theme .text-slate-500 {
  color: #64748b !important;
}

body.light-theme .text-white {
  color: #0f172a !important;
}

body.light-theme .btn-primary,
body.light-theme .btn-primary *,
body.light-theme .bg-cyan-500,
body.light-theme .bg-cyan-500 *,
body.light-theme .bg-sky-500,
body.light-theme .bg-sky-500 * {
  color: #ffffff !important;
}

/* Sections & Containers */
body.light-theme section {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #about,
body.light-theme #fleet,
body.light-theme #compliance,
body.light-theme #contacts {
  background-color: #f8fafc !important;
}

body.light-theme #services,
body.light-theme #motion,
body.light-theme #clients,
body.light-theme #careers {
  background-color: #ffffff !important;
}

body.light-theme [class*="bg-marine-900"],
body.light-theme [class*="bg-marine-950"],
body.light-theme [class*="bg-slate-900"],
body.light-theme [class*="bg-slate-950"] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light-theme [class*="border-slate-800"],
body.light-theme [class*="border-slate-700"],
body.light-theme [class*="border-slate-900"] {
  border-color: #e2e8f0 !important;
}

body.light-theme .glass-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.07) !important;
}

body.light-theme .glass-card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 16px 32px -4px rgba(2, 132, 199, 0.12) !important;
}

body.light-theme .btn-secondary {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .btn-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

body.light-theme .form-input {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme select.form-input {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230284c7' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1.25rem 1.25rem !important;
  color: #0f172a !important;
}

body.light-theme select.form-input option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body.light-theme .form-input:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

body.light-theme .form-input::placeholder {
  color: #94a3b8 !important;
}

body.light-theme #mobile-drawer {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #mobile-drawer a {
  color: #1e293b !important;
}

body.light-theme #crew-modal > div:last-child {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .theme-btn-floating {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.4) !important;
}

body.light-theme #theme-toggle-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme footer {
  background-color: #071228 !important;
  color: #94a3b8 !important;
}

body.light-theme footer h4 {
  color: #ffffff !important;
}

body.light-theme footer p,
body.light-theme footer a {
  color: #94a3b8 !important;
}

body.light-theme footer a:hover {
  color: #38bdf8 !important;
}

/* ==================== LIBRAA MARITIME CHATBOT STYLES ==================== */
#libraa-chat-panel {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.18);
  animation: chatPanelSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatPanelSlideIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.chat-bubble-bot {
  background: rgba(12, 27, 56, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #f1f5f9;
  border-radius: 1rem 1rem 1rem 0.25rem;
  padding: 0.75rem 0.9rem;
  line-height: 1.55;
}

.chat-bubble-user {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-radius: 1rem 1rem 0.25rem 1rem;
  padding: 0.65rem 0.9rem;
  line-height: 1.45;
  margin-left: auto;
  max-width: 85%;
}

.chat-chip-btn {
  background: rgba(7, 18, 40, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  border-radius: 9999px;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.chat-chip-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.4rem;
}

.chat-action-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

/* Light Theme Chatbot Overrides */
body.light-theme #libraa-chat-panel {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.2), 0 0 25px rgba(2, 132, 199, 0.12) !important;
}

body.light-theme #libraa-chat-panel .bg-gradient-to-r {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #libraa-chat-panel h3 {
  color: #0f172a !important;
}

body.light-theme .chat-bubble-bot {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme #chat-chips-container {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-theme .chat-chip-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0284c7 !important;
}

body.light-theme .chat-chip-btn:hover {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

body.light-theme #chat-input-form {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light-theme #chat-user-input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme #chat-user-input::placeholder {
  color: #94a3b8 !important;
}

body.light-theme .chat-action-btn {
  background: rgba(2, 132, 199, 0.1) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

body.light-theme .chat-action-btn:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
}

