/* ============================================= */
/*  Color System & Variables                     */
/* ============================================= */
:root {
  /* Core Colors */
  --primary-color: #bf3d3d;
  --secondary-color: #E4002B;
  --accent-color: #FFC72C;
  --dark-color: #222222;
  --light-color: #F8F9FA;
  
  /* Bootstrap Primary/Danger Overrides (both set to #bf3d3d) */
  --bs-primary: #bf3d3d;
  --bs-primary-rgb: 191, 61, 61;
  --bs-primary-bg-subtle: #f9e7e7;
  --bs-primary-border-subtle: #ecc5c5;
  --bs-primary-text-emphasis: #7a1818;
  
  --bs-danger: #bf3d3d;
  --bs-danger-rgb: 191, 61, 61;
  --bs-danger-bg-subtle: #f9e7e7;
  --bs-danger-border-subtle: #ecc5c5;
  --bs-danger-text-emphasis: #7a1818;
  
  /* Bootstrap Component Colors */
  --bs-secondary: var(--secondary-color);
  --bs-warning: var(--accent-color);
}

/* ============================================= */
/*  Base Styles & Utilities                      */
/* ============================================= */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  color: var(--dark-color);
  scroll-behavior: smooth;
}

html {
  scroll-padding-top: 80px;
}

.container {
  max-width: 1200px;
  padding-left: 15px;
  padding-right: 15px;
}

/* ============================================= */
/*  Component Overrides                          */
/* ============================================= */

/* ----- Buttons & Alerts ----- */
.btn-primary, .btn-danger,
.bg-primary, .bg-danger {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: white !important;
}

.btn-primary:hover, .btn-danger:hover {
  background-color: #a33535 !important;
  border-color: #a33535 !important;
}

.text-primary, .text-danger {
  color: var(--bs-primary) !important;
}

.border-primary, .border-danger {
  border-color: var(--bs-primary) !important;
}

.alert-danger {
  --bs-alert-color: var(--bs-danger-text-emphasis);
  --bs-alert-bg: var(--bs-danger-bg-subtle);
  --bs-alert-border-color: var(--bs-danger-border-subtle);
}

/* ----- Navigation ----- */
.navbar.bg-primary {
  background-color: var(--bs-primary) !important;
}

.bg-primary-gradient {
  background: var(--bs-primary) !important;
  background: linear-gradient(
    135deg, 
    var(--bs-primary) 0%, 
    color-mix(in srgb, var(--bs-primary), #000 15%) 100%
  ) !important;
  background-attachment: fixed !important;
}

.nav-pills .nav-link.active {
  background-color: var(--bs-primary) !important;
}

/* ----- Form Elements ----- */
.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: var(--bs-danger);
}

/* ============================================= */
/*  Page Sections                                */
/* ============================================= */

/* ----- Hero Section ----- */
.hero-section {
  /*background: linear-gradient(135deg, rgba(191, 61, 61, 0.9) 0%, rgba(167, 53, 53, 0.95) 100%),*/
  background: linear-gradient(135deg, rgba(0, 91, 142, 0.9) 0%, rgba(0, 64, 107, 0.95) 100%), 
              url('https://images.unsplash.com/photo-1500409008540-5dcacde1c32b') center/cover;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bi-chevron-down {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ----- About Section ----- */
.about-section {
  background-color: var(--light-color);
}

.profile-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 5px solid white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.credentials-card {
  transition: transform 0.3s ease;
  margin-top: 2rem;
}
.credentials-card:hover {
  transform: translateY(-5px);
}

/* ----- Policy Section ----- */
.policy-ideas-section {
  background-color: white;
}

#policy-ideas-tab .nav-link {
  border-radius: 0.5rem;
  border: 2px solid transparent;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
}

#policy-ideas-tab .nav-link.active {
  background: var(--bs-primary);
  color: white !important;
  border-color: var(--bs-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#policy-ideas-tab .nav-link:not(.active) {
  background: white;
  color: var(--dark-color);
  border: 2px solid var(--light-color);
}

/* ----- Policy Cards ----- */

.policy-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: 100%;
  }
  
  .policy-card .card-body {
    padding: 2rem;
  }
  
  .policy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  }
  
  .policy-card .card-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .policy-card .card-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
  }

/* ----- Footer ----- */
footer .nav-link {
  color: white !important;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
footer .nav-link:hover {
  opacity: 1;
  color: var(--accent-color) !important;
}
footer .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}
footer .nav-link:hover::after {
  width: 100%;
}

/* ============================================= */
/*  Miscellaneous Fixes and Adjustments          */
/* ============================================= */

 /* Secondary Policy Nav (only appears on larger displays) */

#secondary-policy-nav {
    margin-top: 0rem !important;
  }
  
  #secondary-policy-nav .nav-link {
    color: var(--primary-color);
    background-color: var(--light-color);
    font-weight: 600;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
  }
  
  #secondary-policy-nav .nav-link.active {
    color: var(--light-color);
  }
  
  #secondary-policy-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
  }

  .nav-divider {
    color: var(--primary-color);
    opacity: 0.5;
    padding: 0 0.5rem;
    align-self: center;
  }

/* ============================================= */
/*  Responsive Overrides                         */
/* ============================================= */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }
  
  /* Footer */
  footer {
    padding: 3rem 0 !important;
  }
  .bg-primary-gradient {
    background: var(--primary-color) !important;
  }
  
  /* Policy Tabs */
  #policy-ideas-tab,
  #secondary-policy-nav {
    display: none !important;
  }
  .tab-content {
    display: block !important;
    min-height: auto !important;
  }
  .tab-pane {
    position: relative !important;
    opacity: 1 !important;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }
  .tab-pane:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  
  /* Profile Image */
  .profile-img {
    width: 160px;
    height: 160px;
  }
}


/* ============================================= */
/* VOTING RECORD PAGE STYLES */
/* ============================================= */

.voting-record-container {
    background-color: #f8f9fa;
}

/* Transparency Card */
.transparency-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.transparency-features .feature-icon {
    font-size: 1.5rem;
    color: #20c997;
    margin-top: 2px;
}

/* Accordion Styles */
.voting-accordion {
    --bs-accordion-border-width: 0;
    --bs-accordion-btn-padding-x: 1.5rem;
    --bs-accordion-btn-padding-y: 1.25rem;
}

.voting-item {
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.voting-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vote-header-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.vote-title {
    flex: 1;
    font-weight: 500;
}

.vote-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vote-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.vote-position {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Year/Month Headers */
.year-header {
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #dee2e6;
}

.year-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
}

.month-header {
    padding-left: 1rem;
    position: relative;
}

.month-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    height: 60%;
    width: 3px;
    background: #bf3d3d;
    transform: translateY(-50%);
}

.month-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
}

/* Voting Reasoning Styles */
.voting-reasoning {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.voting-reasoning ol,
.voting-reasoning ul {
    padding-left: 1.5rem;
}

.voting-reasoning li {
    margin-bottom: 0.75rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .vote-header-content {
        flex-wrap: wrap;
    }
    
    .vote-meta {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.5rem;
    }
}