/*
Theme Name: Motive English (GeneratePress Child)
Theme URI: https://motiveenglish.com
Description: Custom responsive child theme for GeneratePress built for Motive English. Includes native WordPress Gutenberg block patterns, interactive learning plan builder, and real-life scenario cards. Fully editable in WordPress and 100% mobile and tablet responsive.
Author: Motive English
Author URI: https://motiveenglish.com
Template: generatepress
Version: 1.0.1
Text Domain: motive-english
*/

/* Import Google Fonts for GeneratePress & Motive English */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* Child Theme Custom Enhancements */
body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #334155;
  background-color: #ffffff;
}

/* Universal Homepage Resets for GeneratePress (both default page & custom template) */
body.home #page,
body.home .site-content,
body.home #content,
body.home #primary,
body.home .site-main,
body.home article,
body.home .inside-article,
body.home .entry-content,
body.home.separate-containers .inside-article,
body.home.separate-containers .site-main,
body.home.separate-containers .site-content,
.page-template-template-homepage .site-content,
.page-template-template-homepage #content,
.page-template-template-homepage #primary,
.page-template-template-homepage .site-main,
.page-template-template-homepage .inside-article,
.page-template-template-homepage .entry-content,
.motive-english-wrap .site-content,
.motive-english-wrap .site-main,
.motive-english-wrap .entry-content,
.motive-english-wrap .inside-article,
.separate-containers .page-template-template-homepage .inside-article,
.separate-containers .motive-english-wrap .site-main {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.home.separate-containers .inside-article,
body.home .inside-article {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Header CTA Button - Desktop */
.menu-bar-item .me-header-btn {
  padding: 8px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  gap: 6px !important;
  border-radius: 9999px !important;
  white-space: nowrap !important;
}

/* Header CTA Button - Mobile Hide (keeps header clean & logo sharp) */
@media (max-width: 768px) {
  .menu-bar-item.me-nav-cta-item,
  .me-header-btn {
    display: none !important;
  }

  /* Prevent horizontal overflow on mobile */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Remove excessive gaps from content wrappers on mobile */
  body.home .site-content,
  body.home.separate-containers .site-content,
  body.home #content,
  body.home #primary,
  body.home .site-main,
  body.home article,
  body.home .inside-article,
  body.home.separate-containers .inside-article,
  body.home .entry-content,
  .motive-english-wrap .site-content,
  .motive-english-wrap .inside-article,
  .page-template-template-homepage .site-content,
  .page-template-template-homepage .inside-article {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Preserve Navigation Bar & Header original left and right gap on mobile */
  .site-header,
  .site-header .inside-header,
  .site-header .grid-container,
  .main-navigation,
  .main-navigation .inside-navigation,
  .main-navigation .grid-container,
  #mobile-header,
  .mobile-header-navigation,
  .me-navbar,
  .me-navbar .me-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Content sections have clean 12px mobile gutter */
  .me-section .me-container,
  .me-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Keep me-navbar padding 20px */
  .me-navbar .me-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Make learning plan donut graph bigger on mobile */
  .me-chart-container {
    padding: 10px 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .me-chart-svg {
    max-width: 310px !important;
    width: 100% !important;
    height: auto !important;
  }

  .me-plan-box {
    padding: 22px 14px !important;
  }

  /* Ensure ample top gap above View All buttons on mobile so they never stick to the last card */
  .me-section-bottom-wrap,
  .me-section-header .me-btn-outline,
  .me-section-bottom-wrap .me-btn-outline,
  .me-lessons-section .me-section-header .me-btn,
  .me-situations-section .me-section-header .me-btn,
  .me-section-bottom-wrap .me-btn,
  .me-section-bottom-action .me-btn {
    margin-top: 32px !important;
    margin-bottom: 12px !important;
    display: inline-flex !important;
  }

  .me-lessons-grid,
  .me-situations-grid {
    margin-bottom: 8px !important;
  }
}

/* Centered Section Headers & Bottom Buttons */
.me-lessons-section .me-container,
.me-situations-section .me-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.me-lessons-section .me-section-header,
.me-situations-section .me-section-header {
  display: contents !important;
}

.me-section-title-wrap {
  order: 1 !important;
  text-align: center !important;
  max-width: 680px !important;
  margin: 0 auto 26px !important;
  width: 100% !important;
}

.me-section-title-wrap .me-heading-lg,
.me-section-title-wrap .me-text-sub {
  text-align: center !important;
}

.me-lessons-grid,
.me-situations-grid {
  order: 2 !important;
  width: 100% !important;
}

.me-section-bottom-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-top: 36px !important;
  margin-bottom: 12px !important;
  order: 3 !important;
}

.me-lessons-section .me-section-header .me-btn,
.me-situations-section .me-section-header .me-btn,
.me-section-bottom-wrap .me-btn,
.me-section-bottom-action .me-btn {
  order: 3 !important;
  align-self: center !important;
  margin: 36px auto 12px !important;
  display: inline-flex !important;
}

/* Centered Cards Content */
.me-lesson-card {
  align-items: center !important;
  text-align: center !important;
}

.me-card-icon {
  margin-left: auto !important;
  margin-right: auto !important;
}

.me-card-title,
.me-card-desc {
  text-align: center !important;
}

.me-card-link {
  justify-content: center !important;
  margin: auto auto 0 !important;
}

.me-situation-card,
.me-situation-body {
  align-items: center !important;
  text-align: center !important;
}

.me-situation-header {
  justify-content: center !important;
}

.me-situation-desc {
  text-align: center !important;
  padding-right: 0 !important;
}

.me-situation-arrow {
  position: static !important;
  margin: 6px auto 0 !important;
}

.motive-english-fullwidth {
  width: 100%;
}

/* Hide floating bubbles to let the cartoon conversation illustration shine */
.me-bubble {
  display: none !important;
}
