/* ==========================================================================
   Cerita Rehat Content Hub Stylesheet
   ========================================================================== */

:root {
  --rehat-blue: #0099f1;
  --rehat-blue-dark: #007bc4;
  --rehat-blue-pale: #e2f3fd;
  --rehat-gold: #c5a059;
  --rehat-dark: #0a1f2e;
  --rehat-gray: #f8fafc;
  --rehat-border: #e2e8f0;
  --rehat-text: #334155;
  --rehat-text-soft: #64748b;
  --rehat-glass: rgba(255, 255, 255, 0.75);
}

/* --- HERO SECTION --- */
.cerita-hero {
  position: relative;
  padding: 80px 20px;
  background: radial-gradient(circle at 10% 20%, rgba(226, 243, 253, 0.6) 0%, rgba(255, 255, 255, 0.9) 90%);
  border-bottom: 1px solid var(--rehat-border);
  text-align: center;
  overflow: hidden;
}
.cerita-hero-wrap {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.cerita-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--rehat-dark);
  line-height: 1.15;
  margin-bottom: 20px;
}
.cerita-hero h1 em {
  font-style: italic;
  color: var(--rehat-blue);
}
.cerita-hero p.lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--rehat-text-soft);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* --- SEARCH & FILTERS --- */
.cerita-search-bar {
  display: flex;
  max-width: 550px;
  margin: 0 auto 40px;
  background: #ffffff;
  border: 1px solid var(--rehat-border);
  border-radius: 100px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
}
.cerita-search-bar:focus-within {
  border-color: var(--rehat-blue);
  box-shadow: 0 8px 30px rgba(0, 153, 241, 0.12);
}
.cerita-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 24px;
  font-size: 1rem;
  outline: none;
  color: var(--rehat-dark);
}
.cerita-search-bar button {
  background: var(--rehat-blue);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cerita-search-bar button:hover {
  background: var(--rehat-blue-dark);
}

.cerita-filters-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.cerita-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}
.cerita-cat-btn {
  background: #ffffff;
  border: 1px solid var(--rehat-border);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--rehat-text);
  cursor: pointer;
  transition: all 0.2s ease;
}
.cerita-cat-btn:hover,
.cerita-cat-btn.active {
  background: var(--rehat-blue);
  color: #ffffff;
  border-color: var(--rehat-blue);
  box-shadow: 0 4px 15px rgba(0, 153, 241, 0.2);
}

.cerita-sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rehat-border);
  padding-bottom: 15px;
}
.cerita-sort-bar select {
  border: 1px solid var(--rehat-border);
  border-radius: 6px;
  padding: 8px 16px;
  outline: none;
  background: #ffffff;
  font-size: 0.9rem;
  color: var(--rehat-text);
  cursor: pointer;
}

/* --- FEATURED ARTICLE --- */
.cerita-featured {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}
.cerita-featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #ffffff;
  border: 1px solid var(--rehat-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cerita-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}
.cerita-featured-img {
  position: relative;
  min-height: 380px;
}
.cerita-featured-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cerita-featured-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cerita-tag-label {
  display: inline-block;
  align-self: flex-start;
  background: var(--rehat-blue-pale);
  color: var(--rehat-blue-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.cerita-featured-info h2 {
  font-size: 1.75rem;
  color: var(--rehat-dark);
  line-height: 1.3;
  margin-bottom: 15px;
}
.cerita-featured-info h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.cerita-featured-info h2 a:hover {
  color: var(--rehat-blue);
}
.cerita-featured-info p.excerpt {
  color: var(--rehat-text-soft);
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 0.95rem;
}
.cerita-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--rehat-text-soft);
  border-top: 1px solid var(--rehat-border);
  padding-top: 15px;
}
.cerita-meta .author-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* --- ARTICLES GRID --- */
.cerita-articles-section {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 20px;
}
.cerita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}
.cerita-card {
  background: #ffffff;
  border: 1px solid var(--rehat-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cerita-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}
.cerita-card-img {
  position: relative;
  height: 200px;
}
.cerita-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cerita-card-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cerita-card-info h3 {
  font-size: 1.2rem;
  color: var(--rehat-dark);
  margin-bottom: 12px;
  line-height: 1.4;
}
.cerita-card-info h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.cerita-card-info h3 a:hover {
  color: var(--rehat-blue);
}
.cerita-card-info p.excerpt {
  color: var(--rehat-text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}
.cerita-card-info .read-more {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rehat-blue);
  text-decoration: none;
  margin-bottom: 15px;
  transition: color 0.2s;
}
.cerita-card-info .read-more:hover {
  color: var(--rehat-blue-dark);
}

/* --- AJAX SEARCH ANIMATIONS --- */
.cerita-loader {
  display: none;
  text-align: center;
  padding: 40px;
}
.cerita-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--rehat-blue-pale);
  border-top-color: var(--rehat-blue);
  border-radius: 50%;
  animation: ceritaSpin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes ceritaSpin {
  to { transform: rotate(360deg); }
}

/* --- PAGINATION --- */
.cerita-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.cerita-pagination a,
.cerita-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--rehat-border);
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  color: var(--rehat-text);
  transition: all 0.2s;
}
.cerita-pagination span.current {
  background: var(--rehat-blue);
  color: #ffffff;
  border-color: var(--rehat-blue);
}
.cerita-pagination a:hover {
  border-color: var(--rehat-blue);
  color: var(--rehat-blue);
}

/* --- SINGLE ARTICLE PAGE --- */
.article-single-layout {
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
}
.article-header {
  margin-bottom: 30px;
}
.article-breadcrumbs {
  font-size: 0.85rem;
  color: var(--rehat-text-soft);
  margin-bottom: 20px;
}
.article-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.article-breadcrumbs span.sep {
  margin: 0 8px;
}
.article-single-layout h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--rehat-dark);
  line-height: 1.25;
  margin-bottom: 20px;
}
.article-hero-img {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16/9;
}
.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content styling */
.article-body-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--rehat-text);
}
.article-body-content h2 {
  font-size: 1.75rem;
  color: var(--rehat-dark);
  margin: 45px 0 20px;
  font-weight: 600;
}
.article-body-content h3 {
  font-size: 1.4rem;
  color: var(--rehat-dark);
  margin: 35px 0 15px;
  font-weight: 600;
}
.article-body-content p {
  margin-bottom: 24px;
}
.article-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

/* Sidebar ToC & Hotels */
.article-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}
.sidebar-widget {
  background: var(--rehat-gray);
  border: 1px solid var(--rehat-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
}
.sidebar-widget h4 {
  font-size: 1.1rem;
  color: var(--rehat-dark);
  margin-bottom: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--rehat-border);
  padding-bottom: 10px;
}

.toc-list {
  list-style: none;
}
.toc-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.toc-list li a {
  color: var(--rehat-text);
  text-decoration: none;
  transition: color 0.2s;
}
.toc-list li a:hover {
  color: var(--rehat-blue);
}
.toc-list li.toc-depth-3 {
  padding-left: 15px;
  font-size: 0.9rem;
}

/* Share buttons */
.article-share {
  margin-top: 40px;
  border-top: 1px solid var(--rehat-border);
  padding-top: 25px;
}
.share-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--rehat-dark);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.share-buttons {
  display: flex;
  gap: 12px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rehat-gray);
  border: 1px solid var(--rehat-border);
  color: var(--rehat-text);
  text-decoration: none;
  transition: all 0.2s;
}
.share-btn:hover {
  background: var(--rehat-blue);
  color: #ffffff;
  border-color: var(--rehat-blue);
}

/* Next / Prev buttons */
.article-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 50px 0;
  border-top: 1px solid var(--rehat-border);
  border-bottom: 1px solid var(--rehat-border);
  padding: 25px 0;
}
.nav-link-block {
  text-decoration: none;
  color: inherit;
}
.nav-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rehat-blue);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.nav-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--rehat-dark);
}
.nav-link-block:hover .nav-title {
  color: var(--rehat-blue);
}
.nav-link-block.text-right {
  text-align: right;
}

/* Related Hotels widget */
.related-hotels-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.related-hotel-card {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--rehat-border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-hotel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}
.related-hotel-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.related-hotel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-hotel-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.related-hotel-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--rehat-dark);
  margin-bottom: 4px;
  line-height: 1.25;
}
.related-hotel-location {
  font-size: 0.75rem;
  color: var(--rehat-text-soft);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media(max-width: 900px) {
  .cerita-featured-card {
    grid-template-columns: 1fr;
  }
  .cerita-featured-img {
    min-height: 250px;
  }
  .article-single-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .article-sidebar {
    position: static;
  }
}
