/* =========================================
   iSET Lab - Research Lab Website Styles
   Construction Technology Theme
   ========================================= */

/* ---------- CSS Variables ---------- */
:root {
  /* Construction Technology Colors */
  --primary: #1e3a5f;
  /* Deep steel blue */
  --primary-light: #2d5a87;
  /* Lighter steel blue */
  --primary-dark: #0f1f33;
  /* Dark blueprint blue */
  --accent: #e85d04;
  /* Safety orange */
  --accent-light: #f48c42;
  /* Light orange */
  --accent-hover: #dc2f02;
  /* Darker orange for hover */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  /* Slightly cool white */
  --bg-gray: #e8eef4;
  /* Blueprint paper tint */
  --border-color: #cbd5e1;
  --success: #059669;
  /* Tech green */
  --warning: #d97706;
  /* Construction warning */
  --construction-yellow: #fbbf24;
  --steel-gray: #64748b;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

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

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

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

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

ul,
ol {
  list-style-position: inside;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

/* Prominent headings use logo blue */
h1,
h2 {
  color: #0088cc;
}

h3,
h4,
h5,
h6 {
  color: var(--primary-dark);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* ---------- Layout ---------- */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: white;
  padding: var(--space-xl);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  border-right: 4px solid var(--accent);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* ---------- Sidebar Styles ---------- */
.sidebar-logo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
  color: white;
}

.sidebar-subtitle {
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
}

.sidebar-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-md);
  text-align: center;
}

.sidebar-map {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
}

.sidebar-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.sidebar-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.sidebar-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sidebar-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Navigation ---------- */
.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--bg-light);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(232, 93, 4, 0.1);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Section Styles ---------- */
.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: var(--space-xl);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
}

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

  .about-grid img {
    margin: 0 auto;
    max-width: 100%;
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ---------- Team Member Cards ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.team-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.team-card-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
}

.team-card-content {
  padding: var(--space-lg);
}

.team-card-name {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.team-card-position {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.team-card-interests {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.team-card-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.team-card-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.team-card-links a {
  font-size: 0.8rem;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.team-card-links a:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* Director Card - Featured */
.director-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.director-card .team-card-image {
  height: 320px;
  border-radius: var(--radius-lg);
}

/* ---------- Publication List ---------- */
.publication-category {
  margin-bottom: var(--space-2xl);
}

.publication-category h3 {
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: var(--space-md);
  margin-bottom: var(--space-lg);
}

.publication-list {
  list-style: none;
}

.publication-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}

.publication-link {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Resource Cards ---------- */
.resource-section {
  margin-bottom: var(--space-2xl);
}

.resource-section h3 {
  font-size: 1.3rem;
  color: var(--primary);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-color);
  margin-bottom: var(--space-lg);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.resource-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.resource-card:hover {
  box-shadow: var(--shadow-md);
}

.resource-card-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--bg-light);
  padding: var(--space-md);
}

.resource-card-content {
  padding: var(--space-md);
}

.resource-card-title {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.resource-card-text {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

/* ---------- News Section ---------- */
.news-box {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-height: 1000px;
  overflow-y: auto;
}

.news-list {
  list-style: none;
}

.news-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-weight: 700;
  color: var(--primary);
  margin-right: var(--space-sm);
}

.news-text {
  color: var(--text-secondary);
}

/* ---------- Award Cards ---------- */
.award-section {
  margin-bottom: var(--space-2xl);
}

.award-section h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: var(--space-lg);
}

.award-card {
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.award-card h4 {
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.award-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: var(--space-xs);
}

.award-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

.award-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.award-details {
  flex: 1;
}

.award-logo {
  flex: 0 0 100px;
  width: 240px;
  min-width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.award-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 600px) {
  .award-content {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .award-logo {
    margin-bottom: var(--space-md);
    align-self: center;
  }
}

/* ---------- Event Gallery ---------- */
.event-section {
  margin-bottom: var(--space-2xl);
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.event-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  /* database redundancy */
  display: block;
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.event-gallery img:hover {
  transform: scale(1.05);
}

.event-info {
  margin-top: var(--space-md);
}

.event-info h4 {
  margin-bottom: var(--space-xs);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #b91c1c 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 93, 4, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
}

/* ---------- Course Cards ---------- */
.course-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.course-header {
  background: var(--primary);
  color: white;
  padding: var(--space-lg);
}

.course-header h3 {
  color: white;
  margin-bottom: var(--space-xs);
}

.course-header p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.course-body {
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.course-box h4 {
  color: var(--primary);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
}

.course-image {
  width: 100%;
  max-width: 400px;
  margin: var(--space-lg) auto 0;
  display: block;
  border-radius: var(--radius-md);
}

/* ---------- Join Page ---------- */
.join-section {
  margin-bottom: var(--space-2xl);
}

.join-section h2 {
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

.join-section ul {
  list-style: disc;
  margin-left: var(--space-lg);
  color: var(--text-secondary);
}

.join-section li {
  margin-bottom: var(--space-sm);
}

.highlight-box {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
  border-left: 4px solid var(--accent);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: var(--space-xl);
  text-align: center;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.footer a {
  color: var(--accent-light);
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
  }

  .director-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-container {
    justify-content: space-between;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .container {
    padding: var(--space-md);
  }

  .page-header {
    padding: var(--space-xl) var(--space-md);
  }

  .team-grid,
  .card-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .course-body {
    grid-template-columns: 1fr;
  }
}

/* ---------- Utilities ---------- */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: var(--space-md);
}

.mt-2 {
  margin-top: var(--space-xl);
}

.mt-3 {
  margin-top: var(--space-2xl);
}

.mb-1 {
  margin-bottom: var(--space-md);
}

.mb-2 {
  margin-bottom: var(--space-xl);
}

.mb-3 {
  margin-bottom: var(--space-2xl);
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: var(--space-md);
}

.gap-2 {
  gap: var(--space-xl);
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}
