/* =====================================================
   SERVICECONNECT — UPGRADED UI v14
   Cleaned, Responsive, Animated, Accessible
   Drop-in replacement for assets/css/style.css
   ===================================================== */

:root{
  --primary: #0b3d91;
  --primary-600: #0a2f6e;
  --accent: #06b6d4;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --success: #1fb366;
  --danger: #ef4444;

  --radius: 12px;
  --shadow-sm: 0 4px 12px rgba(11,61,145,0.06);
  --shadow-md: 0 8px 28px rgba(2,6,23,0.08);
  --max-width: 1200px;

  --transition-fast: 160ms;
  --transition-medium: 320ms;
  --nav-height: 64px;
}

/* ---------------------------------------------------
   Base / Reset
--------------------------------------------------- */
*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce){
  :root{ --transition-fast: 0ms; --transition-medium: 0ms }
  *{ animation:none!important; transition:none!important; }
}

/* ---------------------------------------------------
   Utilities
--------------------------------------------------- */
.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:20px;
}
.hidden{ display:none!important }
.text-center{ text-align:center }
.mt-12{ margin-top:12px }
.mb-12{ margin-bottom:12px }

/* ---------------------------------------------------
   HEADER + NAVIGATION
--------------------------------------------------- */
.header{
  position:sticky;
  top:0;
  z-index:1200;
  background:linear-gradient(90deg,var(--primary),#0a6ad1);
  color:#fff;
  height:var(--nav-height);
  display:flex;
  align-items:center;
  box-shadow:var(--shadow-md);
}

.header-inner{
  width:100%;
  max-width:var(--max-width);
  padding:0 16px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:700;
  font-size:18px;
}
.brand img{ height:44px }

/* Desktop nav */
.header nav{
  display:flex;
  gap:12px;
  align-items:center;
}
.header nav a{
  color:#fff;
  font-weight:600;
  padding:8px 10px;
  border-radius:8px;
  text-decoration:none;
  transition:background var(--transition-fast), transform var(--transition-fast);
}
.header nav a:hover{
  background:rgba(255,255,255,0.1);
  transform:translateY(-2px);
}

/* Mobile toggle */
.mobile-toggle{
  display:none;
  padding:8px;
  font-size:24px;
  background:transparent;
  border:0;
  color:#fff;
  cursor:pointer;
}

/* Mobile navigation */
@media(max-width:900px){
  .mobile-toggle{ display:block }

  .header nav{
    display:none;
    position:absolute;
    left:0; right:0;
    top:var(--nav-height);
    flex-direction:column;
    background:linear-gradient(180deg,var(--primary),#0a6ad1);
    padding:18px;
    gap:12px;
    border-bottom-left-radius:14px;
    border-bottom-right-radius:14px;
    box-shadow:0 10px 30px rgba(0,0,0,.2);
  }
  .header nav.show{ display:flex }
}

/* ---------------------------------------------------
   SIDEBAR
--------------------------------------------------- */
.sidebar{
  width:260px;
  background:var(--card);
  border-right:1px solid #e5eaf5;
  padding:18px;
  box-shadow:var(--shadow-sm);
}
.sidebar .menu a{
  display:block;
  padding:10px;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  color:var(--text);
}
.sidebar .menu a:hover,
.sidebar .menu a.active{
  background:linear-gradient(90deg,var(--primary),#0a6ad1);
  color:#fff;
}

@media(max-width:900px){
  .sidebar{
    position:fixed;
    left:-260px;
    top:0;
    height:100%;
    z-index:1300;
    transition:left var(--transition-medium);
  }
  .sidebar.show{ left:0 }
  .sidebar-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    display:none;
    z-index:1290;
  }
  .sidebar-backdrop.show{ display:block }
}

/* ---------------------------------------------------
   CARDS
--------------------------------------------------- */
.card{
  background:var(--card);
  padding:18px;
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  border:1px solid rgba(0,0,0,0.03);
  transition:transform var(--transition-fast);
}
.card:hover{ transform:translateY(-6px) }

/* ---------------------------------------------------
   BUTTONS
--------------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  background:var(--primary);
  color:#fff;
  border-radius:10px;
  border:0;
  cursor:pointer;
  font-weight:700;
  text-decoration:none;
  transition:transform var(--transition-fast), filter var(--transition-fast);
}
.btn:hover{
  transform:translateY(-2px);
  filter:brightness(1.05);
}

.btn.ghost{
  background:transparent;
  color:var(--primary);
  border:1px solid #c3d1e6;
}
.btn.small{
  padding:8px 12px;
  font-size:14px;
}

/* ---------------------------------------------------
   FORMS
--------------------------------------------------- */
.input, input, textarea, select{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid #dbe3f0;
  background:#fff;
  font-size:15px;
  transition:border var(--transition-fast), box-shadow var(--transition-fast);
}
.input:focus, input:focus, textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(11,61,145,0.15);
  outline:none;
}
.field{ margin-bottom:14px }

/* ---------------------------------------------------
   HERO SECTION
--------------------------------------------------- */
.hero{
  padding:64px 20px;
  text-align:center;
  background:linear-gradient(90deg,#e6f2ff,#eafff3);
  border-bottom:1px solid #e1e7f0;
}
.hero h1{
  font-size:36px;
  color:var(--primary);
  font-weight:800;
  margin-bottom:8px;
}
.hero p{
  color:var(--muted);
  max-width:760px;
  margin:0 auto 18px;
}

/* ---------------------------------------------------
   SERVICE GRID
--------------------------------------------------- */
.services-grid .grid{
  display:grid;
  gap:18px;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.service-card{
  padding:18px;
  border-radius:12px;
  background:#fff;
  transition:transform var(--transition-fast), box-shadow var(--transition-fast);
}
.service-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-md);
}

/* ---------------------------------------------------
   CHAT
--------------------------------------------------- */
.chat-window{
  padding:14px;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#f7faff);
  max-height:60vh;
  overflow-y:auto;
  box-shadow:var(--shadow-sm);
}
.msg{
  margin:8px 0;
  padding:10px 14px;
  border-radius:12px;
  background:#eef5ff;
  max-width:80%;
}
.msg.me{
  margin-left:auto;
  background:linear-gradient(90deg,var(--primary),var(--primary-600));
  color:#fff;
}

/* ---------------------------------------------------
   TOAST
--------------------------------------------------- */
.toast{
  position:fixed;
  right:20px;
  bottom:20px;
  background:#0b3d91;
  color:#fff;
  padding:12px 18px;
  border-radius:10px;
  display:none;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.toast.show{ display:block }

/* ---------------------------------------------------
   FOOTER
--------------------------------------------------- */
.footer{
  background:linear-gradient(180deg,#072031,#0b2546);
  color:#fff;
  padding:40px 20px;
  margin-top:30px;
}
.footer .columns{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  max-width:var(--max-width);
  margin:0 auto;
  gap:24px;
}
.footer a{
  color:#d6e6ff;
  text-decoration:none;
}
.footer .sponsor{
  margin-top:18px;
  text-align:center;
  color:#93e8c6;
  font-weight:700;
}
@media(max-width:900px){
  .footer .columns{
    grid-template-columns:1fr;
    text-align:center;
  }
}
