/* ==========================================================================
   GrowTechSkill — base.css   (loaded on every page)
   1 Tokens · 2 Base · 3 Buttons · 4 Navbar · 5 Alerts · 6 Forms
   7 Shared components · 8 Footer · 9 Motion, print
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Bootstrap hooks */
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-font-family: 'Hind', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: #22344f;
  --bs-link-color: #2563eb;
  --bs-link-hover-color: #1d4ed8;

  /* Colour */
  --gts-primary: #2563eb;
  --gts-primary-dark: #1d4ed8;
  --gts-primary-deep: #1e40af;
  --gts-dark: #0b2545;      /* deep ink blue: headings, footer */
  --gts-sun: #fbbf24;       /* sunshine yellow: highlights */
  --gts-sun-soft: #fef3c7;
  --gts-grow: #16a34a;      /* growth green */
  --gts-grow-text: #15803d;
  --gts-navy: #22344f;
  --gts-muted: #4a5b73;
  --gts-soft: #eff6ff;
  --gts-tint: #dbeafe;
  --gts-tint-line: #bfdbfe;
  --gts-line: #d9e2f0;
  --gts-surface: #f4f8ff;
  --gts-danger: #b42318;
  --gts-danger-bg: #fef3f2;
  --gts-danger-line: #fecdca;

  /* Shape */
  --gts-radius-sm: .6rem;
  --gts-radius: 1rem;
  --gts-radius-lg: 1.25rem;

  /* Elevation */
  --gts-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .05);
  --gts-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .07);
  --gts-shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 22px 44px rgba(15, 23, 42, .13);
  --gts-ring: 0 0 0 .25rem rgba(37, 99, 235, .22);

  /* Layout */
  --gts-nav-h: 68px;
  --gts-section-y: clamp(3.5rem, 7vw, 5.5rem);

  /* Type scale */
  --gts-fs-display: clamp(2.25rem, 5.4vw, 3.6rem);
  --gts-fs-h2: clamp(1.7rem, 3.4vw, 2.3rem);
  --gts-fs-h3: clamp(1.4rem, 2.6vw, 1.75rem);
  --gts-font-display: 'Lexend', system-ui, sans-serif;
}

/* 2. Base ------------------------------------------------------------------ */
html { scroll-behavior: smooth; }

body {
  font-family: var(--bs-body-font-family);
  font-size: 1.0625rem;
  color: var(--gts-navy);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;   /* no horizontal scroll on any screen */
}

h1, h2, h3, h4, h5, h6, .lexend {
  font-family: var(--gts-font-display);
  letter-spacing: -.03em;
  color: var(--gts-dark);
  text-wrap: balance;
}
h1 { line-height: 1.06; letter-spacing: -.04em; }
h2 { font-size: var(--gts-fs-h2); line-height: 1.15; }
h3 { font-size: var(--gts-fs-h3); line-height: 1.2; }
p  { text-wrap: pretty; }

.text-muted { color: var(--gts-muted) !important; }
.lead { font-size: 1.15rem; line-height: 1.7; font-weight: 400; }
.lead strong { color: var(--gts-dark); font-weight: 600; }
.small, small { font-size: .9rem; }

/* Bootstrap's 50% white is too faint on dark or coloured backgrounds */
.text-white-50 { color: rgba(255, 255, 255, .86) !important; }

a { text-underline-offset: .2em; }

/* Anchor targets clear the sticky navbar */
section[id] { scroll-margin-top: calc(var(--gts-nav-h) + 8px); }

/* Keyboard focus */
:focus-visible {
  outline: 2px solid var(--gts-primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible,
.form-control:focus-visible { outline: none; }

::selection { background: rgba(37, 99, 235, .18); }

/* Consistent vertical rhythm for page sections */
main > section { padding-block: var(--gts-section-y); overflow-x: hidden; }

/* 3. Buttons --------------------------------------------------------------- */
.btn {
  border-radius: .75rem;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease,
              border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--gts-ring); }
.btn-lg { padding: .8rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: .42rem .95rem; }

.btn-primary {
  --bs-btn-bg: var(--gts-primary);
  --bs-btn-border-color: var(--gts-primary);
  --bs-btn-hover-bg: var(--gts-primary-dark);
  --bs-btn-hover-border-color: var(--gts-primary-dark);
  --bs-btn-active-bg: var(--gts-primary-deep);
  --bs-btn-active-border-color: var(--gts-primary-deep);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37, 99, 235, .34), inset 0 1px 0 rgba(255, 255, 255, .18); }

.btn-outline-primary {
  --bs-btn-color: var(--gts-primary);
  --bs-btn-border-color: #bfdbfe;
  --bs-btn-hover-bg: var(--gts-tint);
  --bs-btn-hover-color: var(--gts-primary-dark);
  --bs-btn-hover-border-color: var(--gts-primary);
  --bs-btn-active-bg: var(--gts-tint-line);
  --bs-btn-active-color: var(--gts-primary-dark);
  --bs-btn-active-border-color: var(--gts-primary);
}

.btn-outline-secondary {
  --bs-btn-color: var(--gts-muted);
  --bs-btn-border-color: var(--gts-line);
  --bs-btn-hover-bg: var(--gts-surface);
  --bs-btn-hover-color: var(--gts-dark);
  --bs-btn-hover-border-color: #cbd5e1;
}

.btn-light { box-shadow: 0 8px 20px rgba(15, 23, 42, .2); }
.btn-light:hover { transform: translateY(-1px); }

/* 4. Navbar ---------------------------------------------------------------- */
.navbar {
  min-height: var(--gts-nav-h);
  border-bottom: 1px solid var(--gts-line);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
.navbar.bg-white { background-color: rgba(255, 255, 255, .86) !important; }

.navbar-brand {
  font-family: var(--gts-font-display);
  letter-spacing: -.035em;
  color: var(--gts-dark);
}
.navbar-brand:hover { color: var(--gts-dark); }

.navbar .nav-link {
  color: #000;
  padding: .5rem .9rem;
  border-radius: .55rem;
  transition: color .15s ease, background-color .15s ease;
}
.navbar .nav-link:hover { color: var(--gts-primary); background: var(--gts-soft); }

.navbar-toggler { padding: .4rem .55rem; border-radius: .6rem; }
.navbar-toggler:focus-visible { box-shadow: var(--gts-ring) !important; outline: none; }

@media (max-width: 991.98px) {
  .navbar-collapse {
    padding: .75rem 0 1rem;
    border-top: 1px solid var(--gts-line);
    margin-top: .5rem;
  }
  .navbar .nav-link { padding: .7rem .75rem; }
}

/* 5. Alerts (Django message tags) ----------------------------------------- */
.alert {
  border-radius: var(--gts-radius);
  box-shadow: var(--gts-shadow-sm);
  font-weight: 500;
}
.alert-error {   /* Django tags errors as "error"; Bootstrap only knows "danger" */
  --bs-alert-color: #842029;
  --bs-alert-bg: #f8d7da;
  --bs-alert-border-color: #f1aeb5;
}
.alert-debug {
  --bs-alert-color: #41464b;
  --bs-alert-bg: #e2e3e5;
  --bs-alert-border-color: #c4c8cb;
}

/* 6. Forms (Django as_p emits bare inputs, so style by structure) ---------- */
.form-control,
.form-select,
main form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
main form select,
main form textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--gts-line);
  border-radius: var(--gts-radius-sm);
  padding: .68rem .95rem;
  font: inherit;
  color: var(--gts-dark);
  background-color: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
main form input:hover:not(:focus),
main form select:hover:not(:focus),
main form textarea:hover:not(:focus) { border-color: #cbd5e1; }
main form textarea { min-height: 8.5rem; resize: vertical; }

.form-control:focus,
.form-select:focus,
main form input:focus,
main form select:focus,
main form textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .15);
  outline: none;
}
main form ::placeholder { color: #64748b; opacity: 1; }

main form p { margin-bottom: 1.15rem; }
main form label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  color: var(--gts-navy);
  margin-bottom: .4rem;
}
main form input[type="checkbox"],
main form input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  margin-right: .5rem;
  accent-color: var(--gts-primary);
  vertical-align: -.15rem;
}

main form .helptext {
  display: block;
  margin-top: .4rem;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--gts-muted);
}
main form .helptext ul { margin: .3rem 0 0; padding-left: 1.1rem; }
main form .helptext li { margin-bottom: .1rem; }

main form .errorlist {
  list-style: none;
  margin: 0 0 .55rem;
  padding: .55rem .85rem;
  font-size: .87rem;
  font-weight: 500;
  color: var(--gts-danger);
  background: var(--gts-danger-bg);
  border: 1px solid var(--gts-danger-line);
  border-radius: var(--gts-radius-sm);
}
main form .errorlist li + li { margin-top: .15rem; }
main form input[aria-invalid="true"] { border-color: #f04438; }
main form input[aria-invalid="true"]:focus { box-shadow: 0 0 0 .22rem rgba(240, 68, 56, .15); }

main form .iti { width: 100%; }   /* phone-number widgets */

main form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #fff inset;
  -webkit-text-fill-color: var(--gts-dark);
}

/* 7. Shared components ----------------------------------------------------- */
.rounded-4 { border-radius: var(--gts-radius) !important; }
.shadow-soft { box-shadow: var(--gts-shadow); }

/* Breadcrumb — consistent across all pages */
.gts-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .85rem;
  color: var(--gts-muted);
  margin-bottom: 1.5rem;
  padding: .5rem .85rem;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--gts-line);
  border-radius: var(--gts-radius-sm);
}
.gts-breadcrumb a { color: var(--gts-primary); text-decoration: none; font-weight: 500; }
.gts-breadcrumb a:hover { text-decoration: underline; }
.gts-breadcrumb .bi { font-size: .65rem; color: var(--gts-muted); }
.gts-breadcrumb span { color: var(--gts-dark); font-weight: 600; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #1e40af;
  background: var(--gts-tint);
  border: 1px solid var(--gts-tint-line);
  padding: .32rem .85rem;
  border-radius: 999px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--tone-bg, var(--gts-tint));
  color: var(--tone, var(--gts-primary));
  font-size: 1.25rem;
}

.feature-card {
  background: var(--gts-surface);
  border: 1px solid var(--gts-line);
  border-radius: var(--gts-radius);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.feature-card:hover { border-color: var(--gts-tint-line); background: #fff; box-shadow: var(--gts-shadow-sm); }

/* Readable status colours for the bootstrap helpers used in templates */
.text-success { color: var(--gts-grow-text) !important; }
.text-warning { color: var(--gts-sun) !important; }

/* 8. Footer ---------------------------------------------------------------- */
footer {
  position: relative;
  background: var(--gts-dark);
  color: #c7d4ea;
}
footer::before {   /* thin brand line along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #16a34a 50%, #fbbf24);
  opacity: 1;
}
footer h5, footer h6 { color: #fff; }
footer h6 { letter-spacing: .06em; margin-bottom: .9rem; }
footer ul li { margin-bottom: .5rem; }
footer a {
  color: #c7d4ea;
  text-decoration: none;
  transition: color .15s ease;
}
footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
footer a:focus-visible { outline-color: var(--gts-sun); }
footer .text-white-50 { color: #c7d4ea !important; }

/* 9. Motion, print --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .btn-primary:hover, .btn-light:hover { transform: none; }
}

@media print {
  .navbar, footer { display: none !important; }
}



/* Footer Stroke */
.footer-hook {
    display: inline-block;
    position: relative;
    isolation: isolate;

    max-width: 100%;
    padding: 13px 20px;

    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.1px;
    line-height: 1.8;
    text-transform: uppercase;

    transform: rotate(-1deg);
    z-index: 1;
}

/* Thick, irregular white paint */
.footer-hook::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 3px -5px;

    background: #fff;

    clip-path: polygon(
        1% 18%, 4% 9%, 9% 13%, 13% 4%,
        20% 11%, 27% 2%, 34% 8%, 41% 1%,
        48% 8%, 57% 3%, 64% 10%, 73% 2%,
        80% 9%, 88% 3%, 95% 11%, 100% 5%,
        97% 20%, 100% 30%, 96% 40%, 99% 50%,
        94% 60%, 99% 70%, 94% 78%, 97% 91%,
        87% 94%, 79% 88%, 71% 98%, 62% 91%,
        52% 99%, 43% 91%, 33% 97%, 24% 91%,
        15% 98%, 8% 91%, 2% 95%, 4% 79%,
        0% 69%, 4% 56%, 0% 44%, 4% 32%
    );
}

/* Rough dry-brush streaks */
.footer-hook::after {
    content: "";
    position: absolute;
    z-index: -2;
    inset: -3px -15px;

    background: #fff;

    clip-path: polygon(
        0% 36%, 7% 29%, 15% 34%, 22% 24%,
        35% 31%, 46% 23%, 58% 29%, 71% 20%,
        82% 28%, 94% 19%, 100% 24%, 96% 39%,
        100% 48%, 92% 56%, 83% 52%, 71% 65%,
        59% 57%, 47% 69%, 34% 59%, 22% 70%,
        11% 61%, 3% 68%
    );
}

/* Footer Courses List */

/* Courses column heading */
.footer-courses-heading {
    display: inline-block;
    position: relative;
    width: fit-content;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 19px;
    padding-bottom: 9px;
}

.footer-courses-heading::after {
    content: "";
    position: absolute;
    left: -3px;
    bottom: 0;
    width: 112%;
    height: 5px;
    background: #fff;
    transform: rotate(-2deg);
    clip-path: polygon(
        0 35%, 12% 10%, 27% 30%, 43% 0,
        58% 35%, 75% 5%, 100% 25%,
        96% 85%, 73% 65%, 55% 100%,
        36% 68%, 15% 95%, 2% 75%
    );
}

/* Course list */
.footer-course-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.footer-course-list li {
    position: relative;
    padding: 5px 0 5px 19px;
}

/* Artistic brush markers */
.footer-course-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 11px;
    height: 5px;
    background: #fff;
    transform: translateY(-50%) rotate(-35deg);
    clip-path: polygon(
        0 30%, 20% 0, 100% 15%,
        82% 80%, 12% 100%
    );
    transition: width .25s ease, transform .25s ease;
}

/* Course links */
.footer-course-list a {
    display: inline-block;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .25s ease, transform .25s ease;
}

.footer-course-list li:hover::before {
    width: 16px;
    transform: translateY(-50%) rotate(-15deg);
}

.footer-course-list li:hover a {
    color: #fff;
    transform: translateX(5px);
}



/* =========================================
   FOOTER FOUNDATION
========================================= */

.footer-main {
    position: relative;
    overflow: hidden;
}

.footer-main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.22),
        rgba(255,255,255,.06),
        transparent
    );
}

/* =========================================
   BRAND
========================================= */

.footer-brand-name {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 20px;
}

.footer-brand-name i {
    font-size: 21px;
}

.footer-copyright {
    color: rgba(255,255,255,.48);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .15px;
    margin-top: 19px;
}

/* =========================================
   SECTION HEADINGS
========================================= */

.footer-courses-heading,
.footer-contact-heading {
    display: inline-block;
    position: relative;
    width: fit-content;

    color: #fff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;

    padding-bottom: 10px;
    margin-bottom: 19px;
}

/* Courses brush underline */
.footer-courses-heading::after {
    content: "";
    position: absolute;
    left: -3px;
    bottom: 0;
    width: 112%;
    height: 5px;
    background: #fff;
    transform: rotate(-2deg);

    clip-path: polygon(
        0 35%, 12% 10%, 27% 30%, 43% 0,
        58% 35%, 75% 5%, 100% 25%,
        96% 85%, 73% 65%, 55% 100%,
        36% 68%, 15% 95%, 2% 75%
    );
}

/* Contact brush underline */
.footer-contact-heading::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 112%;
    height: 5px;
    background: #fff;
    transform: rotate(-2deg);

    clip-path: polygon(
        0 35%, 12% 10%, 27% 30%, 43% 0,
        58% 35%, 75% 5%, 100% 25%,
        96% 85%, 73% 65%, 55% 100%,
        36% 68%, 15% 95%, 2% 75%
    );
}

/* =========================================
   COURSE LINKS
========================================= */

.footer-course-list a {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 600;
}

/* =========================================
   CONTACT INFORMATION
========================================= */

.footer-contact-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 11px;

    color: rgba(255,255,255,.72);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;

    text-decoration: none;
    transition: color .25s ease;
}

.footer-contact-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;

    width: 29px;
    height: 29px;

    color: #fff;
    font-size: 15px;

    background: rgba(255,255,255,.09);
    border-radius: 7px;

    transition:
        background .25s ease,
        transform .25s ease;
}

.footer-contact-item:hover {
    color: #fff;
}

.footer-contact-item:hover .footer-contact-icon {
    background: rgba(255,255,255,.18);
    transform: rotate(-6deg) scale(1.08);
}

.footer-contact-item small {
    display: block;
    color: rgba(255,255,255,.48);
    font-size: 12px;
    line-height: 1.5;
}

.footer-contact-note {
    cursor: default;
}

.footer-contact-icon.whatsapp-icon {
    color: #25D366;
}

/* Allow long email addresses to wrap */
.footer-contact-item[href^="mailto:"] {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* =========================================
   DESKTOP ALIGNMENT
========================================= */

@media (min-width: 992px) {
    .footer-contact-list {
        align-items: flex-end;
    }

    .footer-contact-item {
        justify-content: flex-end;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 991.98px) {

    .footer-brand-name {
        font-size: 21px;
    }

    .footer-copyright {
        font-size: 11px;
    }

    .footer-courses-heading,
    .footer-contact-heading {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .footer-course-list a {
        font-size: 13px;
    }

    .footer-contact-list {
        align-items: flex-start;
    }

    .footer-contact-item {
        justify-content: flex-start;
        font-size: 12px;
        gap: 9px;
    }

    .footer-contact-icon {
        width: 25px;
        height: 25px;
        font-size: 13px;
    }

    .footer-contact-item small {
        font-size: 11px;
    }

    .footer-contact-heading::after {
        left: 0;
        right: auto;
    }
}

.footer-contact-item > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}