/* assets/css/styles.css */

/* =========================================
   LIGHT THEME
========================================= */
:root,
[data-bs-theme="light"] {

  /* PRIMARY BRAND */
  --bs-primary: #1467b7;
  --bs-primary-rgb: 20, 103, 183;

  /* LINKS */
  --bs-link-color: #1467b7;
  --bs-link-hover-color: #156fc5;

  /* SECONDARY / ACCENTS */
  --bs-secondary: #384764;
  --bs-secondary-rgb: 56, 71, 100;

  /* BACKGROUND + TEXT */
  --bs-body-bg: #f8faff;
  --bs-body-color: #06213b;

  /* SITE COLORS */
  --site-navbar-bg: #ffffff;
  --site-navbar-border: #e5e7eb;
  --site-body-bg: #f8faff;
  --site-body-color: #06213b;

  /* CUSTOM ACCENTS */
  --site-accent-light: #a0afce;
  --site-accent-dark: #06213b;
  --site-primary-hover: #156fc5;
  --site-primary-soft: rgba(20, 103, 183, 0.08);
}


/* =========================================
   DARK THEME
========================================= */
[data-bs-theme="dark"] {
  color-scheme: dark;

  /* BASE */
  --bs-body-bg: #050816;
  --bs-body-color: #e5e7eb;

  /* PRIMARY (slightly brighter for dark mode) */
  --bs-primary: #156fc5;
  --bs-primary-rgb: 21, 111, 197;

  /* LINKS */
  --bs-link-color: #156fc5;
  --bs-link-hover-color: #3b82f6;

  /* SECONDARY */
  --bs-secondary: #384764;
  --bs-secondary-rgb: 56, 71, 100;

  /* SURFACES */
  --bs-card-bg: #020617;
  --bs-card-border-color: #111827;

  /* SITE COLORS */
  --site-navbar-bg: #020617;
  --site-navbar-border: #111827;

  /* CUSTOM ACCENTS */
  --site-accent-light: #384764;
  --site-accent-dark: #000000;
  --site-primary-soft: rgba(21, 111, 197, 0.12);
}

/* =========================================
   ROLE STYLES
--------------------------------------- */
.role-administrators { color: #1467b7; }
.role-community-team { color: #2ecc71; }
.role-package-team { color: #ff0000; }
.role-graphics-team { color: #e2703a; }


/* ---------------------------------------
   GENERAL LAYOUT + STICKY FOOTER
--------------------------------------- */
html,
body {
  height: 100%;
}

/* Body is flex so footer can sit at bottom on short pages */
body {
  background-color: var(--site-body-bg);
  color: var(--site-body-color);
  display: flex;
  flex-direction: column;
}

/* Main content grows to fill space */
main {
  flex: 1 0 auto;
}

/* Footer stays at bottom, doesn't shrink */
.site-footer {
  flex-shrink: 0;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--site-navbar-border);
  background-color: var(--site-navbar-bg) !important;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Theme toggle button */
#themeToggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem 0;
}

.hero-title {
  font-weight: 800;
}

.hero-accent {
  color: #1467b7;
}

/* Cards */
.card {
  border-radius: 0.75rem;
}

/* Small utilities */
.section-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Filament calculator */
.filament-result {
  display: none;
  margin-top: 1.25rem;
}

.filament-result.active {
  display: block;
}

/* ----------------------------------------
   Pulse3D Custom Button Theme (Option B)
----------------------------------------- */

/* PRIMARY BUTTON */
.btn-primary {
  background-color: #03a1fc !important;
  border-color: #03a1fc !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #0281ca !important;
  border-color: #0281ca !important;
  color: #ffffff !important;
}

/* OUTLINE PRIMARY */
.btn-outline-primary {
  color: #03a1fc !important;
  border-color: #03a1fc !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: #03a1fc !important;
  color: #ffffff !important;
  border-color: #0281ca !important;
}

/* SECONDARY BUTTON */
.btn-secondary {
  background-color: #4b5563 !important; /* cool gray */
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: #374151 !important; /* darker gray */
  border-color: #374151 !important;
  color: #ffffff !important;
}

/* OUTLINE SECONDARY */
.btn-outline-secondary {
  color: #4b5563 !important;
  border-color: #4b5563 !important;
  background-color: transparent !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
  background-color: #4b5563 !important;
  color: #ffffff !important;
  border-color: #374151 !important;
}

/* GHOST / LIGHT BLUE BUTTON */
.btn-lightblue {
  background-color: #e8f4ff !important;
  border-color: #e8f4ff !important;
  color: #0281ca !important;
}

.btn-lightblue:hover {
  background-color: #d4eaff !important;
  border-color: #d4eaff !important;
  color: #026ead !important;
}

/* Hero layout tweaks */
.hero-news-card {
  border-radius: 1rem;
}

/* ---------------------------------------
   NEWS LIST CONTAINER (SCROLLABLE)
--------------------------------------- */
.hero-news-list {
  max-height: 260px; /* Scroll area height */
  overflow-y: auto;
  padding-right: 0.25rem; /* Keep text away from scrollbar */
  scrollbar-width: none; /* Firefox hide scrollbar by default */
}

/* Hide scrollbar by default (Webkit) */
.hero-news-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Show scrollbar on hover */
.hero-news-list:hover {
  scrollbar-width: thin;
}

.hero-news-list:hover::-webkit-scrollbar {
  width: 6px;
}

.hero-news-list:hover::-webkit-scrollbar-track {
  background: transparent;
}

.hero-news-list:hover::-webkit-scrollbar-thumb {
  background-color: rgba(3, 161, 252, 0.45); /* Accent blue */
  border-radius: 999px;
}

/* ---------------------------------------
   NEWS ITEM SPACING + ICONS
--------------------------------------- */
.hero-news-item:last-child {
  margin-bottom: 0;
}

/* Slightly larger icons for visibility */
.hero-news-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* Divider spacing inside news list */
.hero-news-card hr {
  opacity: 0.15;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Centers the "Site Updates" header */
.hero-news-card .card-header h2 {
  text-align: center;
}

/* Quick cards styling */
.quick-card {
  border-radius: 1rem;
}

/* ---------------------------------------
   HERO IMAGE CSS
--------------------------------------- */

/* Hero title image: small & centered */
.hero-title-img {
  width: 180px; /* desktop default, overridden on mobile */
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ---------------------------------------
   MOBILE TWEAKS FOR HERO + NEWS
--------------------------------------- */
@media (max-width: 767.98px) {
  /* Hero spacing */
  .hero {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  /* Smaller logo on phones */
  .hero-title-img {
    width: 150px;
  }

  /* Center hero text */
  .hero .lead {
    font-size: 0.98rem;
    text-align: center;
  }

  .hero p.text-muted.small {
    text-align: center;
  }

  /* Stack buttons full-width */
  .hero .d-flex.gap-3 {
    flex-direction: column;
  }

  .hero .btn-lg {
    width: 100%;
    justify-content: center;
  }

  /* News card spacing on mobile */
  .hero-news-card {
    margin-top: 2rem;
  }

  .hero-news-card .card-header h2 {
    font-size: 1.1rem;
  }

  .hero-news-card .card-header p {
    font-size: 0.9rem;
  }

  /* On mobile, let news list grow instead of being scroll-limited */
  .hero-news-list {
    max-height: none;
    overflow-y: visible;
  }

  /* Make sure the hero container has side padding and is centered */
  .container.hero {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Prevent any nested row tweaks from going edge-to-edge */
  .container.hero > .row {
    margin-left: 0;
    margin-right: 0;
  }

  /* Global: prevent horizontal scroll on mobile */
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* ---------------------------------------
                FOOTER
--------------------------------------- */

/* Sticky footer layout */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--site-body-bg);
  color: var(--site-body-color);
}

main {
  flex: 1 0 auto;
  padding-bottom: 2rem; /* space between content and footer, same on all pages */
}

.site-footer {
  flex-shrink: 0;
}

/* Footer link styling: use normal text color, not bright blue */
.footer-link {
  color: inherit !important;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: none;
  color: #03a1fc !important; /* optional accent hover */
}

/* Reserved if you ever want extra footer layout tweaks */
.site-footer .footer-inner {
  /* empty for now */
}

.footer-active {
  color: #0281ca !important;
  font-weight: 600;
}

.footer-center {
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------
                RESOURCES
--------------------------------------- */

.alert-warning {
  background-color: #fff7d6; /* softer pale yellow */
  border-color: #ffe9a3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.alert-tight {
  display: inline-block;
  width: auto;
  max-width: 100%;
}

.section-divider {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
  border: none;
  border-top: 1.5px solid rgba(0, 0, 0, 0.08);
}

/* ---------------------------------------
                NAV
--------------------------------------- */

.nav-link.active {
  color: #0281ca !important;
  font-weight: 600;
}

.navbar .nav-link:hover {
  color: #0281ca !important;
}

/* ---------------------------------------
            COMMUNITY LINKS
--------------------------------------- */

/* Position links inside cards */
.community-link {
  position: absolute;
  bottom: 5px;
  right: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  font-size: 0.9rem; /* Slightly smaller */
}

.community-link:hover {
  color: #0281ca; /* accent blue on hover */
  text-decoration: underline;
}

/* Ensure card has relative positioning */
.card.position-relative {
  position: relative;
}

/* ---------------------------------------
            CALC HELP MODAL
--------------------------------------- */
/* Limit height of help modal and make inside scroll */
#calcHelpModal .modal-dialog {
  max-width: 700px; /* optional: reduce width */
}

#calcHelpModal .modal-content {
  max-height: 80vh; /* limits modal height */
  overflow: hidden; /* stop whole page scrolling */
}

#calcHelpModal .modal-body {
  overflow-y: auto; /* scroll inside body only */
  padding-right: 1rem; /* nice spacing */
}

/* ---------------------------------------
              SITE BANNER ALERT
--------------------------------------- */

.site-banner {
  font-size: 0.9rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* ---------------------------------------
            ADMIN BACK HOME
--------------------------------------- */

/* ------------------------------
   ADMIN PAGE HEADER STYLING
------------------------------ */

.admin-breadcrumb {
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
}

.admin-breadcrumb a {
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}

.admin-breadcrumb a:hover {
  color: #03a1fc;
}

.admin-breadcrumb .divider {
  margin: 0 6px;
  color: #999;
}

.admin-breadcrumb .current {
  color: #777;
}

/* ------------------------------
   SERVICES PAGE STYLING
------------------------------ */
/* Position links inside cards */
/* Force Services "Learn more" to match resource-card style */
.card.position-relative .service-link {
  position: absolute !important;
  right: 14px !important;
  bottom: 12px !important;

  font-weight: 600 !important;
  font-size: 0.95rem !important;

  color: #111 !important;
  text-decoration: none !important;
}

.card.position-relative .service-link::after {
  content: " \2192"; /* → */
}

.card.position-relative .service-link:hover {
  color: #0281ca !important;
  text-decoration: underline !important;
}
