/*!
 * =========================================================
 * VISTOUSO ACADEMY THEME — MASTER default.css (PRODUCTION)
 * Chamilo LMS 1.11.x
 *
 * Includes:
 * - Original Vistouso Theme (navbar/footer/etc) — PRESERVED
 * - v1.1 Typography overlay (WP-like) — PRESERVED
 * - v1.2 Micro-interactions — PRESERVED
 * - FE-1 Course Home UX (tool cards) — PRESERVED
 * - Button hover/focus fixes — PRESERVED
 * - FE-2 Learning Path UX — PRESERVED
 * - FE-3 Exercise UX — PRESERVED
 * - LP Content Components (vs-*) — MERGED from inline LP CSS
 *
 * Goal:
 * - ONE CSS file globally
 * - No CSS inside Learning Path HTML
 * =========================================================
 */

/* =========================================================
   0) FONT FACES (original)
   ========================================================= */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  src: url(../chamilo/fonts/OpenSans-Light.woff2) format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url(../chamilo/fonts/OpenSans.woff2) format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: url(../chamilo/fonts/OpenSans-Semibold.woff2) format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: url(../chamilo/fonts/OpenSans-Bold.woff2) format('woff2');
}

/* =========================================================
   1) CSS VARIABLES — SINGLE SOURCE OF TRUTH
   + Backward-compatible aliases for existing LP HTML
   ========================================================= */
:root {
  /* Canonical */
  --va-blue: #0d8fe3;
  --va-blue-dark: #0876c0;
  --va-green: #3ab500;

  /* Base neutrals */
  --va-bg: #f5f7fa;
  --va-card-bg: #ffffff;
  --va-text-main: #1f2937;
  --va-text-body: #374151;
  --va-text-muted: #6b7280;
  --va-border: #e5e7eb;

  /* Radii */
  --va-radius-sm: 10px;
  --va-radius-md: 14px;
  --va-radius-lg: 18px;
  --va-radius-xl: 22px;

  /* Shadows */
  --va-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --va-shadow-md: 0 6px 18px rgba(0,0,0,0.06);
  --va-shadow-lg: 0 10px 28px rgba(0,0,0,0.08);

  /* LP backward-compat aliases */
  --primary: var(--va-blue);
  --secondary: var(--va-green);
  --accent: #E53E3E;
  --bg: #f4f7f9;
  --card-bg: #ffffff;
  --text-main: #333;
  --text-light: #666;
}

/* =========================================================
   2) MODERN RESET & MOBILE OPTIMIZATION (merged)
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  position: relative;
}

body {
  margin: 0 0 60px; /* REQUIRED for footer */
  font-family: 'Open Sans', sans-serif;
  line-height: 1.72;
  background: var(--va-bg);
  -webkit-font-smoothing: antialiased;
}

body > main footer.footer,
footer.bgfooter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}
table {
  max-width: 100%;
}
pre,
code {
  max-width: 100%;
  overflow-x: auto;
}

/* =========================================================
   3) LINKS (original + enhanced)
   ========================================================= */
a {
  color: var(--va-blue);
  text-decoration: none;
  position: relative;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
a:hover {
  color: var(--va-blue-dark);
  text-decoration: none;
}

a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.18s ease;
}
a:not(.btn):hover::after {
  width: 100%;
}

/* =========================================================
   4) NAVBAR (Vistouso branding)
   ========================================================= */
.navbar-default {
  background: var(--va-blue);
  border-color: var(--va-blue);
}

.navbar-default .navbar-brand,
.navbar-default .navbar-nav > li > a {
  color: #ffffff;
  font-weight: 600;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
  background: var(--va-blue-dark);
  color: #ffffff;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover {
  background: var(--va-blue-dark);
  color: #ffffff;
}

.navbar-default .dropdown-menu {
  background: #ffffff;
}
.navbar-default .dropdown-menu > li > a {
  color: #333333;
}
.navbar-default .dropdown-menu > li > a:hover {
  background: #f5f7fa;
  color: var(--va-blue);
}

/* 4.1 Compatibility Layer */
#header .navbar,
.navbar:not(.navbar-default) {
  background-color: var(--va-blue);
  border-color: var(--va-blue);
}

#header .navbar a,
.navbar:not(.navbar-default) .navbar-nav > li > a,
.navbar:not(.navbar-default) .navbar-brand {
  color: #ffffff;
  font-weight: 600;
}

#header .navbar a:hover,
.navbar:not(.navbar-default) .navbar-nav > li > a:hover,
.navbar:not(.navbar-default) .navbar-nav > li > a:focus,
.navbar:not(.navbar-default) .navbar-nav > li.active > a {
  background-color: var(--va-blue-dark);
  color: #ffffff;
}

/* =========================================================
   5) BREADCRUMB (original + typography)
   ========================================================= */
.breadcrumb {
  background: #f9f9f9;
  color: var(--va-blue);
  font-size: 14px;
}
.breadcrumb a:hover {
  color: var(--va-blue-dark);
}

/* =========================================================
   6) PANELS / CARDS (original + hover)
   ========================================================= */
.panel-default .panel-heading {
  background-color: #f9f9f9;
  font-weight: 600;
}

.panel,
.card {
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.panel:hover,
.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* =========================================================
   7) FOOTER (ONLY COLORS CHANGED)
   ========================================================= */
footer.bgfooter {
  background: var(--va-blue);
  color: #ffffff;
  border-top: 4px solid var(--va-blue-dark);
}

footer.bgfooter a {
  color: #ffffff;
  font-weight: 600;
}
footer.bgfooter a:hover {
  color: #dbefff;
}

/* =========================================================
   8) VISTOUSO THEME v1.1 — TYPOGRAPHY ONLY
   ========================================================= */
body,
input,
select,
textarea,
button {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--va-text-main);
}

p {
  margin-bottom: 0.85em;
  color: var(--va-text-body);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  margin-top: 0;
}
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14.5px; }
h6 { font-size: 13.5px; }

table { font-size: 14.5px; }
th { font-weight: 600; color: #111827; }
td { color: var(--va-text-body); }

label { font-size: 14px; font-weight: 600; color: #111827; }
input, select, textarea { font-size: 14.5px; color: #111827; }

.btn { font-size: 14.5px; font-weight: 600; }

.help-block,
.text-muted,
small {
  font-size: 13px;
  color: var(--va-text-muted);
}

footer,
footer a {
  font-size: 12.5px;
  font-weight: 500;
}

/* =========================================================
   9) VISTOUSO THEME v1.2 — MICRO-INTERACTIONS
   ========================================================= */
.btn {
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13,143,227,0.25);
  border-radius: 6px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--va-blue);
  box-shadow: 0 0 0 3px rgba(13,143,227,0.15);
}

table tr:hover td {
  background: #f9fbfd;
}

footer a::after { display: none; }
footer a:hover { opacity: 0.85; }

/* =========================================================
   10) FE-1: COURSE HOME UX — TOOL CARDS
   ========================================================= */
body.section-course .tool-list,
body.section-course .course-tool-list,
body.section-course .items-course {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

body.section-course .tool-list li,
body.section-course .course-tool-list li,
body.section-course .items-course li {
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--va-border);
  border-radius: 14px;
  padding: 20px 18px;
  text-align: left;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.section-course .tool-list li:hover,
body.section-course .course-tool-list li:hover,
body.section-course .items-course li:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  border-color: var(--va-blue);
}

body.section-course .tool-list li img,
body.section-course .course-tool-list li img,
body.section-course .items-course li img {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
}

body.section-course .tool-list li a,
body.section-course .course-tool-list li a,
body.section-course .items-course li a {
  font-size: 15px;
  font-weight: 600;
  color: var(--va-text-main);
  display: block;
}

body.section-course .tool-list li p,
body.section-course .course-tool-list li p {
  font-size: 13.5px;
  color: var(--va-text-muted);
  margin-top: 6px;
}

body.section-course li.tool-learning_path,
body.section-course li.tool-learnpath {
  border-left: 5px solid var(--va-blue);
  background: linear-gradient(to right, rgba(13,143,227,0.06), #ffffff);
}
body.section-course li.tool-exercise {
  border-left: 5px solid var(--va-green);
  background: linear-gradient(to right, rgba(58,181,0,0.06), #ffffff);
}
body.section-course li.tool-document {
  border-left: 5px solid #6366f1;
  background: linear-gradient(to right, rgba(99,102,241,0.06), #ffffff);
}

@media (max-width: 768px) {
  body.section-course .tool-list,
  body.section-course .course-tool-list,
  body.section-course .items-course {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   11) BUTTON HOVER & FOCUS FIX (Chamilo-safe)
   ========================================================= */
button,
.btn,
input[type="submit"],
input[type="button"] {
  background-image: none;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary,
button.btn-primary,
input.btn-primary {
  background-color: #0d8ce0;
  border-color: #0d8ce0;
  color: #ffffff;
}

.btn-primary:hover,
button.btn-primary:hover,
input.btn-primary:hover {
  background-color: #0b7ac5;
  border-color: #0b7ac5;
  color: #ffffff;
}

.btn-primary:focus,
button.btn-primary:focus,
input.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13,140,224,0.25);
}

.btn-primary:disabled,
button.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-default,
.btn-secondary {
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-default:hover,
.btn-secondary:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

/* =========================================================
   12) FE-2: LEARNING PATH UX (Chamilo pages)
   ========================================================= */
body.section-learnpath .lp-view {
  margin-top: 20px;
}

body.section-learnpath .lp-item {
  background: #ffffff;
  border: 1px solid var(--va-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
}

body.section-learnpath .lp-item:hover {
  border-color: #0d8ce0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

body.section-learnpath .lp-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--va-text-main);
}

body.section-learnpath .lp-item-meta {
  font-size: 13px;
  color: var(--va-text-muted);
}

body.section-learnpath .lp-item.completed {
  border-left: 5px solid var(--va-green);
  background: linear-gradient(to right, rgba(58,181,0,0.05), #ffffff);
}

body.section-learnpath .lp-item.current {
  border-left: 5px solid #0d8ce0;
  background: linear-gradient(to right, rgba(13,140,224,0.08), #ffffff);
}

body.section-learnpath .lp-progress {
  height: 8px;
  background: var(--va-border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

body.section-learnpath .lp-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #0d8ce0, var(--va-green));
  border-radius: 999px;
}

body.section-learnpath .lp-continue .btn {
  background: #0d8ce0;
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 768px) {
  body.section-learnpath .lp-item { flex-direction: column; align-items: flex-start; }
  body.section-learnpath .lp-continue { margin-left: 0; margin-top: 10px; }
}

/* =========================================================
   13) FE-3: EXERCISE & ASSESSMENT UX
   ========================================================= */
body.section-exercise .exercise-description {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #075985;
}

body.section-exercise .question {
  background: #ffffff;
  border: 1px solid var(--va-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

body.section-exercise .question-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--va-text-main);
  margin-bottom: 12px;
}

body.section-exercise .question li {
  list-style: none;
  border: 1px solid var(--va-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  cursor: pointer;
}

body.section-exercise .question li:hover {
  border-color: #0d8ce0;
  background: #f0f9ff;
}

body.section-exercise .answer-correct { background: #ecfdf5; border-color: var(--va-green); color: #065f46; }
body.section-exercise .answer-wrong { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }

/* =========================================================
   14) LP CONTENT COMPONENTS (vs-*)
   ========================================================= */
.vs-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary);
  display: flex;
  overflow-x: auto;
}

.vs-nav-sticky a {
  text-decoration: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 15px 10px;
}

.vs-container { max-width: 850px; margin: 0 auto; padding: 15px; }

.vs-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  padding: 50px 25px;
  border-radius: 0 0 30px 30px;
  text-align: center;
}

.vs-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 20px;
  margin-bottom: 25px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  border: 1px solid #eef2f6;
}

.vs-badge {
  display: inline-block;
  background: #EAF4FB;
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
}

.vs-case-study {
  background: #fffafa;
  border: 2px dashed #FFCFD2;
  padding: 25px;
  border-radius: 20px;
  margin: 30px 0;
}

/* 14.1 LP UTILITY CLASSES */
.vs-mt-neg-65 { margin-top: -65px; }
.vs-border-left-green { border-left: 6px solid var(--secondary); }
.vs-ul-tight { margin: 0; padding-left: 20px; }
.vs-panel { background: #f8fafc; padding: 20px; border-radius: 15px; }
.vs-panel-bb-blue { border-bottom: 3px solid var(--primary); }
.vs-panel-bb-green { border-bottom: 3px solid var(--secondary); }
.vs-soft-blue { background: #EAF4FB; padding: 1px 20px; border-radius: 15px; }
.vs-text-muted-sm { font-size: 14px; color: #666; }

/* 14.2 DASHBOARD COMPONENT */
.vistouso-dashboard {
    max-width: 1000px;
    margin: 20px auto;
    background: var(--va-card-bg);
    border: 1px solid var(--va-border);
    border-left: 6px solid var(--va-blue);
    border-radius: var(--va-radius-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--va-shadow-md);
}

.v-top-row { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--va-bg); }
.v-meta-grid { display: flex; background: var(--va-border); gap: 1px; }
.v-meta-item { flex: 1; background: var(--va-card-bg); padding: 15px 25px; }
.v-meta-label { display: block; font-size: 10px; font-weight: 800; color: var(--va-text-muted); text-transform: uppercase; }
.v-meta-value { font-size: 14px; font-weight: 600; color: var(--va-text-main); }
.v-critical-bar { background: rgba(58, 181, 0, 0.05); padding: 12px 25px; border-top: 1px solid var(--va-border); }

/* =========================================================
   14.3) VISTOUSO BRANDED TABLE (HORIZONTAL & RESPONSIVE)
   ========================================================= */
.v-dash-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-left: 6px solid #098CE9 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    margin: 15px 0 !important;
}

.v-dash-cell {
    width: 25% !important;
    padding: 15px 20px !important;
    border-right: 1px solid #f1f5f9 !important;
    vertical-align: top !important;
}

.v-dash-label { display: block !important; font-size: 10px !important; font-weight: 800 !important; color: #64748b !important; text-transform: uppercase !important; margin-bottom: 5px !important; }
.v-dash-label-blue { display: block; font-size: 10px; font-weight: 800; color: #098CE9; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 1px; }
.v-dash-value, .v-dash-val-lg { font-size: 14px !important; font-weight: 600 !important; color: #1e293b !important; }

.v-dash-mandatory, .v-dash-mandatory-bar {
    background: #f8fafc !important;
    color: #3AB500 !important;
    padding: 12px 20px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border-top: 1px solid var(--va-border);
}

@media (max-width: 768px) {
    .v-dash-table, .v-dash-table tbody, .v-dash-table tr, .v-dash-table td { display: block !important; width: 100% !important; }
    .v-dash-table td { border-right: none !important; border-bottom: 1px solid #f1f5f9 !important; }
    .v-dash-header, .v-dash-footer, .v-dash-mandatory-bar { padding: 15px 20px !important; }
}

/* 14.4 EDITOR BYPASS */
.v-ident-wrapper { border: 1px solid var(--va-border); border-left: 6px solid var(--va-blue); background: var(--va-card-bg); border-radius: var(--va-radius-sm); margin: 15px 0; overflow: hidden; }
.v-ident-header { padding: 15px 20px; border-bottom: 1px solid var(--va-bg); }
.v-ident-grid { display: table; width: 100%; border-spacing: 1px; }
.v-ident-col { display: table-cell; background: var(--va-card-bg); padding: 12px 20px; width: 25%; }

/* =========================================================
   15) RESPONSIVE UTILITIES
   ========================================================= */
@media (min-width: 768px) { .vs-grid { grid-template-columns: 1fr 1fr; } .vs-container { padding: 30px; } }
@media (max-width: 576px) { .vs-container { padding: 14px; } .vs-card { padding: 18px; } }

.vs-container, .vs-card, .vs-case-study { overflow-wrap: anywhere; word-break: break-word; }

/* =========================================================
   16) FIX: ICON & TOOL HOVER CLEANUP
   ========================================================= */
.tool-list a::after, .course-tool-list a::after, .items-course a::after, a:has(img)::after {
  display: none !important; content: none !important; width: 0 !important; height: 0 !important;
}

.tool-list a:hover, .course-tool-list a:hover, .items-course a:hover {
  text-decoration: none !important; transform: none !important;
}