/* =====================================================
   ESSAOUIRA COOKING — CULINARY JOURNAL CSS v1.5
   ===================================================== */

body.com_content.view-category .t4-masthead,
body.com_content.view-category .ja-masthead,
body.com_content.view-category .page-masthead,
body.com_content.view-category .t4-section.t4-masthead,
body.com_content.view-category .page-header,
body.com_content.view-category .page-title,
body.com_content.view-category .blog-featured,
body.com_content.view-article .t4-masthead,
body.com_content.view-article .ja-masthead,
body.com_content.view-article .page-masthead,
body.com_content.view-article .t4-section.t4-masthead,
body.com_content.view-article .page-header,
body.com_content.view-article .page-title {
  display: none !important;
}

body.com_content.view-category #t4-main-body,
body.com_content.view-category .t4-main-body,
body.com_content.view-article #t4-main-body,
body.com_content.view-article .t4-main-body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.com_content.view-category .t4-section-inner.container,
body.com_content.view-category .t4-row,
body.com_content.view-category .t4-col,
body.com_content.view-article .t4-section-inner.container,
body.com_content.view-article .t4-row,
body.com_content.view-article .t4-col {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.com_content.view-category,
body.com_content.view-article {
  overflow-x: hidden;
}

/* HERO */

.ec-journal-hero,
.ec-article-hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.54)),
    var(--ec-journal-hero-image, var(--ec-article-image)) center center / cover no-repeat;
}

.ec-journal-hero::before,
.ec-article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,250,243,.13), transparent 35%),
    linear-gradient(90deg, rgba(76,12,71,.28), transparent 55%),
    linear-gradient(180deg, rgba(44,33,24,.04), rgba(44,33,24,.55));
  pointer-events: none;
}

.ec-journal-hero__content,
.ec-article-hero__content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  width: 100%;
  padding: 96px 24px;
  text-align: center;
}

.ec-journal-hero__eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  color: rgba(255,255,255,.88);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.ec-journal-hero h1,
.ec-article-hero h1 {
  margin: 0;
  color: #fff !important;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: .95;
  font-weight: 600;
  letter-spacing: -.045em;
  text-shadow: 0 8px 32px rgba(0,0,0,.38);
}

.ec-journal-hero p {
  max-width: 700px;
  margin: 24px auto 0;
  color: rgba(255,255,255,.94);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.ec-journal-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 34px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(255,255,255,.14);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 900;
  backdrop-filter: blur(6px);
  transition: transform .25s ease, background-color .25s ease;
}

.ec-journal-scroll:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.22);
}

/* BODY */

.ec-journal-page {
  max-width: 1180px !important;
  width: min(1180px, calc(100% - 44px)) !important;
  margin: 0 auto !important;
  padding: 76px 0 !important;
  color: #2c2118;
}

/* FEATURED STORY */

.ec-featured-story {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  overflow: hidden;
  border-radius: 34px;
  background: #fffaf3;
  border: 1px solid rgba(76,12,71,.10);
  box-shadow: 0 24px 70px rgba(44,33,24,.10);
}

.ec-featured-story__media {
  display: block;
  min-height: 460px;
  overflow: hidden;
  background: #4c0c47;
}

.ec-featured-story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ec-featured-story__content {
  padding: clamp(32px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ec-story-kicker {
  color: #4c0c47;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.ec-featured-story h2 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.035em;
}

.ec-featured-story h2 a,
.ec-story-card h3 a {
  color: #2c2118 !important;
  text-decoration: none !important;
}

.ec-featured-story h2 a:hover,
.ec-story-card h3 a:hover {
  color: #4c0c47 !important;
}

/* META / TEXT / BUTTONS */

.ec-story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 16px;
  color: rgba(44,33,24,.58);
  font-size: .86rem;
  font-weight: 800;
}

.ec-story-meta span + span::before {
  content: "•";
  margin-right: 14px;
  color: rgba(76,12,71,.35);
}

.ec-story-meta--light {
  justify-content: center;
  color: rgba(255,255,255,.82);
}

.ec-featured-story p,
.ec-story-card p {
  color: rgba(44,33,24,.74);
  line-height: 1.72;
  margin-bottom: 0;
}

.ec-story-btn,
.ec-story-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 18px;
  text-decoration: none !important;
  font-weight: 900;
}

.ec-story-btn {
  align-self: flex-start;
  padding: 0 24px;
  border-radius: 999px;
  background: #4c0c47;
  color: #fff !important;
  transition: transform .22s ease, background-color .22s ease;
}

.ec-story-btn:hover {
  transform: translateY(-2px);
  background: #5b0d55;
}

.ec-story-link {
  color: #4c0c47 !important;
}

.ec-story-link:hover {
  color: #2c2118 !important;
}

/* GRID */

.ec-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 28px;
  margin-top: 42px;
}

.ec-story-card {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(76,12,71,.10);
  box-shadow: 0 18px 46px rgba(44,33,24,.07);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .25s ease;
}

.ec-story-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ec-story-card:hover {
  box-shadow: 0 24px 64px rgba(44,33,24,.12);
}

.ec-story-card__image {
  display: block;
  height: 235px;
  overflow: hidden;
  background: #4c0c47;
}

.ec-story-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}

.ec-story-card:hover .ec-story-card__image img {
  transform: scale(1.06);
}

.ec-story-card__body {
  padding: 24px;
}

.ec-story-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -.02em;
}

/* TOPICS */

.ec-journal-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 56px;
}

.ec-journal-topics span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fffaf3;
  color: #4c0c47;
  border: 1px solid rgba(76,12,71,.10);
  font-size: .86rem;
  font-weight: 900;
}

/* ARTICLE PAGE */

.ec-article-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 76px 22px;
  color: #2c2118;
  font-size: 1.08rem;
  line-height: 1.9;
}

.ec-article-body > p:first-of-type::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  color: #4c0c47;
  font-size: 4.2rem;
  line-height: .82;
  font-weight: 900;
}

.ec-kitchen-note {
  margin-top: 48px;
  padding: 28px;
  border-radius: 28px;
  background: #fffaf3;
  border: 1px solid rgba(76,12,71,.10);
}

.ec-kitchen-note strong {
  display: block;
  margin-bottom: 8px;
  color: #4c0c47;
  font-size: 1rem;
  font-weight: 900;
}

/* PAGINATION */

.ec-journal-pagination {
  margin-top: 48px;
  text-align: center;
}

.ec-journal-pagination .pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: #fffaf3;
  border: 1px solid rgba(76,12,71,.10);
}

.ec-journal-pagination .page-link {
  border-radius: 999px !important;
  color: #4c0c47 !important;
  font-weight: 900;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .ec-featured-story {
    grid-template-columns: 1fr;
  }

  .ec-story-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .ec-journal-hero,
  .ec-article-hero {
    min-height: 500px;
  }

  .ec-journal-hero__content,
  .ec-article-hero__content {
    padding: 76px 20px;
  }

  .ec-journal-hero h1,
  .ec-article-hero h1 {
    font-size: 2.55rem;
    line-height: 1;
  }

  .ec-journal-hero p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .ec-journal-page {
    width: calc(100% - 32px) !important;
    padding: 54px 0 !important;
  }

  .ec-featured-story {
    border-radius: 28px;
  }

  .ec-featured-story__media {
    min-height: 270px;
  }

  .ec-featured-story__content {
    padding: 28px;
  }

  .ec-story-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .ec-story-card__image {
    height: 220px;
  }

  .ec-article-body {
    padding: 54px 18px;
    font-size: 1rem;
  }
}
