/*
 * Theme Name: MATK Kadence Child
 * Theme URI: https://moveabroadtoolkit.com
 * Description: Kadence child theme for MoveAbroadToolkit editorial layout v3
 * Author: MoveAbroadToolkit
 * Template: kadence
 * Version: 3.1
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --terracotta: #C4614A;
  --terracotta-light: #E8876F;
  --dark: #1A1A1A;
  --cream: #F5F0E8;
  --cream-warm: #EDE8DF;
  --off-white: #FAF8F5;
  --gold: #D4A853;
  --sage: #7A9E7E;
  --slate: #446373;
  --light-gray: #F0EDE8;
  --mid-gray: #8A8A8A;
  --white: #FFFFFF;
  --card-shadow: 0 4px 24px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.14);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--dark); }
a { color: var(--terracotta); }
a:hover { color: var(--dark); }

.site-header, .site-header.kadence-sticky-header, #masthead {
  background: var(--white) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: none !important;
}
.site-header .site-branding .site-title a,
.site-header .site-branding .site-title {
  font-family: 'Playfair Display', serif !important;
  font-weight: 900 !important; font-size: 20px !important; color: var(--dark) !important;
}
.main-navigation a, .nav-primary a {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important; font-weight: 500 !important; color: var(--dark) !important;
}
.main-navigation a:hover, .nav-primary a:hover { color: var(--terracotta) !important; }

/* GOLD ANNOUNCEMENT BAR */
.matk-gold-bar {
  background: linear-gradient(90deg, #C8922A 0%, #D4A853 50%, #C8922A 100%);
  color: #1A1A1A;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 11px 20px;
  font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 500;
  line-height: 1.4; flex-wrap: wrap; z-index: 9999; position: relative;
  width: 100%;
}
.matk-gold-bar__icon { font-size: 15px; flex-shrink: 0; }
.matk-gold-bar__text { color: #1A1A1A; }
.matk-gold-bar__text strong { font-weight: 700; }
.matk-gold-bar__cta {
  background: #1A1A1A; color: #D4A853 !important;
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 700;
  padding: 5px 14px; border-radius: 100px; text-decoration: none !important;
  margin-left: 4px; transition: background 0.2s;
}
.matk-gold-bar__cta:hover { background: #FAF7F2; color: #1A1A1A !important; }

/* BLOG HERO */
.matk-blog-hero {
  background: linear-gradient(135deg, #F5F0E8 0%, #EDE8DF 100%);
  text-align: center; padding: 80px 24px 60px; position: relative; overflow: hidden;
}
.hero-eyebrow {
  display: inline-block; font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--terracotta); background: rgba(196,97,74,0.1);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
}
.matk-blog-hero h1 {
  font-family: 'Playfair Display', serif; font-size: clamp(32px, 5vw, 52px);
  font-weight: 900; color: var(--dark); line-height: 1.15; margin-bottom: 16px;
}
.matk-blog-hero h1 em { color: var(--terracotta); font-style: italic; }
.matk-blog-hero p { font-size: 16px; color: #555; max-width: 560px; margin: 0 auto 28px; line-height: 1.7; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--terracotta); color: var(--white) !important;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  padding: 13px 28px; border-radius: 100px; text-decoration: none !important;
  transition: background 0.2s, transform 0.2s; display: inline-block;
}
.btn-primary:hover { background: var(--dark); color: var(--white) !important; transform: translateY(-2px); }
.btn-secondary {
  background: transparent; color: var(--dark) !important; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500; padding: 13px 28px; border-radius: 100px;
  border: 1.5px solid var(--dark); text-decoration: none !important; transition: all 0.2s; display: inline-block;
}
.btn-secondary:hover { background: var(--dark); color: var(--white) !important; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 900; color: var(--terracotta); }
.stat-label { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--mid-gray); margin-top: 4px; }

/* TRUST BAR */
.matk-trust-bar {
  background: var(--dark); padding: 14px 24px;
  display: flex; align-items: center; gap: 20px; overflow: hidden;
}
.trust-label {
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--gold); white-space: nowrap; flex-shrink: 0;
}
.matk-trust-items { display: flex; gap: 24px; overflow: hidden; flex: 1; }
.matk-trust-item {
  font-family: 'DM Sans', sans-serif; font-size: 12px; color: rgba(255,255,255,0.75);
  white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.matk-trust-dot { color: var(--gold); font-size: 8px; }

/* MOVE METHOD SECTION */
.matk-move-method-section {
  background: var(--dark); margin: 70px 0; padding: 72px 24px; position: relative; overflow: hidden;
}
.matk-move-method-section::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 320px; height: 320px; background: var(--terracotta); opacity: 0.08; border-radius: 50%;
}
.matk-move-method-section::after {
  content: ''; position: absolute; bottom: -80px; left: -40px;
  width: 240px; height: 240px; background: var(--gold); opacity: 0.06; border-radius: 50%;
}
.matk-move-method-inner {
  max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto;
  gap: 60px; align-items: center; position: relative; z-index: 1;
}
.matk-move-method-label {
  font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.matk-move-method-label::before { content: ''; display: inline-block; width: 20px; height: 1.5px; background: var(--gold); }
.matk-move-method-section h2 {
  font-family: 'Playfair Display', serif; font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700; color: var(--white); line-height: 1.2; margin-bottom: 16px;
}
.matk-move-method-section h2 em { color: var(--terracotta-light); font-style: italic; }
.matk-move-method-section p { font-size: 15px; color: rgba(255,255,255,0.65); line-height: 1.75; max-width: 520px; margin-bottom: 0; }
.matk-move-method-cta { display: flex; flex-direction: column; gap: 14px; align-items: center; flex-shrink: 0; }
.matk-move-method-cta .btn-primary { white-space: nowrap; padding: 14px 32px; }
.matk-step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.matk-step-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 18px 16px;
}
.matk-step-num { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 900; color: var(--terracotta-light); line-height: 1; margin-bottom: 8px; }
.matk-step-title { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.9); margin-bottom: 4px; }
.matk-step-desc { font-family: 'DM Sans', sans-serif; font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.matk-method-link { font-family: 'DM Sans', sans-serif; font-size: 12px; color: rgba(255,255,255,0.45) !important; text-align: center; text-decoration: none !important; }
.matk-method-link:hover { color: rgba(255,255,255,0.75) !important; }

/* POST GRID */
.home .site-main > .content-wrap,
.blog .site-main > .content-wrap,
.post-archive {
  max-width: 1200px !important; margin: 52px auto 0 !important;
  padding: 0 24px !important; display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; gap: 32px 28px !important; list-style: none !important;
}
.home .site-main > .content-wrap > li:first-child,
.blog .site-main > .content-wrap > li:first-child,
.post-archive > li:first-child { grid-column: 1 / -1; }

.home .site-main > .content-wrap > li:first-child .loop-entry,
.blog .site-main > .content-wrap > li:first-child .loop-entry,
.post-archive > li:first-child .loop-entry {
  display: grid !important; grid-template-columns: 1fr 1fr !important;
  flex-direction: unset !important; border-radius: 16px !important;
  overflow: hidden !important; box-shadow: var(--card-shadow) !important;
  background: var(--white) !important; min-height: 440px !important;
}
.home .site-main > .content-wrap > li:first-child .post-thumbnail,
.blog .site-main > .content-wrap > li:first-child .post-thumbnail,
.post-archive > li:first-child .post-thumbnail {
  height: auto !important; min-height: 440px !important; padding-top: 0 !important;
  border-radius: 0 !important; overflow: hidden !important; align-self: stretch !important; position: relative !important;
}
.home .site-main > .content-wrap > li:first-child .post-thumbnail-inner,
.blog .site-main > .content-wrap > li:first-child .post-thumbnail-inner,
.post-archive > li:first-child .post-thumbnail-inner {
  position: absolute !important; top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important;
}
.home .site-main > .content-wrap > li:first-child .post-thumbnail-inner img,
.blog .site-main > .content-wrap > li:first-child .post-thumbnail-inner img,
.post-archive > li:first-child .post-thumbnail-inner img {
  width: 100% !important; height: 100% !important; object-fit: cover !important;
  position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
}
.home .site-main > .content-wrap > li:first-child .entry-content-wrap,
.blog .site-main > .content-wrap > li:first-child .entry-content-wrap,
.post-archive > li:first-child .entry-content-wrap {
  padding: 48px 44px !important; display: flex !important;
  flex-direction: column !important; justify-content: center !important;
}
.home .site-main > .content-wrap > li:first-child .entry-title,
.blog .site-main > .content-wrap > li:first-child .entry-title,
.post-archive > li:first-child .entry-title {
  font-size: 30px !important; line-height: 1.2 !important; margin-bottom: 16px !important;
}
.home .site-main > .content-wrap > li:first-child .entry-summary,
.blog .site-main > .content-wrap > li:first-child .entry-summary,
.post-archive > li:first-child .entry-summary {
  display: block !important; font-size: 15px !important; color: #666 !important;
  line-height: 1.75 !important; margin-bottom: 20px !important;
}
.home .site-main > .content-wrap > li:nth-child(4),
.blog .site-main > .content-wrap > li:nth-child(4),
.post-archive > li:nth-child(4) { grid-column: span 2; }

.home .site-main > .content-wrap > li:nth-child(4) .loop-entry,
.blog .site-main > .content-wrap > li:nth-child(4) .loop-entry,
.post-archive > li:nth-child(4) .loop-entry {
  display: grid !important; grid-template-columns: 1.6fr 1fr !important;
  flex-direction: unset !important; border-radius: 12px !important;
  overflow: hidden !important; background: var(--white) !important;
  box-shadow: var(--card-shadow) !important; min-height: 280px !important;
}
.home .site-main > .content-wrap > li:nth-child(4) .post-thumbnail,
.blog .site-main > .content-wrap > li:nth-child(4) .post-thumbnail,
.post-archive > li:nth-child(4) .post-thumbnail {
  height: auto !important; min-height: 280px !important; padding-top: 0 !important;
  border-radius: 0 !important; align-self: stretch !important; position: relative !important;
}
.home .site-main > .content-wrap > li:nth-child(4) .post-thumbnail-inner,
.blog .site-main > .content-wrap > li:nth-child(4) .post-thumbnail-inner,
.post-archive > li:nth-child(4) .post-thumbnail-inner {
  position: absolute !important; top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important;
}
.home .site-main > .content-wrap > li:nth-child(4) .post-thumbnail-inner img,
.blog .site-main > .content-wrap > li:nth-child(4) .post-thumbnail-inner img,
.post-archive > li:nth-child(4) .post-thumbnail-inner img {
  width: 100% !important; height: 100% !important; object-fit: cover !important;
  position: absolute !important; top: 0 !important; left: 0 !important;
}
.home .site-main > .content-wrap > li:nth-child(4) .entry-content-wrap,
.blog .site-main > .content-wrap > li:nth-child(4) .entry-content-wrap,
.post-archive > li:nth-child(4) .entry-content-wrap {
  padding: 32px 28px !important; display: flex !important;
  flex-direction: column !important; justify-content: center !important;
}
.home .site-main > .content-wrap > li:nth-child(4) .entry-summary,
.blog .site-main > .content-wrap > li:nth-child(4) .entry-summary,
.post-archive > li:nth-child(4) .entry-summary {
  display: block !important; font-size: 14px; color: #666; line-height: 1.7;
}

.home .site-main > .content-wrap > li .loop-entry,
.blog .site-main > .content-wrap > li .loop-entry,
.post-archive > li .loop-entry {
  background: var(--white); border-radius: 12px; overflow: hidden;
  box-shadow: var(--card-shadow); transition: box-shadow 0.25s, transform 0.25s;
  height: 100%; display: flex; flex-direction: column;
}
.home .site-main > .content-wrap > li .loop-entry:hover,
.blog .site-main > .content-wrap > li .loop-entry:hover,
.post-archive > li .loop-entry:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-4px); }
.home .site-main > .content-wrap > li:not(:first-child):not(:nth-child(4)) .post-thumbnail,
.blog .site-main > .content-wrap > li:not(:first-child):not(:nth-child(4)) .post-thumbnail,
.post-archive > li:not(:first-child):not(:nth-child(4)) .post-thumbnail {
  border-radius: 0 !important; overflow: hidden; height: 220px !important;
}
.home .site-main > .content-wrap > li:not(:first-child):not(:nth-child(4)) .post-thumbnail-inner,
.blog .site-main > .content-wrap > li:not(:first-child):not(:nth-child(4)) .post-thumbnail-inner,
.post-archive > li:not(:first-child):not(:nth-child(4)) .post-thumbnail-inner { height: 100% !important; }
.home .site-main > .content-wrap > li:not(:first-child):not(:nth-child(4)) .post-thumbnail-inner img,
.blog .site-main > .content-wrap > li:not(:first-child):not(:nth-child(4)) .post-thumbnail-inner img,
.post-archive > li:not(:first-child):not(:nth-child(4)) .post-thumbnail-inner img {
  width: 100% !important; height: 100% !important; object-fit: cover !important;
}
.loop-entry:hover .post-thumbnail img { transform: scale(1.04); }
.entry-content-wrap { padding: 20px 22px 24px !important; flex: 1; display: flex; flex-direction: column; }
.cat-links {
  display: inline-block; font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--terracotta) !important; text-decoration: none !important; margin-bottom: 8px;
}
.cat-links:hover { color: var(--dark) !important; }
.entry-title {
  font-family: 'Playfair Display', serif !important; font-size: 18px !important;
  font-weight: 700 !important; line-height: 1.3 !important;
  color: var(--dark) !important; margin-bottom: 10px !important; margin-top: 0 !important;
}
.entry-title a { color: var(--dark) !important; text-decoration: none !important; }
.entry-title a:hover { color: var(--terracotta) !important; }
.entry-summary { display: none; }
.read-more-link {
  display: inline-flex; align-items: center; gap: 6px; font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--terracotta) !important; text-decoration: none !important; margin-top: auto; padding-top: 12px;
}
.read-more-link:hover { color: var(--dark) !important; }
.read-time { font-family: 'DM Sans', sans-serif; font-size: 11px; color: var(--mid-gray); display: inline-block; margin-bottom: 6px; }

/* PAGINATION */
.navigation.pagination { max-width: 1200px; margin: 48px auto 60px; padding: 0 24px; text-align: center; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--dark) !important; text-decoration: none !important; transition: all 0.2s;
}
.page-numbers:hover, .page-numbers.current { background: var(--terracotta); color: var(--white) !important; }

/* SINGLE POST */
.single .site-main { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.single .entry-title { font-size: clamp(28px, 4vw, 44px) !important; line-height: 1.2 !important; margin-bottom: 20px !important; }
.single .entry-content p { font-size: 16px; line-height: 1.8; color: #333; margin-bottom: 24px; }
.single .entry-content h2 { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; margin-top: 48px; margin-bottom: 16px; }
.single .entry-content h3 { font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 700; margin-top: 32px; margin-bottom: 12px; }
.wp-post-image { border-radius: 12px; margin-bottom: 40px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .home .site-main > .content-wrap, .blog .site-main > .content-wrap, .post-archive { grid-template-columns: repeat(2, 1fr) !important; }
  .home .site-main > .content-wrap > li:nth-child(4), .blog .site-main > .content-wrap > li:nth-child(4), .post-archive > li:nth-child(4) { grid-column: 1 / -1; }
  .home .site-main > .content-wrap > li:nth-child(4) .loop-entry, .blog .site-main > .content-wrap > li:nth-child(4) .loop-entry, .post-archive > li:nth-child(4) .loop-entry { grid-template-columns: 1fr !important; }
  .matk-move-method-inner { grid-template-columns: 1fr; gap: 32px; }
  .matk-step-grid { grid-template-columns: 1fr 1fr; }
  .matk-gold-bar { font-size: 12.5px; padding: 10px 16px; gap: 8px; }
}
@media (max-width: 640px) {
  .home .site-main > .content-wrap, .blog .site-main > .content-wrap, .post-archive { grid-template-columns: 1fr !important; }
  .home .site-main > .content-wrap > li:first-child .loop-entry, .blog .site-main > .content-wrap > li:first-child .loop-entry, .post-archive > li:first-child .loop-entry { grid-template-columns: 1fr !important; min-height: auto !important; }
  .home .site-main > .content-wrap > li:first-child .post-thumbnail, .blog .site-main > .content-wrap > li:first-child .post-thumbnail, .post-archive > li:first-child .post-thumbnail { height: 260px !important; min-height: 260px !important; }
  .matk-blog-hero { padding: 52px 20px 40px; }
  .hero-stats { gap: 24px; }
  .matk-step-grid { grid-template-columns: 1fr; }
  .matk-gold-bar { font-size: 12px; padding: 10px 14px; }
  .matk-gold-bar__text { text-align: center; }
}

/* ==============================
   GUTENBERG BLOCK MOBILE FIXES
   ============================== */

/* Featured post: stack image above text on mobile */
@media (max-width: 780px) {
  .matk-blog-sections > .wp-block-group:first-child .wp-block-columns {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .matk-blog-sections > .wp-block-group:first-child .wp-block-column:first-child {
    min-height: 260px !important;
  }
  .matk-blog-sections > .wp-block-group:first-child .wp-block-post-featured-image,
  .matk-blog-sections > .wp-block-group:first-child .wp-block-post-featured-image img {
    min-height: 260px !important;
    height: 260px !important;
  }
  .matk-blog-sections > .wp-block-group:first-child .wp-block-column:last-child {
    padding: 32px 28px !important;
  }
  .matk-blog-sections > .wp-block-group:first-child .wp-block-post-title a {
    font-size: clamp(22px, 5vw, 32px) !important;
  }
}

/* 3-column card grids: 2 columns on tablet */
@media (max-width: 700px) {
  .matk-blog-sections > .wp-block-group:not(:first-child) ul.wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 3-column card grids: single column on small mobile */
@media (max-width: 480px) {
  .matk-blog-sections > .wp-block-group:not(:first-child) ul.wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .matk-blog-sections > .wp-block-group:not(:first-child) {
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-top: 32px !important;
  }
  .matk-blog-sections {
    padding-bottom: 48px;
  }
  .matk-move-method-section {
    margin-top: 40px !important;
  }
}