/* Modern Academic Website Styles - Restored Original Layouts */

/* CSS Variables */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

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

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

/* Container adjustments for better margins - Consistent across all layouts */
.container {
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Header */
.site-header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--primary-color);
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.brand-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.navbar-nav .nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color);
  background-color: var(--light-color);
}

.navbar-nav .nav-link i {
  margin-right: 0.5rem;
}

.dropdown-menu {
  border: none;
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Main Content */
.main-content {
  padding: 2rem 0;
  min-height: 60vh;
}

/* Page Headers - Fixed margins */
.page-header {
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  margin-bottom: 2rem;
}

.page-title {
  color: white;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Hero Section */
.hero-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  margin-bottom: 0;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-description {
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  text-align: center;
}

.hero-news {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 550px;
  overflow-y: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.btn-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
  background-color: var(--secondary-color);
  color: white;
}

.btn-outline-secondary {
  background-color: transparent;
  color: var(--text-muted);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background-color: var(--text-muted);
  color: white;
}

.btn-outline-info {
  background-color: transparent;
  color: var(--info-color);
  border-color: var(--info-color);
}

.btn-outline-warning {
  background-color: transparent;
  color: var(--warning-color);
  border-color: var(--warning-color);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Research Highlights */
.research-highlights {
  padding: 2rem 0;
  background-color: var(--light-color);
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 0;
}

.research-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  height: 100%;
  transition: var(--transition);
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.card-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Unified Layout Styling - All pages now have consistent margins and layout */
#gridid, #textid {
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

#gridid h1, #textid h1 {
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 2.5rem;
  text-align: center;
}

#gridid h2, #textid h2 {
  color: var(--secondary-color);
  margin: 2rem 0 1rem 0;
  font-size: 1.8rem;
  border-bottom: 2px solid var(--light-color);
  padding-bottom: 0.5rem;
}

#gridid h3, #textid h3 {
  color: var(--secondary-color);
  margin: 2rem 0 1rem 0;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--light-color);
  padding-bottom: 0.5rem;
}

#gridid h4 {
  color: var(--primary-color);
  margin: 1rem 0 0.5rem 0;
  font-size: 1.2rem;
}

#gridid .row {
  margin-bottom: 8rem;
}

#gridid .col-sm-6 {
  margin-bottom: 6rem;
  padding: 0 3rem;
}

#gridid .clearfix {
  background: white;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  /* box-shadow: var(--shadow); */
  box-shadow: none;
  height: 100%;
  transition: var(--transition);
  margin-bottom: -4rem;
}

#gridid .clearfix:hover {
  /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); */
  box-shadow: none;
}

#gridid img {
  border-radius: 8px;
  border: 3px solid var(--light-color);
  box-shadow: var(--shadow);
  margin-right: 1rem; 
}

#gridid i {
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.6;
}

#gridid ul {
  margin: 1rem 0 0 0;
  padding-left: 1.5rem;
}

#gridid li {
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

/* Publications specific styling */
#gridid .well {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 0 0 2rem 0;
  box-shadow: var(--shadow);
}

#gridid pubtit {
  display: block;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

#gridid .text-danger {
  color: var(--accent-color) !important;
}

/* Text layout styling for achievements and news */
#textid ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

#textid li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-color);
  line-height: 1.6;
}

#textid li:last-child {
  border-bottom: none;
}

#textid a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

/* News page specific styling */
#textid h3 {
  margin-top: 2rem;
}

#textid li strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Responsive adjustments for all layouts */
@media (max-width: 768px) {
  #gridid, #textid {
    padding: 1rem 0;
  }
  
  #gridid .col-sm-6 {
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  #gridid .clearfix {
    padding: 1rem;
    margin-bottom: 2rem;
  }
  
  #gridid img {
    width: 25% !important;
  }
  
  /* Fix container padding for mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 576px) {
  #gridid, #textid {
    padding: 0.5rem 0;
  }
  
  #gridid .col-sm-6 {
    margin-bottom: 1.5rem;
    padding: 0;
  }
  
  #gridid .clearfix {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  #gridid h1, #textid h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }
  
  #gridid h2, #textid h2, #textid h3 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem 0;
  }
  
  #gridid h4 {
    font-size: 1rem;
    margin: 0.75rem 0 0.25rem 0;
  }
  
  /* Fix container padding for small mobile */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Fix hero section for mobile */
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  /* Fix news panel for mobile */
  .hero-news {
    max-height: 400px;
  }
  
  /* Fix publication margins for mobile */
  #gridid .well {
    margin: 0 0 1rem 0;
    padding: 1rem;
  }
}

/* Footer */
.site-footer {
  background: var(--dark-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  margin-bottom: 2rem;
}

.footer-section {
  margin-bottom: 2rem;
}

.footer-title {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.contact-info p {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
  margin-right: 0.5rem;
  color: var(--secondary-color);
}

.contact-info a {
  color: rgba(255, 255, 255, 0.8);
}

.contact-info a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright, .powered-by {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.powered-by a {
  color: var(--secondary-color);
}

.powered-by a:hover {
  color: white;
}

/* News Widget */
.news-widget {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.news-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem;
}

.news-title {
  margin: 0;
  color: white;
}

.news-content {
  padding: 1.5rem;
  text-align: left;
}

.news-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

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

.news-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.news-date i {
  margin-right: 0.5rem;
}

.news-headline {
  color: var(--text-color);
  line-height: 1.5;
}

.news-footer {
  padding: 1.5rem;
  background: var(--light-color);
  text-align: center;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-md-end { text-align: right; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.p-4 { padding: 1.5rem; }
.p-3 { padding: 1rem; }
.p-2 { padding: 0.75rem; }
.p-1 { padding: 0.5rem; }

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .news-widget {
    display: none;
  }
  
  .main-content {
    padding: 0;
  }
  
  .page-header {
    background: white;
    color: black;
  }
  
  .page-title {
    color: black;
  }
}
