/* ===========================
   AIMC Portal - Custom Styles
   =========================== */

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Desktop Nav Dropdown
   =========================== */

.dropdown-menu {
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav-item:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: dropdownIn 0.15s ease forwards;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   Form Inputs
   =========================== */

.form-input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
  outline: none;
}

.form-input::placeholder {
  color: #94a3b8;
}

/* Select element custom 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='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
}

/* ===========================
   Card Hover Effects
   =========================== */

.program-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -8px rgba(0, 102, 204, 0.15);
}

/* ===========================
   Smooth Scroll & Transitions
   =========================== */

html {
  scroll-behavior: smooth;
}

a {
  transition: color 0.15s ease;
}

/* ===========================
   Sticky Header Enhancement
   =========================== */

header {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ===========================
   Progress Bar
   =========================== */

.progress-bar {
  transition: width 0.6s ease;
}

/* ===========================
   Mobile Menu Animation
   =========================== */

#mobile-menu {
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

#mobile-menu.hidden {
  display: none;
}

/* ===========================
   Stat Number Animation
   =========================== */

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-number {
  animation: countUp 0.5s ease forwards;
}

/* ===========================
   Custom Scrollbar
   =========================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0f4f8;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===========================
   Print Styles
   =========================== */

@media print {
  header, footer, .no-print {
    display: none !important;
  }
  body {
    background: white;
  }
}

/* ===========================
   Focus Visible (Accessibility)
   =========================== */

:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===========================
   Business Directory — Markdown description
   =========================== */

.biz-description p        { margin-bottom: 0.75rem; }
.biz-description h1,
.biz-description h2,
.biz-description h3,
.biz-description h4       { font-weight: 600; margin-top: 1rem; margin-bottom: 0.4rem; }
.biz-description h1       { font-size: 1.2rem; }
.biz-description h2       { font-size: 1.1rem; }
.biz-description h3,
.biz-description h4       { font-size: 1rem; }
.biz-description ul       { list-style: disc; padding-left: 1.4rem; margin-bottom: 0.75rem; }
.biz-description ol       { list-style: decimal; padding-left: 1.4rem; margin-bottom: 0.75rem; }
.biz-description li       { margin-bottom: 0.2rem; }
.biz-description strong,
.biz-description b        { font-weight: 600; }
.biz-description em,
.biz-description i        { font-style: italic; }
.biz-description a        { color: #0066cc; text-decoration: underline; }
.biz-description blockquote { border-left: 3px solid #e2e8f0; padding-left: 0.75rem; color: #64748b; margin-bottom: 0.75rem; }
.biz-description code     { background: #f0f4f8; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em; font-family: monospace; }
.biz-description pre      { background: #f0f4f8; padding: 0.75rem; border-radius: 8px; overflow-x: auto; margin-bottom: 0.75rem; }
.biz-description pre code { background: none; padding: 0; }
.biz-description hr       { border: none; border-top: 1px solid #e2e8f0; margin: 1rem 0; }

/* ===========================
   EasyMDE editor (Tailwind preflight reset fix)
   =========================== */

.easymde-wrap .CodeMirror { height: auto; min-height: 120px; font-family: inherit; font-size: 0.875rem; line-height: 1.5; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 0.5rem 0.5rem; }
.easymde-wrap .editor-toolbar { border: 1px solid #e2e8f0; border-radius: 0.5rem 0.5rem 0 0; padding: 4px 6px; }
.easymde-wrap .editor-toolbar button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 4px; background: none; border: none; cursor: pointer; color: #374151; opacity: 0.8; }
.easymde-wrap .editor-toolbar button:hover,
.easymde-wrap .editor-toolbar button.active { background: #e8f1fb; opacity: 1; }
.easymde-wrap .editor-toolbar i.separator { border-left: 1px solid #e2e8f0; margin: 0 4px; }
.easymde-wrap .CodeMirror-scroll { min-height: 120px; }
.easymde-wrap .editor-preview { padding: 0.75rem; font-size: 0.875rem; line-height: 1.6; }
.easymde-wrap .editor-preview p { margin-bottom: 0.5rem; }

/* ===========================
   Tailwind/Custom Utility Overrides
   =========================== */

/* Ensure gradient text works cross-browser */
.gradient-text {
  background: linear-gradient(135deg, #0066cc, #0052a3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
