/* CLEANED + PRODUCTION-SAFE VERSION */

/* =============================
   GOOGLE FONTS (move to HTML ideally)
============================= */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Libre+Baskerville:wght@400;700&display=swap");

/* =============================
   ROOT VARIABLES
============================= */
:root {
  --primary-color: #1cafad;
  --primary-dark: #159a98;
  --primary-light: #4dc5c3;
  --teal-100: #e6f7f7;
  --teal-200: #b3e8e8;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --dark-gray: #343a40;
  --text-color: #2c3e50;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --box-shadow: 0 4px 20px rgba(28, 175, 173, 0.1);
  --transition: all 0.3s ease;
  --bs-primary: #1cafad;
  --bs-primary-rgb: 28, 175, 173;

  /* CRITICAL: button system variables */
  --bs-btn-color: #1cafad;
  --bs-btn-border-color: #1cafad;
  --bs-btn-hover-bg: #1cafad;
  --bs-btn-hover-border-color: #1cafad;
}

/* =============================
   BASE RESET
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-gray);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Libre Baskerville", serif;
  font-weight: 700;
}

/* =============================
   BUTTONS
============================= */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: var(--border-radius);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* =============================
   NAVBAR
============================= */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 15px 0;
}

.navbar-brand {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-text {
    margin-left: 10px;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:active {
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--text-color) !important; /* Keeps the text dark grey */
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-color);
    margin: 0 10px;
    transition: var(--transition);
    position: relative;
    
    border: none;
    outline: none;
    box-shadow: none;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

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

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* =============================
   HERO / HEADER
============================= */
.page-header {
  background: linear-gradient(135deg, #e8f8f8 0%, #ffffff 100%);
}

/* =============================
   CERT CARDS (FIXED)
============================= */
.cert-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
}

.cert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-icon img {
  max-height: 80px;
  width: auto;
}

/* =============================
   CARDS
============================= */
.card {
  border-radius: var(--border-radius-lg);
}

/* =============================
   MOBILE NAV (FIXED NAME)
============================= */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--teal-200);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 1000;
}

.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--dark-gray);
  font-size: 0.8rem;
}

.mobile-bottom-nav-item:hover {
  color: var(--primary-color);
}

.btn-outline-primary {
  --bs-btn-color: #1cafad;
  --bs-btn-border-color: #1cafad;
  --bs-btn-hover-bg: #1cafad;
  --bs-btn-hover-border-color: #1cafad;
  --bs-btn-hover-color: #ffffff;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 10px 0;
}

.dropdown-item:hover {
    background-color: var(--teal-100);
    color: var(--primary-color);
}

.dropdown-item:active,
.dropdown-item.active {
  background-color: var(--primary-light);
  color: #ffffff;
}

.dropdown-toggle::after {
  display: none !important;
}

/* FAQ Accordion Styles */
.accordion {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.accordion-item {
    border: none;
    border-bottom: 1px solid var(--teal-200);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-button {
    background-color: var(--white);
    color: var(--text-color);
    font-weight: 600;
    padding: 1.5rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: var(--transition);
}

.accordion-button:not(.collapsed) {
    background-color: var(--teal-100);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(28, 175, 173, 0.25);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231cafad'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 1.5rem;
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* All buttons - active/pressed state */
.btn:active,
.btn.active,
.btn-primary:active,
.btn-primary.active,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #159a98 !important;
    border-color: #159a98 !important;
    color: white !important;
}

/* Outline button specific override */
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #1cafad !important;
    border-color: #1cafad !important;
}

/* Navigation links and dropdown items */
.nav-link:active,
.nav-link.active,
.dropdown-item:active,
.dropdown-item.active {
    background-color: #1cafad !important;
    color: white !important;
}

/* Category filter / any custom button */
.category-btn:active,
.category-btn.active,
.btn.filter-btn:active,
.btn.filter-btn.active {
    background-color: #1cafad !important;
    border-color: #1cafad !important;
    color: white !important;
}

/* Focus ring – replace blue with teal */
.btn:focus,
.btn-primary:focus,
.btn-outline-primary:focus,
.nav-link:focus,
.category-btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(28, 175, 173, 0.25) !important;
    border-color: #1cafad !important;
    outline: none !important;
}

.dropdown-item:focus {
    box-shadow: none;
    border-color: #1cafad !important;
    outline: none !important; 
}

/* Mobile bottom nav tap state */
.mobile-bottom-nav-item:active,
.mobile-bottom-nav-item.active {
    color: #1cafad !important;
}

/* =============================
   PAGINATION CUSTOMIZATION
============================= */

/* Active page item */
.pagination .page-item.active .page-link {
    background-color: #1cafad !important;
    border-color: #1cafad !important;
    color: white !important;
}

/* Hover state for all page links */
.pagination .page-link:hover {
    background-color: #159a98 !important;
    border-color: #159a98 !important;
    color: white !important;
}

/* Focus state (keyboard navigation) */
.pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(28, 175, 173, 0.25) !important;
    border-color: #1cafad !important;
    outline: none !important;
}

/* Disabled items (keep neutral) */
.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

/* Optional: change default link color to teal */
.pagination .page-link {
    color: #1cafad !important;
}

/* Ensure active stays white */
.pagination .page-item.active .page-link:hover {
    background-color: #159a98 !important;
    color: white !important;
}

/* =============================
   FOOTER
============================= */
footer {
  color: var(--white);
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 768px) {
  .cert-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
