/* Styling that only affects the landing page */
/* For styles that also affect other pages, see customstyles.css */

/* clear fixes */
/* idea is to not touch the docs part of the website, but start from a clear state */

h1[id],
h2[id],
h3[id],
h4[id],
h5[id],
h6[id],
dt[id] {
  padding-top: 0px;
  margin-top: 0px;
}
.panel {
  margin-bottom: 0px;
}

/* general styles */

@media (max-width: 992px) {
  .panel {
    margin-top: 10px;
  }
  img.col-xs-12 {
    margin-top: 20px;
  }
}
.section {
  padding-top: 70px;
  padding-bottom: 65px; /* +20px margin-bottom of .row */
}
.section-header {
  margin-bottom: 0px;
}
.row {
  margin-bottom: 20px;
}

/* Jumbotron */

.banner {
  margin-bottom: -20px; /* counter-balance .row margin */
  padding: 15px 0;
  color: #040606;
}

/* Stage */

h1.title {
  margin-top: 0px;
  color: rgb(4, 6, 6);
}
h2.subtitle {
  padding-top: 0px;
  margin-top: -5px;
  margin-bottom: 20px;
  font-weight: 400;
}
.action-button {
  margin-right: 4px;
  margin-bottom: 10px;
}
.action-button-container {
  margin-bottom: 20px;
}
#github-button #stargazers {
  font-size: 0.857142em;
  font-weight: 500;
}

/* USPs */

ul.usp {
  padding-inline-start: 1.75em;
  margin-bottom: 15px;
}
li.usp {
  margin-bottom: 0.5em;
}
div.panel.usp {
  margin-bottom: 0;
  flex: 1 1 auto;
}
div.image-holder.usp {
  padding: 20px;
  flex: 0 1 150px;
}
div.image-holder.usp > img {
  height: 150px;
}

/* Adapter section */
/* adapter class also used for news in the landing page */
a.adapter {
  text-decoration: none;
}
a.adapter > div.panel-primary {
  border-color: rgba(10, 118, 187, 0.8);
}
a.adapter:hover > div.panel-primary {
  background-color: rgba(10, 118, 187, 0.08);
}
img.adapter {
  height: 125px;
  width: 125px;
  object-fit: contain;
  transition: all 400ms;
}
img.adapter:hover {
  transform: scale(1.1);
}
img.adapter.custom-logo {
  padding: 0;
}
.btn.adapter {
  margin: 20px 0;
}
.img-equivalent {
  height: 125px;
  width: 125px;
}
.adapter p {
  color: #040606;
  margin-top: 20px;
}

a.adapter {
  color: #040606;
}

/* Testimonials */

i.fa-quote-left {
  color: darkgrey;
  padding-right: 0.5em;
}
i.fa-quote-left,
i.fa-quote-right {
  color: darkgrey;
  padding-left: 0.5em;
}
p.quote,
p.quote > a,
p.quote > a:visited {
  font-size: 19px;
  font-weight: 400;
  color: #333;
}
p.quote > a:hover,
p.quote > a:hover > i.fa-quote-left,
p.quote > a:hover > i.fa-quote-right {
  color: black;
  text-decoration: none;
}
img.testimonial {
  border-radius: 50%;
  border: 1px solid #ddd;
  height: 100px;
  width: 100px;
  float: left;
  margin: 0 15px 0 0;
}
.full-height {
  flex: 1 1 auto;
}

/* Open source section */

.uni-logo {
  max-width: 100px;
}
.img-equivalent-uni-logo {
  height: 125px;
  width: 100px;
}
.github-link,
.github-link:hover {
  color: #333;
  text-decoration: none;
}
.github-link p {
  padding-top: 1em;
}
/* see bookcover.css */
.literature-link {
  margin-top: 20px;
  margin-right: 10px;
}

.next-steps-link {
  margin-top: 20px;
  margin-right: 10px;
}

/* preCICE support */

img.precice-support {
  max-height: 200px;
}

/* Logowall */

.logo,
.logo > div,
.logo > p {
  color: #333;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 200ms;
}
@media (max-width: 992px) {
  .logo,
  .logo > div,
  .logo > p {
    opacity: 1;
    filter: grayscale(0%);
  }
}
.logo > p {
  margin: 0;
  text-decoration: none;
}
.logo:hover,
.logo:hover > div,
.logo:hover > p {
  opacity: 1;
  filter: grayscale(0%);
  text-decoration: none;
}
.logo:hover > div {
  transform: scale(1.05);
}
p.institution {
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.2em;
  margin-top: 0.5em;
}
p.country {
  font-size: 0.8em;
  font-weight: 700;
  /*margin-top: -0.25em;*/
  margin-bottom: 1em;
}
div.logo-holder {
  height: 75px;
}
div.logo-holder > img {
  max-height: 75px;
}
.no-padding {
  padding: 0;
}

/* Latest News Section */

#latest-news {
  background-color: #e6f2ff;
  padding: 70px 0;
}

#latest-news .section-header {
  margin-bottom: 40px;
  text-align: center;
}

#latest-news a.no-external-marker::after {
  content: none !important;
}

.news-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.news-card a.news-link {
  display: block;
  text-decoration: none;
  color: #040606;
}

.news-card a.news-link:hover {
  text-decoration: none;
  color: #040606;
}

.news-card h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #000;
}

.news-card p:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
}

#news-container {
  display: flex;
  gap: 25px;
}

#news-container .col-md-4 {
  flex: 1;
}

@media (max-width: 768px) {
  #news-container {
    flex-wrap: wrap;
  }
  #news-container .col-md-4 {
    flex: 1 1 100%;
  }
}

/* Responsive title line-clamp for news cards */
@media (max-width: 992px) {
  .news-card h4 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@media (max-width: 768px) {
  .news-card h4 {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}
/* =========================
   DARK THEME OVERRIDES
   ========================= */

[data-theme="dark"] {
  background-color: #0f172a;
  color: #e2e8f0;
}


[data-theme="dark"] p {
  color: #d1d5db;
}

/* Banner */
[data-theme="dark"] .banner {
  color: #e2e8f0;
}

[data-theme="dark"] h1.title {
  color: #f9fafb;
}

/* Adapter cards */
[data-theme="dark"] a.adapter,
[data-theme="dark"] .adapter p {
  color: #e2e8f0;
}

[data-theme="dark"] a.adapter > div.panel-primary {
  border-color: rgba(59, 130, 246, 0.6);
}

[data-theme="dark"] a.adapter:hover > div.panel-primary {
  background-color: rgba(59, 130, 246, 0.15);
}

/* Panels / cards */
[data-theme="dark"] .panel,
[data-theme="dark"] .news-card {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

/* News section */
[data-theme="dark"] #latest-news {
  background-color: #020617 !important;
}

[data-theme="dark"] .news-card a.news-link {
  color: #e2e8f0;
}

[data-theme="dark"] .news-card h4 {
  color: #f1f5f9;
}

/* Quotes */
[data-theme="dark"] p.quote,
[data-theme="dark"] p.quote a {
  color: #cbd5f5;
}

[data-theme="dark"] p.quote a:hover {
  color: #ffffff;
}

/* Logos */
[data-theme="dark"] .logo,
[data-theme="dark"] .logo > div,
[data-theme="dark"] .logo > p {
  color: #cbd5f5;
  opacity: 0.7;
}

/* GitHub link */
[data-theme="dark"] .github-link {
  color: #cbd5f5;
}

/* Buttons (optional polish) */
[data-theme="dark"] .btn {
  background-color: #334155;
  color: #e2e8f0;
  border-color: #475569;
}

[data-theme="dark"] .btn:hover {
  background-color: #475569;
}

[data-theme="dark"] .btn.btn-primary {
  background-color: #0a76bb;
  border-color: #0a76bb;
  color: #ffffff;
}

[data-theme="dark"] .btn.btn-primary:hover,
[data-theme="dark"] .btn.btn-primary:focus,
[data-theme="dark"] .btn.btn-primary:active {
  background-color: #248ec2;
  border-color: #347dbe;
  color: #ffffff;
}

[data-theme="dark"] .background-dark a.btn.btn-primary[href="community-projects.html"] {
  background-color: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .background-dark a.btn.btn-primary[href="community-projects.html"]:hover,
[data-theme="dark"] .background-dark a.btn.btn-primary[href="community-projects.html"]:focus,
[data-theme="dark"] .background-dark a.btn.btn-primary[href="community-projects.html"]:active {
  background-color: #475569;
  border-color: #475569;
  color: #e2e8f0;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: inline;
}

[data-theme="dark"] .background-dark .panel p {
  color: #f9fafb;
}

[data-theme="dark"] .background-dark a {
  color: #d1d5db;
}
