/*
 * KTTC Custom CSS
 * ---------------
 * Bootstrap 5 is the primary styling framework.
 * This file contains ONLY brand-specific overrides, custom components,
 * and minor visual refinements not achievable with Bootstrap utilities alone.
 *
 * Color System
 * ------------
 * --kttc-navy   : #0B1F3A   (Deep Navy Blue — primary brand colour)
 * --kttc-gold   : #C9A84C   (Gold — accent colour)
 * --kttc-white  : #FFFFFF
 * --kttc-light  : #F4F6F9   (Light grey background)
 */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Brand Tokens)
   ============================================================ */
:root {
  --kttc-navy: #0B1F3A;
  --kttc-navy-light: #132948;
  --kttc-gold: #C9A84C;
  --kttc-gold-hover: #b8943e;
  --kttc-white: #ffffff;
  --kttc-light: #F4F6F9;
  --kttc-text-muted: #6c757d;
  --bs-border-radius-xl: 1rem;
}

/* ============================================================
   2. GLOBAL BASE OVERRIDES
   ============================================================ */
body {
  font-family: 'Inter', sans-serif;
  color: #2c3e50;
  background-color: #ffffff;
}

/* ============================================================
   3. BRAND COLOUR UTILITY CLASSES
   ============================================================ */
.text-gold   { color: var(--kttc-gold) !important; }
.text-navy   { color: var(--kttc-navy) !important; }
.bg-navy     { background-color: var(--kttc-navy) !important; }
.bg-navy-light { background-color: var(--kttc-navy-light) !important; }
.bg-gold     { background-color: var(--kttc-gold) !important; }
.text-white-75 { color: rgba(255, 255, 255, 0.75) !important; }

/* ============================================================
   4. NAVBAR
   ============================================================ */
.kttc-navbar {
  background-color: var(--kttc-navy);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: box-shadow 0.3s ease;
  z-index: 1030;
}

.kttc-navbar .nav-link {
  position: relative;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  padding-bottom: 0.35rem;
}

.kttc-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--kttc-gold);
  transition: width 0.3s ease;
}

.kttc-navbar .nav-link:hover::after,
.kttc-navbar .nav-link.active::after {
  width: 60%;
}

.kttc-navbar .nav-link:hover { color: var(--kttc-gold) !important; }
.kttc-navbar .nav-link.active { color: var(--kttc-gold) !important; }

/* Brand Icon */
.brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(201,168,76,0.15);
  border-radius: 10px;
}

/* ============================================================
   5. GOLD BUTTON (CTA)
   ============================================================ */
.btn-gold {
  background-color: var(--kttc-gold);
  border-color: var(--kttc-gold);
  color: #1a1a1a;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-gold:hover,
.btn-gold:focus {
  background-color: var(--kttc-gold-hover);
  border-color: var(--kttc-gold-hover);
  color: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201,168,76,0.4);
}

/* Navy Outline Button */
.btn-outline-navy {
  color: var(--kttc-navy);
  border-color: var(--kttc-navy);
}
.btn-outline-navy:hover {
  background-color: var(--kttc-navy);
  border-color: var(--kttc-navy);
  color: #fff;
}

/* Navy Solid Button */
.btn-navy {
  background-color: var(--kttc-navy);
  border-color: var(--kttc-navy);
  color: #fff;
}
.btn-navy:hover {
  background-color: var(--kttc-navy-light);
  border-color: var(--kttc-navy-light);
  color: #fff;
}

/* ============================================================
   6. HERO SECTION
   ============================================================ */
.kttc-hero {
  background: linear-gradient(135deg, var(--kttc-navy) 0%, #1a3a60 60%, #0e2846 100%);
  min-height: calc(100vh - 72px);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.kttc-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.kttc-hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Hero Carousel Placeholder Slide */
.hero-slide-placeholder {
  min-height: 340px;
  border: 1px solid rgba(201,168,76,0.2);
}

/* ============================================================
   7. PAGE HEADER (Inner Pages)
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--kttc-navy) 0%, var(--kttc-navy-light) 100%);
  border-bottom: 3px solid var(--kttc-gold);
}

/* ============================================================
   8. SECTION BADGE
   ============================================================ */
.section-badge {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   9. DEPARTMENT / COURSE CARDS
   ============================================================ */
.dept-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-top: 3px solid transparent !important;
}
.dept-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(11,31,58,0.12) !important;
  border-top: 3px solid var(--kttc-gold) !important;
}

.course-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(11,31,58,0.12) !important;
}

/* ============================================================
   10. FOOTER
   ============================================================ */
.kttc-footer {
  background-color: var(--kttc-navy);
}

.footer-heading {
  font-size: 0.75rem;
}

.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-links a:hover {
  color: var(--kttc-gold);
  padding-left: 4px;
}
.footer-links .bi { color: var(--kttc-gold); margin-right: 4px; font-size: 0.65rem; }

.footer-contact { color: rgba(255,255,255,0.55); }

.footer-bottom {
  background-color: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Social Icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.social-icon:hover {
  background-color: var(--kttc-gold);
  color: var(--kttc-navy);
  transform: translateY(-2px);
}

/* ============================================================
   11. WHATSAPP FLOATING ACTION BUTTON
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,211,102,0.55);
  color: #fff;
}

/* ============================================================
   12. ADMISSIONS — STEP CIRCLES
   ============================================================ */
.step-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--kttc-navy);
  color: var(--kttc-gold);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--kttc-gold);
  font-family: 'Playfair Display', serif;
}

/* ============================================================
   13. CTA SECTION
   ============================================================ */
.kttc-cta {
  background: linear-gradient(135deg, #0e2846 0%, var(--kttc-navy) 60%, #1a3a60 100%);
  position: relative;
  overflow: hidden;
}
.kttc-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ============================================================
   14. DROPDOWN MENU REFINEMENTS
   ============================================================ */
.dropdown-menu-dark .dropdown-item {
  font-size: 0.875rem;
}
.dropdown-menu-dark .dropdown-item:hover {
  background-color: var(--kttc-gold);
  color: var(--kttc-navy) !important;
}

/* ============================================================
   15. FORM CONTROLS BRAND FOCUS
   ============================================================ */
.form-control:focus,
.form-select:focus {
  border-color: var(--kttc-gold);
  box-shadow: 0 0 0 0.2rem rgba(201,168,76,0.2);
}

/* ============================================================
   16. BREADCRUMB
   ============================================================ */
.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.3);
}

/* ============================================================
   17. SCROLLBAR (optional refinement)
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--kttc-navy); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--kttc-gold); }

/* ============================================================
   18. COURSES — LISTING PAGE
   ============================================================ */

/* Filter bar pills */
.courses-filter-bar .btn {
  transition: all 0.2s ease;
}
.courses-filter-bar .btn:hover {
  transform: translateY(-1px);
}

/* School banner (replaces missing alert-navy Bootstrap class) */
.school-banner {
  background-color: #ffffff;
  border: 1px solid rgba(11,31,58,0.12);
  border-left: 4px solid var(--kttc-gold);
}

/* Course card top accent on hover */
.course-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-top-color 0.2s ease;
  border-top: 3px solid transparent !important;
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(11,31,58,0.14) !important;
  border-top: 3px solid var(--kttc-gold) !important;
}

/* Empty state icon circle */
.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(201,168,76,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   19. COURSES — DETAIL PAGE
   ============================================================ */
/* Sidebar header dark band */
.rounded-top-4   { border-top-left-radius: 1rem !important; border-top-right-radius: 1rem !important; }
.rounded-bottom-4 { border-bottom-left-radius: 1rem !important; border-bottom-right-radius: 1rem !important; }

/* Career opportunities badge pills */
.badge.bg-light.text-navy {
  color: var(--kttc-navy) !important;
}

/* ============================================================
   20. RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 991.98px) {
  .kttc-hero {
    min-height: auto;
    padding: 4rem 0;
  }
  .kttc-navbar .navbar-collapse {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .kttc-hero { font-size: 2rem; min-height: 60vh; padding: 3rem 0; }
  .kttc-hero h1 { font-size: 2rem; }
  .whatsapp-fab { bottom: 20px; right: 20px; width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ============================================================
   21. GALLERY IMAGE HOVER
   ============================================================ */
.gallery-img {
  transition: opacity 0.2s ease;
}
.gallery-img:hover {
  opacity: 0.88;
}

/* ============================================================
   22. PRINT STYLES
   ============================================================ */
@media print {
  .kttc-navbar,
  .kttc-footer,
  .whatsapp-fab,
  .btn,
  nav[aria-label="breadcrumb"] {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
  .page-header {
    background: #0B1F3A !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
