/* Reset */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Grid */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.grid-3 > * {
  flex: 1 1 calc(33.33% - 20px);
}

/* Header */
.site-header {
  background: #004080;
  color: #fff;
  padding: 15px 0;
}
.site-header .logo a {
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
}
.nav ul li a {
  color: #fff;
  text-decoration: none;
}
.nav ul li a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  margin-right: 10px;
}
.btn-primary { background: #004080; color: #fff; }
.btn-secondary { background: #e0e0e0; color: #004080; }
.btn:hover { opacity: 0.8; }

/* Sections */
section { padding: 50px 0; }
h2 { color: #004080; margin-bottom: 10px; }
h3 { color: #333; margin-bottom: 10px; }

/* Articles */
article img { width: 100%; border-radius: 5px; margin-bottom: 10px; }

/* Footer */
.site-footer {
  background: #f0f0f0;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Subscribe */
.subscribe-form input, .subscribe-form button {
  padding: 10px;
  margin-right: 10px;
  margin-top: 10px;
}
.subscribe-form button {
  background: #004080;
  color: #fff;
  border: none;
  cursor: pointer;
}
.subscribe-form button:hover { opacity: 0.8; }

/* Blinking */
.blinking { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 > * { flex: 1 1 100%; }
  .hero-grid { flex-direction: column; }
}
.site-header {
  /*background-image: url("/static/images/banner.png");*/ /* absolute path to static file */
  background-size: cover;       /* make it cover full header */
  background-position: center;  /* center the image */
  background-repeat: no-repeat;
  color: white;                 /* text color on top of image */
  padding: 60px 0;              /* increase header height */
  text-align: center;           /* center logo and nav */
  position: relative;           /* for any overlay if needed */
}

/* Optional: add semi-transparent overlay for readability */
.site-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4); /* dark overlay */
  z-index: 0;
}

.site-header .container {
  position: relative;
  z-index: 1; /* ensure text is above overlay */
}

/* Hero Section */
.hero {
  padding: 50px 0;
  background: #f9f9f9; /* optional light background for hero */
}

.hero-grid {
  display: flex;
  gap: 40px; /* space between welcome content and news */
  align-items: flex-start; /* align top */
}

.hero-content {
  flex: 2; /* wider column for main text */
}

.hero-news {
  flex: 1; /* narrower column for news */
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.hero-news h3 {
  margin-bottom: 15px;
  color: #004080;
}

.hero-news ul {
  list-style: none;
  padding: 0;
}

.hero-news ul li {
  margin-bottom: 10px;
}

.hero-news a {
  text-decoration: none;
  color: #004080;
}

.hero-news a:hover {
  text-decoration: underline;
}

/* Rotating news */
.rotating-news {
  font-style: italic;
  color: #555;
}
/* Hero buttons */
.hero-content a.contrast,
.hero-content a.secondary {
  display: inline-block;
  padding: 10px 20px;
  margin-right: 10px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s;
}

.hero-content a.contrast {
  background-color: #004080; /* dark blue */
  color: #fff;
}

.hero-content a.secondary {
  background-color: #e0e0e0; /* light gray */
  color: #004080;
}

.hero-content a.contrast:hover,
.hero-content a.secondary:hover {
  opacity: 0.8;
}
.community-service .image-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.community-service img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.community-service .highlight {
  color: red;
}

.community-service .description {
  margin-top: 1rem;
  line-height: 1.6;
}

/* Stack images on small screens */
@media (max-width: 768px) {
  .community-service .image-row {
    grid-template-columns: 1fr;
  }
}
.two-col {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.two-col article {
  flex: 1;
}

.past-events img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.full-width {
  max-width: 800px;
}

/* Mobile view */
@media screen and (max-width: 768px) {
  .two-col {
    flex-direction: column;
  }
}
.two-col {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.two-col article {
  flex: 1;
}

.life-badulla img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

/* Mobile layout */
@media screen and (max-width: 768px) {
  .two-col {
    flex-direction: column;
  }
}
.two-col {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.two-col article {
  flex: 1;
}

.cta-center {
  text-align: center;
}

.cta-center a[role="button"] {
  margin-top: 0.5rem;
}

/* Mobile */
@media screen and (max-width: 768px) {
  .two-col {
    flex-direction: column;
  }
}
/* ===============================
   BLOG SECTION – PROFESSIONAL UI
   =============================== */

.blog-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

/* Header */
.blog-header {
  margin-bottom: 2rem;
}

.blog-header h2 {
  margin-bottom: 0.5rem;
}

.blog-intro {
  color: #555;
  max-width: 800px;
}

/* Card Layout */
.blog-card {
  background: #ffffff;
  border: 1px solid #e3e6ea;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Form */
.blog-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem; /* FIX: spacing between fields */
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #333;
}

/* Inputs */
.blog-form input[type="text"],
.blog-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cfd6dc;
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.blog-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Button */
.form-actions {
  margin-top: 0.5rem;
}

.btn-primary {
  align-self: flex-start;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  border-radius: 4px;
  border: none;
  background-color: #005b96; /* professional blue */
  color: #ffffff;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #00497a;
}

/* Blog Feed */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 500px;       /* scrollable */
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Blog Entry */
.blog-entry {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #e5e7eb;
}

.blog-entry-title {
  margin-bottom: 0.2rem;
}

.blog-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.6rem;
}

.blog-content {
  line-height: 1.6;
  color: #333;
}

/* Empty state */
.no-posts {
  font-style: italic;
  color: #777;
}
/* ===============================
   BLOG FEED – PROFESSIONAL LAYOUT
   =============================== */

.blog-feed {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-height: 520px;      /* scrollable feed */
  overflow-y: auto;
  padding-right: 0.75rem;
}

/* Individual blog post */
.blog-entry {
  background: #fafbfc;
  border: 1px solid #e2e6ea;
  border-left: 4px solid #005b96; /* clinical accent */
  border-radius: 5px;
  padding: 1.25rem 1.4rem;
}

/* Title */
.blog-entry h3,
.blog-entry-title {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  color: #003a63;
}

/* Meta info */
.blog-meta,
.blog-entry small {
  display: block;
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 0.7rem;
}

/* Content */
.blog-content p,
.blog-entry p {
  margin: 0;
  line-height: 1.65;
  color: #1f2937;
  white-space: pre-wrap; /* preserves paragraphs */
}

/* Empty state */
.no-posts {
  padding: 1rem;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 5px;
  font-style: italic;
  color: #6b7280;
}

/* Scrollbar (subtle) */
.blog-feed::-webkit-scrollbar {
  width: 6px;
}

.blog-feed::-webkit-scrollbar-thumb {
  background-color: #cfd6dc;
  border-radius: 3px;
}

.blog-feed::-webkit-scrollbar-thumb:hover {
  background-color: #b4bcc4;
}
/* ===============================
   RESEARCH ARTICLES – ACADEMIC UI
   =============================== */

.research-section {
  margin-top: 3rem;
}

.research-header {
  margin-bottom: 2rem;
}

.research-header h2 {
  margin-bottom: 0.4rem;
}

.research-subtitle {
  color: #555;
  max-width: 800px;
}

.research-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.research-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.research-title {
  font-size: 1.05rem;
  color: #003a63;
  margin-bottom: 0.3rem;
}

.research-meta {
  font-size: 0.85rem;
  color: #6b7280;
}

.research-footer {
  margin-top: 1.8rem;
}
/* ===============================
   MEMBERSHIP SECTION – PROFESSIONAL
   =============================== */

.membership-section {
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}

.membership-header {
  margin-bottom: 2.2rem;
}

.membership-header h2 {
  margin-bottom: 0.4rem;
}

.membership-subtitle {
  color: #555;
  max-width: 850px;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.membership-card {
  background: #fafbfc;
  border: 1px solid #e2e6ea;
  border-radius: 6px;
  padding: 1.6rem;
}

.membership-card h3 {
  margin-bottom: 0.6rem;
  color: #003a63;
}

.membership-card p {
  line-height: 1.6;
  color: #333;
}

/* CTA */
.membership-cta {
  margin-top: 3rem;
  text-align: center;
}

.membership-cta h3 {
  margin-bottom: 0.8rem;
}

.membership-cta .btn-primary {
  padding: 0.6rem 1.6rem;
  background-color: #005b96;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.membership-cta .btn-primary:hover {
  background-color: #00497a;
}




