/*
Theme Name: RoofTentAtlas
Theme URI: https://rooftentatlas.com/
Author: RoofTentAtlas
Author URI: https://rooftentatlas.com/
Description: A clean, minimal custom WordPress theme for RoofTentAtlas.
Version: 0.2.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rooftentatlas
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* Base
--------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: #222;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

a {
  color: #0b5e5e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a,
button,
[role="button"] {
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a84f28;
  outline-offset: 3px;
}

/* Header
--------------------------------------------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid #eee;
  background: rgba(255, 255, 255, 0.98);
}

.site-branding,
.site-nav {
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #222;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem clamp(0.85rem, 3vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 0.15rem;
  color: #222;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.site-nav a:hover {
  color: #315a40;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: #1d3e2b;
  text-decoration: underline;
  text-decoration-color: #b86835;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.4rem;
}

/* Main
--------------------------------------------- */
.site-main {
  min-width: 0;
  padding: clamp(1rem, 4vw, 2rem);
}

.home .site-main,
.post-type-archive-spot .site-main,
.single-spot .site-main,
.page-template-page-map .site-main {
  padding: 0;
}

/* Accessibility
--------------------------------------------- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1rem;
  clip-path: none;
  border-radius: 0.25rem;
  background: #fff;
  color: #222;
  white-space: normal;
}

/* Leaflet touch controls
--------------------------------------------- */
.map-page .leaflet-touch .leaflet-bar a,
.spot-single .leaflet-touch .leaflet-bar a {
  width: 44px;
  height: 44px;
  line-height: 44px;
}

.map-page .leaflet-touch .leaflet-control-zoom a:focus-visible,
.spot-single .leaflet-touch .leaflet-control-zoom a:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid #a84f28;
  outline-offset: 2px;
}

/* Hero
--------------------------------------------- */
.hero {
  padding: 4rem 1rem;
  text-align: center;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: 2.5rem;
}

.hero-subtitle {
  margin: 0;
  color: #555;
  font-size: 1.125rem;
}

/* Explore
--------------------------------------------- */
.explore {
  padding: 2rem 1rem;
  text-align: center;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  background: #0b5e5e;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* Featured spots
--------------------------------------------- */
.featured-spots {
  padding: 3rem 1rem;
  text-align: center;
}

.featured-spots h2 {
  margin: 0 0 1rem;
}

.featured-spots p {
  margin: 0;
  color: #555;
}

/* Footer
--------------------------------------------- */
.site-footer {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 1.5rem;
  border-top: 1px solid #eee;
  background: #1d3e2b;
  color: #d9e4da;
  font-size: 0.875rem;
}

.site-footer__inner {
  display: grid;
  width: min(1180px, 100%);
  margin-inline: auto;
  gap: 2rem;
}

.site-footer__title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.site-footer__title a {
  color: #fff;
  text-decoration: none;
}

.site-footer__description {
  max-width: 420px;
  margin: 0.6rem 0 0;
  color: #becdc0;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: #efd2b2;
  text-decoration: none;
}

.site-footer__copyright {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #aebfaf;
}

@media (min-width: 700px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .site-footer__nav ul {
    justify-content: flex-end;
  }

  .site-footer__copyright {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .site-header {
    align-items: flex-start;
    gap: 0.35rem;
  }

  .site-title {
    font-size: 1.25rem;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .site-nav a {
    justify-content: center;
    padding-inline: 0.35rem;
    border-radius: 0.55rem;
    background: #f3f5f1;
    text-align: center;
  }

  .site-nav a[aria-current="page"] {
    background: #dfe8dc;
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
