
/* ==========================================================================
   FRANKLIN ACADEMY HIGH SCHOOL ATHLETICS - OFFICIAL BIGTEAMS STYLESHEET
   Wake Forest, NC • NCHSAA 2A Region 3
   ========================================================================== */

:root {
  --appcolor: #0d337a;
  --appcolor-hover: #082252;
  --appcolor-dark: #092557;
  --appcolor-light: #164bb0;
  --btgreen: #189b4b;
  --btgreen-hover: #12793b;
  --cal-red: #d32f2f;
  --cal-red-hover: #b71c1c;
  --bg-light: #f4f5f7;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-heading: 'Poppins', 'Montserrat', sans-serif;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: #f2f2f2;
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--appcolor);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--appcolor-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Fonts */
.fm-Poppins { font-family: var(--font-heading); }
.fm-Montserrat { font-family: 'Montserrat', sans-serif; }

/* Grid & Layout System (Self-Contained Fallback) */
.container, .container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 16px;
  padding-left: 16px;
}
.container { max-width: 1240px; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -10px;
  margin-left: -10px;
}
.row > * {
  padding-right: 10px;
  padding-left: 10px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }

@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md { flex: 1 0 0%; }
}

@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
}

/* Flex Utilities */
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 16px !important; }
.gap-4 { gap: 24px !important; }

@media (min-width: 768px) {
  .d-md-flex { display: flex !important; }
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .text-md-start { text-align: left !important; }
  .text-md-end { text-align: right !important; }
}

/* Spacing */
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.me-3 { margin-right: 16px !important; }
.ms-2 { margin-left: 8px !important; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 16px !important; }
.p-4 { padding: 24px !important; }
.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-4 { padding-top: 24px !important; padding-bottom: 24px !important; }
.px-2 { padding-left: 8px !important; padding-right: 8px !important; }
.px-3 { padding-left: 16px !important; padding-right: 16px !important; }
.px-4 { padding-left: 24px !important; padding-right: 24px !important; }

/* Colors & Badges */
.bg-appcolor { background-color: var(--appcolor) !important; color: #ffffff !important; }
.bg-appcolor-dark { background-color: var(--appcolor-dark) !important; color: #ffffff !important; }
.bg-success { background-color: var(--btgreen) !important; color: #ffffff !important; }
.bg-white { background-color: #ffffff !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #1a1a1a !important; color: #ffffff !important; }
.bg-primary { background-color: #0d337a !important; color: #ffffff !important; }
.bg-warning { background-color: #ffc107 !important; color: #000000 !important; }
.bg-danger { background-color: #dc3545 !important; color: #ffffff !important; }
.text-white { color: #ffffff !important; }
.text-dark { color: #212529 !important; }
.text-muted { color: #6c757d !important; }
.text-success { color: var(--btgreen) !important; }
.text-appcolor { color: var(--appcolor) !important; }
.text-green-300 { color: #86efac !important; }
.text-danger { color: #dc3545 !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-uppercase { text-transform: uppercase !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }
.small { font-size: 12px !important; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 4px;
}
.badge-home {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-away {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* BigTeams Skewed Brand Logo Box */
.skew-30 {
  transform: skewX(-20deg);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
.unskew-30 {
  transform: skewX(20deg);
  display: inline-flex;
  align-items: center;
}
@media (max-width: 768px) {
  .skew-30, .unskew-30 { transform: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.btn-success {
  background-color: var(--btgreen) !important;
  color: #ffffff !important;
  border-color: var(--btgreen) !important;
}
.btn-success:hover {
  background-color: var(--btgreen-hover) !important;
  border-color: var(--btgreen-hover) !important;
  text-decoration: none;
}
.btn-appcolor {
  background-color: var(--appcolor) !important;
  color: #ffffff !important;
  border-color: var(--appcolor) !important;
}
.btn-appcolor:hover {
  background-color: var(--appcolor-hover) !important;
  text-decoration: none;
}
.btn-outline-light {
  color: #ffffff !important;
  border-color: #ffffff !important;
}
.btn-outline-light:hover {
  background-color: #ffffff !important;
  color: var(--appcolor) !important;
  text-decoration: none;
}
.btn-outline-secondary {
  color: #495057 !important;
  background-color: #ffffff;
  border-color: #ced4da !important;
}
.btn-outline-secondary:hover {
  background-color: #e9ecef !important;
  text-decoration: none;
}
.cal-red-btn {
  background-color: var(--cal-red) !important;
  color: #ffffff !important;
  border-color: var(--cal-red) !important;
  font-weight: 700 !important;
}
.cal-red-btn:hover {
  background-color: var(--cal-red-hover) !important;
}
.btn-group {
  display: inline-flex;
  vertical-align: middle;
}
.btn-group > .btn {
  border-radius: 0;
}
.btn-group > .btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.btn-group > .btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #ffffff;
  background-clip: border-box;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.card-header {
  padding: 12px 16px;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.card-body {
  flex: 1 1 auto;
  padding: 16px;
}
.shadow-sm {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  margin-bottom: 0;
  color: #212529;
  vertical-align: middle;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}
.table thead th {
  background-color: #f8f9fa;
  font-size: 11px;
  font-weight: 700;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table-hover tbody tr:hover {
  background-color: #f1f5f9;
}

/* Forms */
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.form-label {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Navigation & Sub-nav */
#primaryNav {
  background-color: var(--appcolor-dark);
}
.navbar-nav {
  display: flex;
  flex-direction: row;
  list-style: none;
  flex-wrap: wrap;
}
.nav-link {
  display: block;
  padding: 10px 14px;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  text-decoration: none;
}
.active-nav {
  background-color: var(--appcolor) !important;
  border-bottom: 3px solid var(--btgreen) !important;
  color: #86efac !important;
}

.sub-season-bar {
  background-color: #212529;
}
.sub-season-bar a {
  color: #dee2e6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sub-season-bar a:hover {
  color: #ffffff;
  text-decoration: none;
}
.sub-season-bar a.active-season {
  color: #86efac;
  border-bottom: 2px solid var(--btgreen);
}

/* Slide-out Drawer */
.side-drawer {
  position: fixed;
  top: 0;
  left: -340px;
  width: 320px;
  height: 100vh;
  background-color: var(--appcolor);
  z-index: 99999;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}
.side-drawer.active {
  left: 0;
}
.drawer-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99998;
}
.drawer-backdrop.active {
  display: block;
}

/* Lightbox Modal */
.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 100000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.custom-modal.active {
  display: flex;
}
.custom-modal-content {
  max-width: 800px;
  width: 100%;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

/* Print Utilities */
@media print {
  #header, #footer, .btn, .sub-season-bar, .side-drawer {
    display: none !important;
  }
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
}
