/*
Theme Name: Shapely Child
Theme URI: https://wordpress.org/themes/shapely/
Description: A clean child theme for Shapely
Author: Urantia Research
Template: shapely
Version: 1.0.0
*/

/* Additional CSS for Shapely theme */

a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: none;
}

/* Fonts for website */
body {
  font-family: "Raleway", sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Raleway", sans-serif;
}

.some-plugin-selector {
  font-family: "Open Sans", sans-serif;
}

.alt-font {
  font-family: "Kanit", sans-serif;
}

/* Add border and fade to top of header */
header.site-header .main-navigation {
  background: linear-gradient(to bottom, #ffffff 10%, #f7f4ef) !important;
  border-top: 1px solid #999;
}

/* Change the navigation bar width */
.container.nav-bar {
  width: 1260px;
  max-width: 100%;
}

/* Increase menu font size */
nav#site-navigation ul li a {
  font-size: 16px;
  color: #0240a6;
  padding-top: 7px;
}

/* Make search result titles lighter */
.search-results .entry-title a {
    font-weight: 500;
	font-size:24px;
}

/* Lower search icon on desktop only */
@media (min-width: 1031px) {
  .search-widget-handle .search i.fa-search {
    position: relative;
    top: 7px;
  }
}

/* Change the background color and set relative position for scroll-up button */
body {
  background-color: #fafafa;
  position: relative;
}

/* Example for parallax section text (hides all h1 and p in .shapely_home_parallax) */
.shapely_home_parallax h1,
.shapely_home_parallax p {
  display: none;
}

/* Example for page header title (hides page title and description) */
.page-title-section .page-title,
.page-title-section .page-description {
  display: none;
}

/* Add border to page images and set section height */
.page-title-section {
  height: 650px;
  border-bottom: 50px solid #e1e1e1;
}

/* Change the footer width */
.footer .container {
  width: 1240px;
  max-width: 100%;
}

/* Change the footer height and center its content */
.footer {
  height: 260px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #042c4d;
  border-top: 60px solid #e1e1e1;
  padding-left: 15px;
  padding-top: 72px; /* [hosted only?] */
  padding-bottom: 74x; /* [hosted only?] */
}

/* Change the footer font size for desktop */
@media (min-width: 780px) {
  .footer,
  footer,
  #footer {
    font-size: 18px;
    padding-top: 60px; /* [local only?] */
    padding-bottom: 84px; /* [local only?] */
  }
}

/* Font size adjustments ------- */

/* Base styles (default desktop) */
.entry-content,
.page-content,
.post-content,
body .entry-content,
body .page-content,
body .post-content {
  font-size: 17.5px; /* legacy fallback, overridden by clamp() below */
  color: #222;
  line-height: 1.7;
}

/* Fluid paragraph/body text only (smooth scaling from mobile to widescreen) */
.entry-content p,
.entry-content li,
.entry-content span,
.page-content p,
.page-content li,
.page-content span,
.post-content p,
.post-content li,
.post-content span,
body .entry-content p,
body .entry-content li,
body .entry-content span,
body .page-content p,
body .page-content li,
body .page-content span,
body .post-content p,
body .post-content li,
body .post-content span {
  font-size: clamp(14.5px, 0.45vw + 14.5px, 17.5px);
  line-height: 1.7;
  color: #222;
}

/* Page titles */
.entry-title,
.page-title-section .page-title {
  color: #222;
  font-size: 30px;
  font-weight: 400;
}

/* Headings inside content areas (desktop default) */
.entry-content h1,
.page-content h1,
.post-content h1,
body .entry-content h1,
body .page-content h1,
body .post-content h1 {
  font-size: 32px;
  line-height: 1.3;
}
.entry-content h2,
.page-content h2,
.post-content h2,
body .entry-content h2,
body .page-content h2,
body .post-content h2 {
  font-size: 28px;
}
.entry-content h3,
.page-content h3,
.post-content h3,
body .entry-content h3,
body .page-content h3,
body .post-content h3 {
  font-size: 26px;
}
.entry-content h4,
.page-content h4,
.post-content h4,
body .entry-content h4,
body .page-content h4,
body .post-content h4 {
  font-size: 22px;
}
.entry-content h5,
.page-content h5,
.post-content h5,
body .entry-content h5,
body .page-content h5,
body .post-content h5 {
  font-size: 19px;
}
.entry-content h6,
.page-content h6,
.post-content h6,
body .entry-content h6,
body .page-content h6,
body .post-content h6 {
  font-size: 17.5px;
}

/* MOBILE: under 600px */
@media (max-width: 599px) {
  .entry-title,
  .page-title-section .page-title {
    font-size: 24px;
  }
  .entry-content h1,
  .page-content h1,
  .post-content h1 {
    font-size: 26px;
  }
  .entry-content h2,
  .page-content h2,
  .post-content h2 {
    font-size: 24px;
  }
  .entry-content h3,
  .page-content h3,
  .post-content h3 {
    font-size: 21px;
  }
  .entry-content h4,
  .page-content h4,
  .post-content h4 {
    font-size: 18px;
  }
  .entry-content h5,
  .page-content h5,
  .post-content h5 {
    font-size: 17.5px;
  }
  .entry-content h6,
  .page-content h6,
  .post-content h6 {
    font-size: 17px;
  }
}

/* TABLET: 600px to 1023px */
@media (min-width: 600px) and (max-width: 1023px) {
  .entry-title,
  .page-title-section .page-title {
    font-size: 28px;
  }
  .entry-content h1,
  .page-content h1,
  .post-content h1 {
    font-size: 30px;
  }
  .entry-content h2,
  .page-content h2,
  .post-content h2 {
    font-size: 28px;
  }
  .entry-content h3,
  .page-content h3,
  .post-content h3 {
    font-size: 24px;
  }
  .entry-content h4,
  .page-content h4,
  .post-content h4 {
    font-size: 20px;
  }
  .entry-content h5,
  .page-content h5,
  .post-content h5 {
    font-size: 18px;
  }
  .entry-content h6,
  .page-content h6,
  .post-content h6 {
    font-size: 17.5px;
  }
}

/* LARGE DESKTOP: 1280px+ */
@media (min-width: 1280px) {
  .entry-title,
  .page-title-section .page-title {
    font-size: 34px;
  }
  .entry-content h1,
  .page-content h1,
  .post-content h1 {
    font-size: 36px;
  }
  .entry-content h2,
  .page-content h2,
  .post-content h2 {
    font-size: 34px;
  }
  .entry-content h3,
  .page-content h3,
  .post-content h3 {
    font-size: 32px;
  }
  .entry-content h4,
  .page-content h4,
  .post-content h4 {
    font-size: 28px;
  }
  .entry-content h5,
  .page-content h5,
  .post-content h5 {
    font-size: 24px;
  }
  .entry-content h6,
  .page-content h6,
  .post-content h6 {
    font-size: 20px;
  }
}

/* ----------------------------- */
/* ----------------------------- */

/* Set width for content area */
@media (min-width: 1200px) {
  .entry-content,
  .page-content,
  body .entry-content,
  body .page-content {
    max-width: 770px;
    text-align: justify;
    margin-left: 30px;
    margin-right: auto;
    padding-right: 30px;
    width: 100%;
    box-sizing: border-box;
  }
}
@media (max-width: 1199px) {
  .entry-content,
  .page-content,
  body .entry-content,
  body .page-content {
    max-width: 95%;
    text-align: justify;
    margin-left: auto;
    margin-right: auto;
    padding-right: 10px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Display footer section at the bottom */
/* 1. Make #page the flex column container */
#page.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* 2. Let #content grow to fill remaining space */
#content.main-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
/* 3. Let .content-area expand inside #content */
.content-area {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
/* 4. Footer always at the bottom, not fixed */
footer#colophon.footer {
  flex-shrink: 0;
  width: 100%;
  position: static;
}

/* Adjust scroll up to bottom of page */
#scroll-up {
  position: fixed;
  right: 32px;
  bottom: 36px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #333;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 22px;
  cursor: pointer;
  opacity: 0.8;
  border: 1px solid #ccc;
  transition: opacity 0.2s, background 0.2s;
  margin: 0;
  pointer-events: auto;
}
#scroll-up:hover {
  opacity: 1;
  background: #f5f1e9;
}

/* Header height fix - FIXED HEIGHT for all screen sizes */
.site-header,
#masthead,
.site-branding,
.nav-container {
  min-height: 77px !important;
  height: 77px !important;
}

.site-branding img,
.custom-logo {
  max-height: 62px;
}

/* Navigation container height */
.main-navigation,
nav#site-navigation {
  min-height: 77px !important;
  height: 77px !important;
}

/* Desktop menu - 1001px and up */
@media (min-width: 1031px) {
  .mobile-toggle,
  .widget-handle.mobile-toggle {
    display: none !important;
  }

  .navbar-collapse.navbar-ex1-collapse {
    display: block !important;
    height: auto !important;
    overflow: visible;
  }

  .module.left #menu {
    display: block !important;
  }
}

/* Mobile menu - 1000px and below */
@media (max-width: 1030px) {
  /* Ensure header stays 77px */
  .site-header,
  #masthead,
  .nav-container,
  .main-navigation,
  nav#site-navigation {
    min-height: 77px !important;
    height: 77px !important;
  }

  /* Fix logo positioning - ensure it stays centered vertically */
  .module.left.site-title-container,
  .site-branding {
    display: flex !important;
    align-items: center !important;
    height: 77px !important;
    min-height: 77px !important;
    margin-top: -10px !important; /* Move logo up */
  }

  /* Ensure flex container maintains proper height */
  .flex-row {
    height: 77px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* Show mobile toggle button */
  .mobile-toggle,
  .widget-handle.mobile-toggle {
    display: block !important;
    position: absolute !important;
    top: 2px !important;
    right: 15px !important;
    z-index: 10001 !important;
    padding: 4px 6px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
  }

  /* Hide search button */
  .search-widget-handle:not(.navbar-collapse *),
  .module.widget-handle.search-widget-handle:not(.navbar-collapse *) {
    display: none !important;
  }

  /* Hide desktop menu by default - MOVE DROPDOWN TO TOUCH HEADER */
  .module.left .navbar-collapse,
  .navbar-collapse.navbar-ex1-collapse {
    display: none !important;
    position: absolute !important;
    top: 66px !important; /* Changed back to exactly match header height */
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    border-top: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    z-index: 10000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Show menu when active */
  .module.left .navbar-collapse.mobile-active,
  .navbar-collapse.navbar-ex1-collapse.mobile-active {
    display: block !important;
  }

  /* Menu styling when open */
  .navbar-collapse.mobile-active #menu,
  .navbar-collapse.mobile-active ul#menu {
    display: block !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .navbar-collapse.mobile-active #menu li,
  .navbar-collapse.mobile-active ul#menu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* RIGHT-JUSTIFIED MENU TEXT */
  .navbar-collapse.mobile-active #menu li a,
  .navbar-collapse.mobile-active ul#menu li a {
    display: block !important;
    padding: 10px 20px !important;
    color: #0240a6 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    text-align: right !important; /* Right-justify the text */
  }

  /* Remove border from first item since dropdown now touches header */
  .navbar-collapse.mobile-active #menu li:first-child a {
    border-top: none !important; /* No top border needed since it touches header */
  }

  .navbar-collapse.mobile-active #menu li a:hover {
    background-color: #f5f5f5 !important;
  }

  /* Remove border from last item */
  .navbar-collapse.mobile-active #menu li:last-child a {
    border-bottom: none !important;
  }

  /* Ensure navigation container is positioned relatively */
  .nav-container {
    position: relative !important;
  }
}

/* Specific adjustments for 991px-1000px range */
@media (min-width: 991px) and (max-width: 1030px) {
  /* Mobile button positioning for this range */
  .mobile-toggle,
  .widget-handle.mobile-toggle {
    top: 0px !important;
  }

  /* Logo positioning */
  .module.left.site-title-container,
  .site-branding {
    margin-top: -22px !important;
  }
}

/* Specific adjustments for smaller screens (990px and below) */
@media (max-width: 990px) {
  /* Mobile button positioning */
  .mobile-toggle,
  .widget-handle.mobile-toggle {
    top: -2px !important;
    right: 20px !important;
  }

  /* Fix logo positioning for smaller screens */
  .module.left.site-title-container,
  .site-branding {
    margin-top: -15px !important;
  }
}

/* Mobile toggle button styling - REMOVE GRAY SELECTION AREA */
.mobile-toggle i.fa-bars {
  color: #888 !important;
  font-size: 24px !important;
}

.mobile-toggle:hover {
  background-color: rgba(0, 0, 0, 0) !important;
}

.mobile-toggle:focus {
  outline: none !important;
  background-color: transparent !important;
}

.mobile-toggle:active {
  background-color: transparent !important;
}

/* Remove any default button styling that might cause gray area */
.mobile-toggle,
.widget-handle.mobile-toggle {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Mobile search styling - not working */
@media (max-width: 1030px) {
  .navbar-collapse.mobile-active .mobile-search-item {
    display: block !important;
    list-style: none;
  }

  .navbar-collapse.mobile-active .mobile-search .search {
    display: block !important;
    width: 100% !important;
    padding: 10px 20px !important;
    color: #0240a6 !important;
    text-align: right !important;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid #eee !important;
    cursor: pointer !important;
    font-size: 14px !important;
  }

  .navbar-collapse.mobile-active .mobile-search .search:hover {
    background-color: #f5f5f5 !important;
  }

  .navbar-collapse.mobile-active .mobile-search .search i.fa-search {
    display: inline !important;
    color: #0240a6 !important;
  }

  .navbar-collapse.mobile-active .mobile-search .search .title {
    display: none !important;
  }
}

@media (min-width: 1031px) {
  .mobile-search-item {
    display: none !important;
  }
}

/* Return button design - custom for Shapely child theme */
.back-to-top {
  position: relative !important;
  margin: 120px 20px 0 auto !important;

  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  box-sizing: border-box !important;
  flex: 0 0 36px !important;
  background: transparent !important;
  border: 2px solid #8a919c !important;
  color: #4b5563 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  border-radius: 0 !important;
  padding: 0 !important;
  opacity: 0.8 !important;
  transition: all 0.2s ease-in-out !important;
}

.back-to-top:hover,
.back-to-top:focus {
  opacity: 0.8 !important;
  color: white !important;
  background-color: #5234f9 !important;
}
