/* =========================================================
   RESEARCH AND DEVELOPMENT PAGE STYLES
   ========================================================= */

:root {
  --primary-color: #0d6efd;
  --primary-dark: #0b5ed7;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --info-color: #0dcaf0;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  overflow-x: hidden;
  background: #f0f2f5;
}

/* Page Header */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,100 1000,0 1000,100"/></svg>');
  background-size: cover;
}
.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.page-header .lead {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
}
.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.breadcrumb-item.active {
  color: white;
  font-weight: 500;
}
.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.6);
}

/* Section Titles */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 2px;
}
.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Introduction Section */
.introduction-section {
  background: white;
}
.content-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
}
.content-card h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
}
.content-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}
.highlight-box {
  background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
  border-left: 4px solid var(--success-color);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-top: 2rem;
}
.highlight-box p {
  margin-bottom: 0;
  font-size: 1.1rem;
}
.highlight-box strong {
  color: var(--success-color);
}

/* ==================== FUNDED COLLABORATIONS SECTION ==================== */
.funded-collaborations-section {
  background: white;
}

.funding-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  height: 100%;
}
.funding-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
.funding-card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  flex-shrink: 0;
}
.funding-card-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--dark-color);
}
.funding-card-content p {
  color: var(--secondary-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.funding-card-content strong {
  color: var(--primary-color);
}

.total-funding-card {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: var(--radius-md);
  padding: 2.5rem;
  color: white;
  margin-top: 2rem;
  text-align: center;
}
.total-funding-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2.5rem;
}
.total-funding-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.total-amount {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.total-funding-card p {
  opacity: 0.9;
  margin-bottom: 0;
  font-size: 1rem;
}

/* Tables */
.projects-section {
  background: #f8f9fa;
}
.card-header {
  border-bottom: none;
}
.card-header h4 {
  font-size: 1.1rem;
}
.table th {
  padding: 1rem;
  font-weight: 600;
}
.table td {
  padding: 0.75rem;
  vertical-align: middle;
}
.table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

/* Objectives Section */
.objectives-section {
  background: white;
}
.objective-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  text-align: center;
}
.objective-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
.objective-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
  color: white;
}
.objective-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}
.objective-card p {
  color: var(--secondary-color);
  line-height: 1.6;
}

/* Research Areas Section */
.research-areas-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.research-area-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}
.research-area-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
.area-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--info-color) 0%, #0ba5c9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: white;
}
.research-area-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}
.area-topics {
  list-style: none;
  padding: 0;
  margin: 0;
}
.area-topics li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  color: var(--secondary-color);
  position: relative;
  padding-left: 1.5rem;
}
.area-topics li:last-child {
  border-bottom: none;
}
.area-topics li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Supervisors & Members Sections */
.supervisors-section .table-primary th {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
}
.members-section .table-success th {
  background: linear-gradient(135deg, var(--success-color) 0%, #157347 100%);
  color: white;
}

/* Publications Section */
.publications-section .table-dark th {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  color: white;
}
.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.pagination .page-link {
  color: var(--primary-color);
  border-color: #dee2e6;
}
.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Patents Section */
.patents-section .table-danger th {
  background: linear-gradient(135deg, var(--danger-color) 0%, #b02a37 100%);
  color: white;
}
.stat-card {
  text-align: center;
  padding: 1rem;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}
.stat-label {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

/* Agencies Section */
.agencies-section {
  background: white;
}
.agency-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.agency-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
.agency-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
  color: white;
}
.agency-card h5 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
}
.btn-primary {
  background: white;
  color: var(--primary-color);
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background: var(--light-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
#backToTop.visible {
  opacity: 1;
  visibility: visible;
}
#backToTop:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
  .page-header {
    padding: 3rem 0 1.5rem;
  }
  .page-header h1 {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .content-card {
    padding: 1.5rem;
  }
  .funding-card {
    flex-direction: column;
    text-align: center;
  }
  .funding-card-icon {
    margin: 0 auto 1rem;
  }
  .total-amount {
    font-size: 2rem;
  }
  .table-responsive {
    font-size: 0.85rem;
  }
  .table th,
  .table td {
    padding: 0.5rem;
  }
  .objective-card,
  .research-area-card,
  .agency-card {
    padding: 1.5rem;
  }
  .objective-icon,
  .area-icon,
  .agency-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
}
@media (max-width: 576px) {
  .page-header h1 {
    font-size: 1.75rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .filter-btn {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
  }
  .btn-group {
    flex-wrap: wrap;
  }
  .btn {
    margin: 0.25rem;
  }
}
@media print {
  .page-header,
  .btn,
  .breadcrumb,
  .cta-section,
  #backToTop {
    display: none !important;
  }
  .funding-card,
  .objective-card,
  .research-area-card {
    box-shadow: none !important;
    border: 1px solid #dee2e6;
  }
}
