/*
 Theme Name: Flatsome Child
 Template: flatsome
 Description: Child theme for SMEDEC Review
 Version: 1.0
 Text Domain: flatsome-child-smedec-com
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Rubik:wght@400;500;600;700&display=swap');

/* ===== BRAND TOKENS ===== */
:root {
  --brand-primary: #0a3b73;
  --brand-secondary: #FF6B6B;
  --brand-dark: #111b27;
  --brand-text: #3c4043;
  --brand-bg: #fafbfc;
  --brand-radius: 8px;
}

/* ===== GLOBAL TYPOGRAPHY ===== */
body {
  font-family: 'Rubik', 'Roboto', sans-serif;
  color: var(--brand-text);
  background-color: var(--brand-bg);
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: var(--brand-dark);
}

/* ===== HEADER SEARCH BAR AND NAV ===== */
.navbar-brand h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}
.signin_btn {
  background: var(--brand-secondary) !important;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  transition: opacity 0.2s;
}
.signin_btn:hover {
  opacity: 0.9;
}

/* ===== SINGLE POST LAYOUT ===== */
.smedec-single-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.smedec-author-sidebar {
  flex: 1 1 200px;
  max-width: 220px;
}
.smedec-main-content {
  flex: 1 1 700px;
  background: #ffffff;
  padding: 35px;
  border-radius: var(--brand-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  border: 1px solid #ebeef5;
}

/* Author Box Style */
.smedec-author-card {
  background: #ffffff;
  padding: 25px 20px;
  border-radius: var(--brand-radius);
  border: 1px solid #ebeef5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  text-align: center;
  position: sticky;
  top: 90px;
}
.author-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
}
.smedec-author-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ebeef5;
}
.smedec-author-crown {
  position: absolute;
  top: -8px;
  right: -5px;
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.smedec-author-crown img {
  width: 16px;
  height: 16px;
}
.smedec-author-info {
  margin-bottom: 12px;
}
.author-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.author-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 5px 0;
}
.author-rank {
  display: inline-block;
  background: #fdf6ec;
  color: #e6a23c;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.smedec-author-bio-short {
  font-size: 12.5px;
  color: #666;
  line-height: 1.5;
  border-top: 1px solid #f2f6fc;
  padding-top: 12px;
  margin-top: 10px;
}

/* Post Metadata & Ratings Bar */
.smedec-post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: #f8fafc;
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 25px;
  border-left: 4px solid var(--brand-primary);
  font-size: 13.5px;
  color: #666;
}
.smedec-post-meta a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: bold;
}
.smedec-post-stars {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-stars {
  font-size: 11px;
  font-weight: 700;
  color: #888;
}
.stars-gold {
  color: #f1c40f;
  font-size: 14px;
}

/* Floating Table of Contents (Left side FTOC Style) */
.smedec-toc-container {
  border: 1px solid #04c9ba;
  background: #f3fcfb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  max-width: 100%;
}
.smedec-toc-header {
  font-weight: bold;
  font-size: 15px;
  color: #04c9ba;
  border-bottom: 1px solid rgba(4, 201, 186, 0.3);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.smedec-toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-item a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.toc-item a:hover {
  color: #04c9ba;
}
.toc-sub-item {
  padding-left: 15px;
  font-size: 13px;
}

/* ===== ARCHIVES / CATEGORY GRID (4-Column Layout) ===== */
.smedec-archive-desc {
  background: #ffffff;
  padding: 25px;
  border-radius: var(--brand-radius);
  border: 1px solid #ebeef5;
  margin-bottom: 40px;
  color: #555;
  line-height: 1.8;
  text-align: justify;
  font-size: 14.5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.smedec-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}
.smedec-card-item {
  background: #ffffff;
  border-radius: var(--brand-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  border: 1px solid #f0f2f5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.smedec-card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.smedec-card-img-box {
  position: relative;
  overflow: hidden;
  padding-top: 66.67%; /* 3:2 Aspect Ratio */
}
.smedec-card-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.smedec-card-item:hover .smedec-card-img {
  transform: scale(1.08);
}
.smedec-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.smedec-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #888;
  margin-bottom: 10px;
}
.smedec-card-meta i {
  color: var(--brand-primary);
  margin-right: 3px;
}
.smedec-card-title {
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 12px 0;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 42px; /* standard two line height */
}
.smedec-card-title a {
  color: var(--brand-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.smedec-card-title a:hover {
  color: var(--brand-secondary);
}
.smedec-card-rating {
  margin-top: auto;
  border-top: 1px solid #f0f2f5;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.smedec-card-rating .stars {
  color: #f1c40f;
  font-size: 12px;
}
.smedec-card-rating .rating-legend {
  font-size: 12px;
  color: #666;
}

/* Pagination Styles */
.smedec-pagination {
  margin-top: 40px;
  text-align: center;
}
.smedec-pagination .page-numbers {
  display: inline-block;
  width: 38px;
  height: 38px;
  line-height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: #333;
  font-weight: bold;
  text-decoration: none;
  margin: 0 3px;
  transition: all 0.3s;
}
.smedec-pagination .page-numbers.current,
.smedec-pagination .page-numbers:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 991px) {
  .smedec-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .smedec-single-container {
    flex-direction: column;
  }
  .smedec-author-sidebar {
    max-width: 100%;
    width: 100%;
  }
  .smedec-author-card {
    position: static;
  }
  .smedec-main-content {
    padding: 20px;
  }
}
@media (max-width: 480px) {
  .smedec-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   HOMEPAGE SECTIONS
   ============================================================ */

/* --- Section 1: Hero Banner + Search Box --- */
.smedec-hero-home {
  position: relative;
  min-height: 520px;
  background: linear-gradient(135deg, #0a3b73 0%, #0c1a2c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.smedec-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 59, 115, 0.55);
  z-index: 1;
}
.smedec-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px 100px;
  max-width: 850px;
}
.smedec-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.2);
}
.smedec-hero-title {
  color: #ffffff !important;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.smedec-hero-desc {
  color: rgba(255,255,255,0.85);
  font-size: 17px;
  margin: 0;
  font-weight: 400;
}

/* Search Box */
.smedec-search-home {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 820px;
  margin: -45px auto 0;
  padding: 0 20px;
}
.smedec-search-form {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  padding: 8px;
}
.search-field-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.search-field {
  padding: 12px 18px;
}
.search-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.search-keyword {
  flex: 1;
  border-right: 1px solid #eee;
}
.search-city {
  flex: 0 0 220px;
  border-right: 1px solid #eee;
}
.search-field input,
.search-field select {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14.5px;
  font-family: 'Rubik', sans-serif;
  color: #333;
  background: transparent;
  padding: 2px 0;
}
.search-btn {
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.search-btn button {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: none;
  background: var(--brand-primary);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.search-btn button:hover {
  background: #083060;
  transform: scale(1.05);
}

/* --- Section 2: Destination Slider --- */
.smedec-destination-section {
  padding: 70px 0 50px;
  background: #ffffff;
}
.smedec-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.smedec-dest-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.smedec-dest-intro {
  flex: 0 0 260px;
}
.smedec-section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-primary);
  margin: 0 0 14px;
  line-height: 1.3;
}
.smedec-section-title.smedec-center {
  text-align: center;
}
.text-gold {
  color: #e6a23c;
}
.smedec-dest-intro p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}
.smedec-dest-carousel {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.smedec-dest-carousel::-webkit-scrollbar {
  height: 4px;
}
.smedec-dest-carousel::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}
.smedec-city-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.3s;
}
.smedec-city-card:hover {
  transform: translateY(-5px);
}
.smedec-city-card img {
  width: 200px;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.smedec-city-card:hover img {
  transform: scale(1.08);
}
.smedec-city-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: #fff;
}
.smedec-city-caption h3 {
  color: #fff;
  font-size: 15px;
  margin: 0 0 4px;
  font-weight: 700;
}
.smedec-city-caption p {
  font-size: 11.5px;
  margin: 0;
  opacity: 0.85;
}

/* --- Section 3: Category Tags --- */
.smedec-toplist-section {
  padding: 60px 0 70px;
  background: var(--brand-bg);
}
.smedec-cat-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 40px;
}
.smedec-tag {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 25px;
  background: #ffffff;
  border: 1px solid #e0e4ea;
  color: #555;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
}
.smedec-tag:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 59, 115, 0.25);
}

/* --- Section 5: Load More Button --- */
.smedec-loadmore {
  text-align: center;
  margin-top: 40px;
}
.smedec-btn-loadmore {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 30px;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(10, 59, 115, 0.2);
}
.smedec-btn-loadmore:hover {
  background: #083060;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 59, 115, 0.3);
  color: #ffffff;
}
.smedec-btn-loadmore i {
  margin-right: 8px;
}

/* ===== HOMEPAGE RESPONSIVE ===== */
@media (max-width: 991px) {
  .smedec-dest-layout {
    flex-direction: column;
  }
  .smedec-dest-intro {
    flex: none;
    width: 100%;
    text-align: center;
  }
  .search-city {
    flex: 0 0 180px;
  }
}
@media (max-width: 768px) {
  .smedec-hero-title {
    font-size: 26px;
  }
  .smedec-hero-content {
    padding: 60px 15px 80px;
  }
  .search-field-group {
    flex-direction: column;
  }
  .search-keyword,
  .search-city {
    border-right: none;
    border-bottom: 1px solid #eee;
    flex: none;
  }
  .search-btn {
    flex: none;
    padding: 10px;
  }
  .search-btn button {
    width: 100%;
    height: 44px;
    border-radius: 8px;
  }
  .smedec-city-card {
    flex: 0 0 160px;
  }
  .smedec-city-card img {
    width: 160px;
    height: 210px;
  }
}
