html, body { height: 100%; overflow-x: hidden;}

html { padding: 0; }

img, video, svg {
  max-width: 100%;
  height: auto;
}

body{
  margin: 0;
  width: 100%;
  background-color: #FFFFF6;
  color: #222220;
  font-family: lato-bold;

  display: flex;               /* ✅ */
  justify-content: center;     /* ✅ centers .all horizontally */
}

.all{
  width: 100%;
  max-width: 1000px;
}

.align {display: flex; align-items: center; justify-content: center;}

a {
  text-decoration: none;
  color: #222220;
}

.divider {
  border-bottom: 1px solid #222220;
}

/** NAV */

#title-logo {
  height: 7em;
  margin-top: 20px;
  cursor: pointer;
}

#title-logo:hover {
    opacity: 60%;
}

nav {
    border-top: 2px solid #222220;
    background-color: #FFFFF6;
    margin-top: 20px;
    font-family: lato-bold;
    position: relative;
}

.nav-row{
  display: flex;
  align-items: center;
  height: 53.5px;
  flex: 0 0 auto;   /* don’t stretch wider than content */
}

.select-page {
  border-bottom: 2px solid #222220;
  
  display: flex;
  align-items: center;
  position: relative; /* Needed for the overlay */

  overflow-x: auto;
  overflow-y: hidden;

  white-space: nowrap;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none; /* Firefox */
}

.select-page::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.select-page .chip{         /* IMPORTANT: remove 100% */
  flex: 0 0 auto;       /* don’t shrink, don’t stretch */
  height: 100%;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;  /* keep text on one line */
}
.select-page .chip:hover {
    background-color: #ebebdf;
}

.select-page .text {
    text-align: center;
}

.countdown-event {
    background-color: #FAF2E0;
    padding: 0 20px;
    height: 100%;
    width: fit;
}

/** LAYOUT*/

.layout{
  display:grid;
  padding-top: 30px;
  grid-template-columns: .5fr 1.5fr;
  gap: 0px;
  align-items:start;
}

.col{
  display:flex;
  flex-direction:column;
  gap: 30px;
}

.col-reviews {
    margin-left: 30px;
}

/* shared cards */
.card{
  position: relative;
  gap: 12px;
  transition: transform .12s ease, border-color .12s ease;
}

.card-media{
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 5px;
  margin-bottom: 16px;
}

.card-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.card-media:hover img{
  transform: scale(1.1);
}

.card-body{
  flex:1;
  min-width: 0;
}
.card-title{
  margin:11px 0 15px 0;
  font-size: 23px;
  line-height: 1.25;
  font-family: bree;
}
.card-title:hover {
  opacity: 60%;
}

.excerpt {
  font-family: "Noto Serif", serif;
  font-style: italic;
  margin-bottom: 20px;
}

.card-meta{
  display:flex;
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
  align-items:center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}

.tags {
  position: absolute;
  top: 10px;                   /* adjust as needed */
  left: 10px;
  z-index: 100000;
  height: auto;                /* important */
  display: flex;
  flex-wrap: wrap;
  pointer-events: none;        /* optional: don't block clicks */
}

.tag {
  background-color: #222220;
  color: #FFFFF6;
  padding: 5px 5px 5px 5px;
  border-radius: 5px;
  border: 2px solid #FFFFF6;
  font-size: 14px;
  z-index: 9999999;
}

.tag {
  position: static;            /* ← no longer relative */
  top: auto;
  left: auto;
  /* keep your other styles: font, padding, colors, border-radius… */
  white-space: nowrap;
}

.author{
  display:flex;
  align-items:center;
  gap: 20px;
  min-width: 0;
}

.author-avatar{
  width: 45px;
  height: 45px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border);
}

.author-avatar.placeholder{
  background: rgba(255,255,255,.08);
}

.author-name{
  color: #222220;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: bree;
}

/* NEWS list */
.list{
  display:flex;
  flex-direction:column;
  gap: 30px;
}

.col.col-news {
  gap: 0;
}

/* Featured (top) review */
.card-featured{
    border-bottom: 1px solid #222220;
}

.card-featured .card-title{
    font-size: 30px;
    line-height: 1.2;
}

.card-featured .card-meta{
  
  justify-content: flex-end;
}

.card-featured .card-media{
  width: 100%;
  height: 350px;
}

.card-featured .excerpt{
  font-size: 16px;
  margin-top: 10px;
}

/* your grid */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.review-grid > a {
  display: flex !important;
  flex-direction: column;
  height: 100% !important;
  width: 100% !important;      /* extra safety */
  min-width: 0;                /* helps in some flex/grid edge cases */
  position: relative;
}



#newsList .card-meta {
  margin-bottom: 25px;
}

#newsList .card{
  border-bottom: 1px solid #222220;
}

a#more-news-btn {
  margin-top: 15px;
  padding: 10px 0px;
  text-align: center;
  border-radius: 5px;
  border: 2px solid #222220;
}
a#more-news-btn:hover {
  color: #7A7A75;
}

/* link reset */
a.card-link{
  text-decoration:none;
  color:inherit;
  display:block;
}

/* generic page container */
.page{
  padding: 18px 0;
  margin-top: 10px;
}

/* reusable 2-column grid */
.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/** Search Page */

/** SEARCH */
.search-bar-container{
  display:flex;
  justify-content:center;
  padding: 18px 0 26px 0;
}

#searchInput{
  width: min(720px, 100%);
  padding: 16px 18px;
  border: 2px solid #222220;
  border-radius: 8px;
  background: #FFFFF6;
  font-family: lato-regular;
  font-size: 18px;
  outline: none;
  transition: all 0.3s;
}

#searchInput:focus{
  background-color: #2222200f;
}

/* empty/no-results block inside the same 2-column layout */
.search-empty{
  grid-column: 1 / -1;
  border-top: 2px solid #222220;
  padding-top: 22px;
}

.search-empty-title{
  margin: 0 0 8px 0;
  font-family: bree;
  font-size: 26px;
}

.search-empty-sub{
  margin: 0;
  font-family: lato-regular;
  font-size: 16px;
  opacity: .8;
}


/**/

.review-grid .card {
  flex: 1 1 100%;              /* grow + basis = fill completely */
  display: flex;
  flex-direction: column;
  width: 100% !important;
  min-width: 0;
}

.review-grid h3.card-title {         /* ≈ 2–3 lines depending on your font-size/line-height */
  overflow: hidden;
  margin-bottom: 0;
}

.review-grid .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.review-grid .excerpt {
  overflow: hidden;
}

/** FOOTER */

footer {
  position: relative;
  bottom: 2px;
  margin-top: 10px;
  background-color: #FFFFF6;
  width: 100%;
  padding: 40px 0 70px 0;
  text-align: center;
  border-top: 1px solid;
}

footer img {
  width: 50px;
}

footer a:hover {
  opacity: 60%;
}

#privacy-policy-btn:hover {
  opacity: 60%;
}

/*? FADE IN */
/* --- Page fade-in (ALL pages) --- */
main {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}

main.page-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Popup hidden by default */
#popup-login{
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

/* Visible state */
#popup-login.is-visible{
  opacity: 1;
  pointer-events: auto;
}

.login-button {
  transition: all 0.4s;
}

.login-button:hover {
  background-color: #00000010;
  opacity: 100%;
  padding: 5px 8px;
  position: relative;
}

/*?? ARTICLE PAGE*/

.article-mount{
  padding-top: 60px;
}

.article-back{
  display:inline-block;
  margin: 10px 0 20px 0;
  font-family: lato-regular;
  opacity: .8;
}
.article-back:hover{ opacity: .6; }

.article{
  max-width: 850px;
  margin: 0 auto;
}

.article .author p.over {
  font-size: 14px;
}

.article .author p.date {
  font-size: 18px;
}

.article .author span.author-name {
  font-size: 18px;
}

.tag-article {
  margin-left: 130px;
}

.article-hero{
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 8px;
}
.article-hero img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-title{
  padding: 0 130px;
  font-family: bree;
  font-size: 42px;
  line-height: 1.12;
  margin: 20px 0 15px 0;
}

.article-excerpt{
  padding: 0 130px;
  font-family: "Noto Serif", serif;
  font-style: italic;
  font-size: 20px;
  opacity: .9;
  margin: 0 0 57px 0;
}

.article-meta{
  margin: 10px 0 26px 0;
}

.author-avatar.big{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
}

.article-content{
  font-family: "Noto Serif", serif;
  font-size: 18px;
  line-height: 1.8;
  padding: 35px 130px 60px 130px;
}

.article-content p {
  margin: 0;
}

.article-content .image-excerpt{
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  color: #6f6f6a;
  font-family: lato-regular;
}

.ql-editor .image-excerpt{
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  color: #6f6f6a;
  font-family: lato-regular;
}

.ql-imageExcerpt {
  margin-right: 30px;
}

.ql-imageExcerpt::before {
  width: 100px;
  content: "Didascalia";
  font-size: 12px;
}

/* make images inside article responsive */
.article-content img{
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.cover-excerpt{
  padding: 0 130px;
  margin: 8px 0 22px 0;
  font-family: lato-regular;
  font-size: 13px;
  line-height: 1.5;
  color: #6f6f6a;
  text-align: center;
}



/*! Media Quaries */

/* collapse to 1 column on small screens */
@media (max-width: 1100px){

  body {
    width: 100%;
    margin: 0;
  }

  #title-logo {
    height: 4em;
    margin-top: 20px;
    cursor: pointer;
  }

  nav .select-page {
    height: 45px;
  }

  nav::after{
    content: "";
    position: absolute;
    top: 0;
    right: 0;

    width: 32px;
    height: 100%;

    pointer-events: none; /* VERY important */
    
    background: linear-gradient(
      to right,
      rgba(255,255,246,0),
      rgba(255,255,246,1)
    );
  }


  .layout{ grid-template-columns: 1fr;}

  .grid-2{
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .grid-2 > a.card-link{
    display: flex;
    height: 100%;
  }

  .grid-2 > a.card-link > .card{
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
  }

  .review-grid{
    grid-template-columns: 1fr;
    align-items: stretch; /* ✅ force equal height columns */
  }

  .review-grid > a,
  .review-grid .card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .review-grid .card-media {
    height: 250px;        /* ✅ fixed height for all */
    width: 100%;
    overflow: hidden;
  }

  .review-grid .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* ✅ crops, doesn’t stretch */
  }

  .review-grid .excerpt {
    overflow: hidden;
  }

  .review-grid > a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: #222220;
  }

  .card-featured .card-media {
    height: 250px;
  }

  .card-featured .card-title {
    font-size: 23px;
  }

  .col-reviews {
    margin-left: 0px;
    height: fit-content;
    margin: 0;
  }

  .all{
    max-width: 500px;
    width: 100%;
    padding: 0 16px;
  }

  .chip {
    padding: 0 20px;
  }

  footer {
    margin-top: 0;
  }

  .tag-article {
    margin-left: 5%;
  }

  .article-mount{
    padding-top: 35px;
  }

  .article-title{
    padding: 0 5%;
    font-size: 31px;
  }

  .article-excerpt {
    padding: 0 5%;
    font-size: 18px;
    margin: 0 0 35px 0;
  }

  .cover-excerpt {
    padding: 0;
  }

  #newsList article.card {
    margin-bottom: 30px;
  }

  .article-content {
    padding: 0 5% 35px 5%;
    font-size: 16px;
  }

  .article .author p.over {
    font-size: 10px;
  }

  .article .author p.date {
    font-size: 14px;
  }

  .article .author span.author-name {
    font-size: 14px;
  }
}

@media (max-width: 1500px){
  .chip {
    padding: 0 33.2px;
  }
}

@media (max-width: 500px){
  body {
    width: 100%;
    max-width: 1000px;
    padding: 0;
  }
  
  .all {
    width: 93%;
    padding: 0;
  }

  .chip {
    padding: 0 20px;
  }
}

@media (min-width: 1500px){
  .all {
    width: 100%;
    max-width: 1300px;
  }

  .chip {
    padding: 0 58.2001px;
  }

  .card-featured .card-media {
    height: 420px;
  }

  #title-logo {
    height: 7.5em;
    margin-top: 20px;
    cursor: pointer;
  }

  .card-featured .card-title {
    font-size: 33px;
  }

}
