/*-------------------------
    Variables
-------------------------*/
:root {
  --pb-primary: #0693e3;
  --pb-primary-dark: #0572b3;
  --pb-dark: #1a1a2e;
  --pb-dark-lighter: #16213e;
  --pb-link: #428bca;
  --pb-text: #333333;
  --pb-text-muted: #757575;
  --pb-bg-light: #f2f2f2;
  --pb-white: #ffffff;
  --pb-border: #e0e0e0;
}

/*-------------------------
    Base
-------------------------*/
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--pb-text);
  background: var(--pb-bg-light);
  padding-top: 70px;
}

a {
  color: var(--pb-link);
  text-decoration: none;
}
a:hover {
  color: var(--pb-primary-dark);
}

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

/*-------------------------
    Navbar
-------------------------*/
.navbar {
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}
.navbar-brand {
  padding: 0;
}
.logo-main {
  height: 32px;
  width: auto;
}
.navbar .nav-link {
  color: #333 !important;
  font-weight: 500;
  margin-left: 1.25rem;
  font-size: 0.95rem;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--pb-primary) !important;
}

/*-------------------------
    Hero (Homepage)
-------------------------*/
.hero {
  background: linear-gradient(135deg, #0b3d6b 0%, #0a5a9e 50%, #0693e3 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero h1 span {
  color: #7dd3fc;
}
.hero .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  line-height: 1.7;
}
.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.25);
}
.hero .btn-outline-light {
  border-color: rgba(255,255,255,0.5);
}
.hero .btn-outline-light:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/*-------------------------
    Buttons
-------------------------*/
.btn-primary {
  background: var(--pb-primary);
  border-color: var(--pb-primary);
}
.btn-primary:hover {
  background: var(--pb-primary-dark);
  border-color: var(--pb-primary-dark);
}
.btn-outline-primary {
  color: var(--pb-primary);
  border-color: var(--pb-primary);
}
.btn-outline-primary:hover,
.btn-outline-primary.active {
  background: var(--pb-primary);
  border-color: var(--pb-primary);
  color: #fff;
}

/*-------------------------
    Sections
-------------------------*/
.section {
  padding: 4rem 0;
}
.section-light {
  background: var(--pb-bg-light);
}
.section-white {
  background: var(--pb-white);
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--pb-text-muted);
  margin-bottom: 2rem;
}

/*-------------------------
    Project Cards
-------------------------*/
.project-card {
  border: 1px solid var(--pb-border);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
  background: var(--pb-white);
}
.project-card:hover {
  border-color: var(--pb-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.project-card .icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--pb-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--pb-primary);
}
.project-card h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.project-card p {
  color: var(--pb-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.project-card .project-link {
  color: var(--pb-primary);
  font-weight: 600;
  font-size: 0.9rem;
}
.project-card .project-link:hover {
  color: var(--pb-primary-dark);
}

/*-------------------------
    Project Card Large
-------------------------*/
.project-card-lg {
  text-align: left;
  padding: 2rem;
}
.project-card-lg .icon-wrap {
  margin: 0 0 1rem;
}
.project-card-lg p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/*-------------------------
    Page Content
-------------------------*/
.page-content {
  padding: 2.5rem 0;
}
.page-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.page-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.page-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.page-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.page-content ul {
  margin-bottom: 1.25rem;
}
.page-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.page-content hr {
  margin: 2.5rem 0;
}

.contact-form .form-control {
  border-radius: 8px;
}
.contact-form .form-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 0;
}

/*-------------------------
    Article List
-------------------------*/
.article-list-hero {
  background: linear-gradient(135deg, #0b3d6b 0%, #0a5a9e 50%, #0693e3 100%);
  color: #fff;
  padding: 3rem 0;
}
.article-list-hero h1 {
  font-size: 2rem;
  font-weight: 700;
}
.article-list-hero p {
  color: rgba(255,255,255,0.7);
}
.article-list-hero .search-wrap .form-control {
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.article-list-hero .search-wrap .form-control::placeholder {
  color: rgba(255,255,255,0.5);
}
.article-list-hero .search-wrap .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.15);
}

.category-filter {
  margin-bottom: 1.5rem;
}
.category-filter .btn {
  margin: 0.25rem;
  font-size: 0.85rem;
}

.article-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e9ecef;
}
.article-item:last-child {
  border-bottom: none;
}
.article-item h5 {
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.article-item h5 a {
  color: var(--pb-text);
}
.article-item h5 a:hover {
  color: var(--pb-primary);
}
.article-meta {
  font-size: 0.85rem;
  color: var(--pb-text-muted);
}
.article-meta .badge {
  background: var(--pb-primary);
  font-weight: 500;
  font-size: 0.75rem;
}
.article-excerpt {
  color: var(--pb-text-muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

/*-------------------------
    Single Article
-------------------------*/
.article-header {
  background: linear-gradient(135deg, #0b3d6b 0%, #0a5a9e 50%, #0693e3 100%);
  color: #fff;
  padding: 3rem 0;
}
.article-header-inner {
  max-width: 760px;
}
.article-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
}
.article-header p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 0;
}
.article-header .badge {
  background: var(--pb-primary);
  font-weight: 500;
}
.article-header span {
  color: rgba(255,255,255,0.7);
}

/* Article content typography (matches NOC/CB pattern) */
.article-body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #212529;
  padding: 40px 0;
}
.article-body > *:first-child {
  margin-top: 0 !important;
}
.article-body > *:last-child {
  margin-bottom: 0 !important;
}
.article-body p {
  margin: 0 0 1rem;
  font-size: 18px;
}
.article-body h1,
.article-body h2,
.article-body h3 {
  line-height: 1.3;
  font-weight: 600;
  color: #1a1a1a;
}
.article-body h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
}
.article-body h2 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.5rem;
}
.article-body h3 {
  margin: 1.1rem 0 0.6rem;
  font-size: 1.25rem;
}
.article-body h3 + pre,
.article-body h3 + table,
.article-body h3 + ul {
  margin-top: 0.4rem;
}
.article-body ul,
.article-body ol {
  margin-left: 1rem;
  margin-bottom: 1.5em;
}
.article-body li {
  margin-bottom: 0.5em;
  list-style-type: disc;
}
.article-body blockquote {
  border-left: 4px solid var(--pb-primary);
  padding-left: 1em;
  color: #555;
  font-style: italic;
  margin: 2em 0;
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 1rem 1.5rem;
}
.article-body blockquote p:last-child {
  margin-bottom: 0;
}
.article-body a {
  color: var(--pb-primary);
  text-decoration: underline;
}
.article-body a:hover {
  color: var(--pb-primary-dark);
}
.article-body img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 6px;
}
/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 16px;
}
.article-body th,
.article-body td {
  border: 1px solid #dee2e6;
  padding: 8px 10px;
}
.article-body th {
  background-color: #f4f6ff;
  text-align: left;
}
/* Code blocks */
.article-body pre {
  background: #f8f9fc;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 1rem 0 1.25rem;
  overflow: auto;
  line-height: 1.6;
  font-size: 14px;
}
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 14px;
  background: var(--pb-bg-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.article-body pre code {
  background: none;
  padding: 0;
}
@media (min-width: 992px) {
  .article-body {
    padding: 24px 0 40px;
    padding-right: 24px;
  }
}

.article-nav {
  padding: 1.5rem 0 3rem;
}
.article-nav a {
  color: var(--pb-primary);
  font-weight: 600;
}

/*-------------------------
    Sidebar
-------------------------*/
.sidebar {
  padding: 2.5rem 0 2.5rem 2rem;
}
.sidebar-section {
  margin-bottom: 2rem;
  background: var(--pb-white);
  border: 1px solid var(--pb-border);
  border-radius: 10px;
  padding: 1.5rem;
}
.sidebar-section h5 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--pb-primary);
}

.project-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.project-links li {
  margin-bottom: 0.5rem;
}
.project-links li a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--pb-text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.project-links li a:hover {
  background: var(--pb-bg-light);
  color: var(--pb-primary);
}
.project-links li a i {
  color: var(--pb-primary);
  margin-right: 0.5rem;
  font-size: 1rem;
}
.project-links li a span {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--pb-text-muted);
  margin-top: 0.15rem;
  padding-left: 1.5rem;
}

.category-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-links li {
  margin-bottom: 0.25rem;
}
.category-links li a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: var(--pb-text);
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.category-links li a:hover {
  background: var(--pb-bg-light);
  color: var(--pb-primary);
}

/*-------------------------
    Footer
-------------------------*/
footer {
  background: var(--pb-dark);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 2rem;
  margin-top: 0;
}
footer h5,
footer h6 {
  color: #fff;
  margin-bottom: 1rem;
}
.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
}
footer a {
  color: rgba(255,255,255,0.7);
}
footer a:hover {
  color: #fff;
}
footer hr {
  border-color: rgba(255,255,255,0.1);
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a {
  font-size: 0.9rem;
}
.social-links a {
  font-size: 1.25rem;
  margin-right: 1rem;
  color: rgba(255,255,255,0.7);
}
.social-links a:hover {
  color: var(--pb-primary);
}
.copyright {
  font-size: 0.85rem;
  margin-bottom: 0;
}

/*-------------------------
    About Page
-------------------------*/
.page-header {
  background: linear-gradient(135deg, #0b3d6b 0%, #0a5a9e 50%, #0693e3 100%);
  color: #fff;
  padding: 3rem 0;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
}
.page-content {
  background: var(--pb-white);
  padding: 3rem 0;
}
.page-content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

/*-------------------------
    Homepage Latest Articles
-------------------------*/
.latest-articles {
  background: var(--pb-white);
  padding: 4rem 0;
}

/* Article cards (homepage + listing) */
.article-box {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: calc(100% - 24px);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(20,28,58,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(20,28,58,0.12);
}
.article-box .a-body {
  padding: 18px 18px 10px;
}
.article-box .a-body .date {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 6px;
}
.article-box .a-body a.title {
  text-decoration: none;
}
.article-box .a-body a.title h5 {
  margin: 0 0 8px;
  color: #1a1a1a;
  line-height: 1.35;
  font-size: 1.1rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 2);
}
.article-box .a-body a.title:hover h5 {
  color: var(--pb-primary);
}
.article-box .a-body p {
  margin: 0;
  color: #495057;
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-box .a-footer {
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid #eef1f5;
  font-size: 14px;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.article-box .a-footer .badge-cat {
  background-color: rgba(6,147,227,0.1);
  color: var(--pb-primary);
  border-radius: 5px;
  padding: 3px 10px;
  font-weight: 500;
  font-size: 13px;
}
.article-box .a-footer .btn-readmore {
  background: none;
  color: var(--pb-text-muted);
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.article-box .a-footer .btn-readmore:hover {
  color: var(--pb-primary);
}

/*-------------------------
    Pagination
-------------------------*/
.page-link {
  color: var(--pb-primary);
}
.page-item.active .page-link {
  background-color: var(--pb-primary);
  border-color: var(--pb-primary);
}

/*-------------------------
    Search
-------------------------*/
.search-wrap {
  max-width: 500px;
}
.search-wrap .form-control {
  border-radius: 8px;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.search-wrap .form-control::placeholder {
  color: rgba(255,255,255,0.5);
}
.search-wrap .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--pb-primary);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(6,147,227,0.25);
}
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.search-results .list-group-item {
  border-left: none;
  border-right: none;
  padding: 0.75rem 1rem;
}
.search-results .list-group-item a {
  display: block;
}
.search-results .list-group-item:hover {
  background: var(--pb-bg-light);
}
.search-results .list-group-item strong {
  font-size: 0.95rem;
}
.search-results .list-group-item small {
  color: var(--pb-text-muted);
  font-size: 0.8rem;
}

/*-------------------------
    Responsive
-------------------------*/
@media (max-width: 991px) {
  .sidebar {
    padding: 2rem 0 0;
    border-top: 1px solid var(--pb-border);
    margin-top: 1rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .article-header h1 {
    font-size: 1.75rem;
  }
}
@media (max-width: 767px) {
  .hero {
    padding: 3rem 0;
    text-align: center;
  }
  .hero .lead {
    margin: 0 auto;
  }
  .hero-photo {
    margin-bottom: 2rem;
  }
}
