/* ============================================================
   Science & Research Club — Main Stylesheet
   Clean academic theme · Responsive · Minimal colors
   ============================================================ */

/* ---------- CSS Custom Properties (Theme Tokens) ---------- */
:root {
  /* Primary palette – deep navy + teal accent */
  --clr-primary: #1b2a4a;
  --clr-primary-light: #2c4070;
  --clr-accent: #0ea5e9;
  --clr-accent-dark: #0284c7;

  /* Neutrals */
  --clr-bg: #f8fafc;
  --clr-surface: #ffffff;
  --clr-text: #1e293b;
  --clr-text-light: #64748b;
  --clr-border: #e2e8f0;

  /* Feedback */
  --clr-success: #16a34a;
  --clr-error: #dc2626;

  /* Typography */
  --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Georgia", "Times New Roman", serif;

  /* Spacing & sizing */
  --nav-height: 64px;
  --container-max: 1140px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--clr-accent-dark);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--clr-primary);
  line-height: 1.3;
}

/* ---------- Utility Classes ---------- */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
}

.section-subtitle {
  text-align: center;
  color: var(--clr-text-light);
  margin-top: -30px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--clr-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--clr-accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--clr-accent);
  border: 2px solid var(--clr-accent);
}
.btn-outline:hover {
  background: var(--clr-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--clr-primary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--clr-primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--clr-primary);
  height: var(--nav-height);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.nav-logo span {
  color: var(--clr-accent);
}

/* Desktop links */
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile menu open state */
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Responsive nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--clr-primary);
    flex-direction: column;
    padding: 16px 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-links.show {
    max-height: 500px;
  }

  .nav-links a {
    padding: 12px 24px;
    width: 100%;
    border-radius: 0;
  }
}

/* ============================================================
   HERO SECTION (Home page)
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  color: #fff;
  padding: 100px 0 80px;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero .btn {
  margin: 0 8px 12px;
}

/* ============================================================
   HIGHLIGHTS / FEATURES GRID
   ============================================================ */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.highlight-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.highlight-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-accent);
}

.highlight-card .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.highlight-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.highlight-card p {
  color: var(--clr-text-light);
  font-size: 0.95rem;
}

/* ============================================================
   BLOG CARDS
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px;
}

.blog-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--clr-text-light);
  margin-bottom: 8px;
}

.blog-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.blog-card-body h3 a {
  color: var(--clr-primary);
}
.blog-card-body h3 a:hover {
  color: var(--clr-accent);
}

.blog-card-body p {
  color: var(--clr-text-light);
  font-size: 0.93rem;
  margin-bottom: 12px;
}

.blog-card-body .read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================================
   SINGLE POST (post.html)
   ============================================================ */
.post-header {
  text-align: center;
  padding: 60px 0 20px;
}

.post-header h1 {
  font-size: 2.2rem;
  max-width: 740px;
  margin: 0 auto 12px;
}

.post-meta {
  color: var(--clr-text-light);
  font-size: 0.95rem;
}

.post-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 20px 0 60px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

.post-content blockquote {
  border-left: 4px solid var(--clr-accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(14, 165, 233, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--clr-text-light);
  font-style: italic;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-intro img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.about-intro h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.about-intro p {
  color: var(--clr-text-light);
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .about-intro {
    grid-template-columns: 1fr;
  }
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.team-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.team-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--clr-accent);
}

.team-card h4 {
  margin-bottom: 4px;
}

.team-card .role {
  color: var(--clr-accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.team-card p {
  color: var(--clr-text-light);
  font-size: 0.88rem;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

.contact-info h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--clr-text-light);
  margin-bottom: 20px;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.contact-detail .icon {
  font-size: 1.3rem;
  color: var(--clr-accent);
  min-width: 28px;
  text-align: center;
}

.contact-detail div strong {
  display: block;
  margin-bottom: 2px;
}

.contact-detail div span {
  color: var(--clr-text-light);
  font-size: 0.93rem;
}

/* ============================================================
   FORMS (Contact, Login)
   ============================================================ */
.form-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--clr-bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

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

/* Validation states */
.form-group input.error,
.form-group textarea.error {
  border-color: var(--clr-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input.success,
.form-group textarea.success {
  border-color: var(--clr-success);
}

.error-message {
  color: var(--clr-error);
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.error-message.visible {
  display: block;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 200px);
  padding: 40px 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--clr-text-light);
  margin-bottom: 28px;
}

.login-card .form-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.93rem;
  color: var(--clr-text-light);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-header {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  color: #fff;
  padding: 40px 0;
}

.dashboard-header h1 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.dashboard-header p {
  color: rgba(255, 255, 255, 0.8);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: -30px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-accent);
}

.stat-card .stat-label {
  color: var(--clr-text-light);
  font-size: 0.9rem;
  margin-top: 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.dash-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--clr-border);
}

/* Activity list */
.activity-list {
  list-style: none;
}

.activity-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.activity-list li:last-child {
  border-bottom: none;
}

.activity-list .date {
  color: var(--clr-text-light);
  font-size: 0.85rem;
}

/* Quick links */
.quick-links a {
  display: block;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  color: var(--clr-text);
  transition: all var(--transition);
  border: 1px solid var(--clr-border);
}

.quick-links a:hover {
  background: rgba(14, 165, 233, 0.06);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateX(4px);
}

/* ============================================================
   PAGE BANNER (re-usable for inner pages)
   ============================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  color: #fff;
  text-align: center;
  padding: 50px 0;
}

.page-banner h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.footer-col p {
  font-size: 0.93rem;
  line-height: 1.7;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.93rem;
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--clr-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.88rem;
}

/* ============================================================
   ALERT / TOAST (for form feedback)
   ============================================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--clr-success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--clr-error);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .page-banner {
    padding: 36px 0;
  }

  .page-banner h1 {
    font-size: 1.7rem;
  }
}
