/*
 Theme Name:  Twenty Twenty-Five Child
 Template:    twentytwentyfive
 Text Domain: twentytwentyfive-child
 Version:     1.0.0
*/




/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}


html {
  scroll-behavior: smooth;
}


/* === Base Layout === */
#map-container {
  position: relative;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 600px;
}

/* === Sidebar === */
#sidebar {
  width: 240px;
  padding: 0rem 1rem 1rem 0rem; /* top, right, bottom, left*/
  background: #F5F5F4;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* === Sidebar Tab (Initially attached to sidebar) === */
#sidebar-tab {
  position: absolute;
  top: 50%;
  left: calc(240px + 1rem); /* Match sidebar width + right padding */
  transform: translateY(-50%);
  width: 30px;
  height: 60px;
  background-color: #468FAF;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  z-index: 12;
  transition: left 0.3s ease, background-color 0.3s ease;
}

#sidebar-tab:hover {
  background-color: #81C3D7;
}

/* When sidebar is hidden, move tab to left edge */
#map-container.sidebar-hidden #sidebar-tab {
  left: 0;
}

/* Sidebar section headings */
#sidebar h4 {
  font-size: 1.1rem;
  font-weight: 600;
  /*text-transform: uppercase;*/
  color: #1B263B; /* Heading color */
  margin: 0 0 0 0;  /* top, right, bottom, left*/
  padding: 0 0 0.5rem 0;     /* remove left padding */
  border-bottom: 1px solid #DDD;
}

/* Sidebar labels */
#sidebar label {
  display: block;
  margin: 0 0 0 0;       /* remove left margin */
  font-size: 0.9rem;
  color: #111827; /* Body text color */
  font-weight: 500;
}

/* Dropdown styling */
#sidebar select {
  display: block;
  margin-top: 0; /* was 0.2rem*/
  padding: 0rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  width: 100%;
}

/* Style the site list container */
#site-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Adds spacing between entries */
}

.site-entry {
  padding: 0.5rem 0.25rem 0 0;
  border-bottom: 1px solid #ddd;
  font-size: 0.95rem;
  line-height: 1.4;
}

.site-entry a {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
}

.site-entry a:hover {
  color: #468FAF;
  text-decoration: underline;
}





/* === Map === */
#map {
  flex: 1;
  height: 100%;
  min-height: 400px;
  background: #eee;
  z-index: 1;
}

/* === Sidebar Hidden State === */
#map-container.sidebar-hidden #sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

#map-container.sidebar-hidden #sidebar-tab {
  left: 0;
  right: auto;
}

/* === Full-width map when sidebar is hidden === */
#map-container.sidebar-hidden #map {
  width: 100%;
}

/* === Mobile Styles === */
@media (max-width: 768px) {
  #map-container {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    min-width: unset;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 10;
  }

  #map {
    height: 500px;
  }

  #sidebar-tab {
    right: 0;
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  #map-container.sidebar-hidden #sidebar-tab {
    left: 1rem;
    bottom: 1rem;
    top: auto;
    right: auto;
  }
}

.wp-block-post {
  border: none;
  padding: 0;
  margin: 0;
}

/* Container for the latest sites list */
.latest-sites-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
}

/* Individual post cards */
.latest-sites-scroll .site-card {
  flex: 0 0 250px;
  min-width: 250px;
  max-width: 250px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  box-sizing: border-box;
}

/* Featured image inside each card */
.latest-sites-scroll .wp-block-post-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}


.site-card .wp-block-post-featured-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 4px;
}

.site-card .wp-block-post-featured-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.horizontal-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}

.horizontal-scroll > * {
  flex: 0 0 250px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
}
/* Force the post template to display as a responsive grid */
/* Only apply grid to post templates that are NOT inside a horizontal-scroll container */
.wp-block-query:not(.latest-sites-wrapper) .wp-block-post-template:not(.latest-sites-scroll) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}


/* Force horizontal scroll layout */
.wp-block-post-template.latest-sites-scroll {
  display: flex !important;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}

/* Style individual site cards */
.latest-sites-scroll .site-card {
  flex: 0 0 250px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  box-sizing: border-box;
}




.latest-sites-scroll .site-card {
  flex: 0 0 250px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  box-sizing: border-box;
}




/* Style individual site cards */


.site-card {
  border: none;
  border-radius: 8px;
  padding: 1rem;
  box-sizing: border-box;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.site-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.site-card .wp-block-post-title {
  font-size: 1.1rem; /* or try 0.9rem */
  margin-top: 0.5rem;
}

.site-card .wp-block-post-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.25rem;
}


.site-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}


.site-card a {
  text-decoration: none;
  color: #2c3e50;
}

.site-card a:hover {
  text-decoration: underline;
}

.site-grid-container {
  max-width: 1200px;  /* Adjust as needed */
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid layout for Latest Stories */
.wp-block-post-template.latest-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.latest-stories-wrapper .wp-block-post-featured-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

.latest-stories-wrapper .wp-block-post-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.latest-sites-scroll .wp-block-post,
.latest-stories-wrapper .wp-block-post {
  margin-block-start: 0 !important;
}

.wp-block-query-pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Base link style */
.wp-block-navigation-item__label {
  text-decoration: none;
  color: #F8F9FA;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  border-bottom: none;
}

/* Hover effect — no underline */
.wp-block-navigation-item__label:hover {
  color: #81C3D7;
  border-bottom: none;
  text-decoration: none;
}


/* Remove underline from navigation links on hover */
.wp-block-navigation a:not(.wp-element-button):hover {
  text-decoration: none !important;
  border-bottom: none !important;
}

.wp-block-button__link {
  background-color: #468FAF;
  color: #F8F9FA; /* white text */
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
}

.wp-block-button__link:hover {
  background-color: #81C3D7 !important;  /* hover background */
  color: #111827 !important;             /* hover text */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.section-heading {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.5rem;            /* Clear, but not oversized */
  font-weight: 700;             /* Semi-bold: strong but refined */
  letter-spacing: 0.04em;       /* Slightly tighter than normal */
  /* text-transform: uppercase;    Optional: gives structure and impact */
  color: #1B263B;               /* Deep slate for visual contrast */
  margin-bottom: 1rem;       /* Spacing below heading */
}

.acf-content {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
   font-weight: 400;
  color: #111827; /* Dark slate for readability */
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Paragraph spacing */
.acf-content p {
  margin-bottom: 1rem;
}

/* Headings inside ACF fields */
.acf-content h2,
.acf-content h3,
.acf-content h4 {
  font-weight: 600;
  color: #1B263B;
  margin-top: 2rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

/* Lists */
.acf-content ul,
.acf-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.acf-content li {
  margin-bottom: 0.5rem;
}

/* Links */
.acf-content a {
  color: #468FAF;
  text-decoration: underline;
}

.acf-content a:hover {
  color: #81C3D7;
  text-decoration: none;
}

.acf-field p {
  /*margin-bottom: 0.75rem;*/
  font-size: 1rem;
  color: #111827;
  line-height: 1.5;
}

.acf-field strong {
  display: block;
  font-weight: 600;
  color: #1B263B;
  margin-bottom: 0.25rem;
}

/* Container styling for the tag block */
.wp-block-post-terms {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Style for individual tag links */
.wp-block-post-terms a {
  background-color: #1B263B; /* dark slate */
  color: #F8F9FA;            /* light text */
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

/* Hover effect */
.wp-block-post-terms a:hover {
  background-color: #468FAF; /* highlight color */
  color: #ffffff;
}


.featured-image-caption {
    text-align: right;
    font-size: 0.5em;
    color: #666;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    }

.highlight-word {
  position: relative;
  display: inline-block;
  background-color: transparent;
  z-index: 0; /* the text itself */
}

.highlight-word::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1em;   /* how close the bar is */
  width: 100%;
  height: 0.15em;  /* thickness of the underline */
  background-color: #6BA292;
  z-index: -1;     /* sits under the text now */
  border-radius: 2px;
}


