/* ===========================
   Global Styles & Color System
   =========================== */

:root {
    --primary-color: #003da5;
    --primary-dark: #002d7f;
    --primary-light: #0052cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --new-size: 0.7rem;           /* dot size (relative to font-size) */
  --new-gap: 0.45rem;           /* gap between text and dot/badge */
  --new-color: white;         /* color of dot/badge */
  --new-bg: red;               /* background for 'New' badge */
  --new-padding: 0.18rem 0.45rem;
  --new-radius: 999px;
  --new-pulse: 1.2s;            /* animation duration */
  --new-font-size: 0.75rem;     /* text size inside badge */
  --new-contrast-border: rgba(0,0,0,0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
}

/* ===========================
   Top Bar
   =========================== */

.top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--bg-white);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.top-bar a {
    color: var(--bg-white) !important;
    transition: opacity 0.3s ease;
}

.top-bar a:hover {
    opacity: 0.8;
}

.top-bar small {
    display: block;
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem 0;
    }
    .top-bar small {
        font-size: 0.75rem !important;
    }
}

/* ===========================
   Navigation Bar
   =========================== */

.navbar {
    border-bottom: 3px solid var(--primary-color);
}

.navbar-brand {
    font-weight: 600;
}

.navbar-brand div:first-child {
    font-size: 0.9rem;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

@media (max-width: 992px) {
    .nav-link {
        margin: 0;
        padding: 0.5rem 0 !important;
    }
}

/* ===========================
   Welcome Hero Section
   =========================== */

.welcome-hero {
    background: linear-gradient(135deg, rgba(0, 61, 165, 0.05) 0%, rgba(0, 82, 204, 0.05) 100%);
    border-bottom: 2px solid var(--border-color);
}

.welcome-hero h1 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.welcome-hero p {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.welcome-hero img {
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
}

@media (max-width: 768px) {
    .welcome-hero h1 {
        font-size: 2rem;
    }
    .welcome-hero p {
        font-size: 1rem;
    }
}

/* ===========================
   Examination Types Section
   =========================== */

.exam-types {
    padding: 3rem 0;
}

.exam-type-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.exam-type-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(0, 61, 165, 0.1);
    transform: translateY(-5px);
}

.exam-icon {
    font-size: 2.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
}

/* ===========================
   Cards & Content Sections
   =========================== */

.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    border: none;
    color: var(--bg-white);
}

.card-body {
    padding: 1.5rem;
}

.notice-item {
    transition: all 0.3s ease;
}

.notice-item:hover {
    background-color: rgba(0, 61, 165, 0.02);
    padding-left: 1rem;
}

.notice-item h6 {
    color: var(--text-dark);
    font-weight: 600;
}

.exam-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.exam-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.exam-card h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.exam-card p,
.exam-card ul {
    color: var(--text-dark);
}

.contact-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.contact-card h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.contact-card p,
.contact-card a {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    .exam-card,
    .contact-card {
        padding: 1.5rem;
    }
}

/* ===========================
   Tables
   =========================== */

.table {
    color: var(--text-dark);
}

.table thead {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.table tbody tr:hover {
    background-color: rgba(0, 61, 165, 0.05);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
}

/* ===========================
   Badges
   =========================== */

.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===========================
   List Groups
   =========================== */

.list-group-item {
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.list-group-item:hover {
    background-color: rgba(0, 61, 165, 0.05);
}

.list-group-item a {
    color: var(--text-dark);
}

.list-group-item a:hover {
    color: var(--primary-color);
}

/* ===========================
   Footer
   =========================== */

.footer {
    background-color: var(--text-dark);
    color: var(--bg-white);
}

.footer a {
    color: var(--bg-white);
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
}

.footer h6 {
    color: var(--bg-white);
    font-weight: 600;
}

/* ===========================
   Bootstrap Overrides
   =========================== */

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

/* ===========================
   Responsive Utilities
   =========================== */

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

@media (max-width: 768px) {
    .d-flex.gap-3 {
        flex-direction: column;
    }
    
    .btn-lg {
        width: 100%;
    }
}

/* ===========================
   Utility Classes
   =========================== */

.fw-500 {
    font-weight: 500;
}

.text-light {
    color: #f8f9fa !important;
}

.rounded-3 {
    border-radius: 12px;
}


/* Center EVERYTHING inside */
.main-coordinator {
    display: flex;
    justify-content: center;
    text-align: center;   /* Centers text */
}

/* Center the committee card inside */
.committee-card {
    text-align: center;
}

/* Keep image in center */
.committee-image {
    width: 35vw;
    max-width: 10em;
    height: calc(35vw * (15 / 16));
    max-height: calc(12em * (15 / 16));
    padding: 0;
    margin: 0 auto; /* Centers the image box */
}

.committee-image img {
    transition: ease-in-out 0.3s;
    border-radius: 50%;
    border: 1px solid rgba(5, 87, 158, 0.9);
    box-shadow: #032e54;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Avoids distortion */
}


/* small circular dot (ideal beside links) */
.new-dot {
  display: inline-block;
  width: calc(var(--new-size) * 1.25);
  height: calc(var(--new-size) * 1.25);
  margin-left: var(--new-gap);
  vertical-align: middle;
  border-radius: 50%;
  background: var(--new-color);
  box-shadow: 0 0 0 0 rgba(0,0,0,0.08);
  position: relative;
  transform-origin: center;
  /* animation */
  animation: newPulse var(--new-pulse) ease-in-out infinite;
}

/* small badge with text "New" */
.new-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: var(--new-gap);
  padding: var(--new-padding);
  font-size: var(--new-font-size);
  line-height: 1;
  color: var(--new-color);
  background: var(--new-bg);
  border: 1px solid var(--new-contrast-border);
  border-radius: var(--new-radius);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  vertical-align: middle;
  white-space: nowrap;
  animation: newPulse var(--new-pulse) ease-in-out infinite;
}

/* Utility class to attach a dot to any element (no extra markup) */
.has-new {
  position: relative;
  padding-right: calc(var(--new-size) * 3 + var(--new-gap));
}

/* pseudo-element draws the dot (so you don't need additional HTML) */
.has-new::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0.2rem; /* adjust horizontal placement */
  width: calc(var(--new-size) * 1.25);
  height: calc(var(--new-size) * 1.25);
  border-radius: 50%;
  background: var(--new-color);
  box-shadow: 0 0 0 0 rgba(0,0,0,0.08);
  animation: newPulse var(--new-pulse) ease-in-out infinite;
  pointer-events: none;
}

/* Slight emphasis (optionally show text on hover) */
.has-new[data-label="show-text"]::before {
  content: "New";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: calc(1rem + var(--new-size));
  font-size: var(--new-font-size);
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  background: var(--new-bg);
  color: var(--new-color);
  border: 1px solid var(--new-contrast-border);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Animation: scale + fade */
@keyframes newPulse {
  0%   { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(229,57,53,0.35);}
  60%  { transform: scale(1.18); opacity: .85; box-shadow: 0 0 0 8px rgba(229,57,53,0);}
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(229,57,53,0);}
}

/* Respect user's reduce-motion preference */
@media (prefers-reduced-motion: reduce) {
  .new-dot, .new-badge, .has-new::after, .has-new[data-label="show-text"]::before {
    animation: none !important;
  }
}

/* Example small touchups so it looks fine next to inline text/buttons */
a.link-with-new,
button.has-new,
.btn.has-new {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}