/* ============================================
   R7 Acro United Ghost Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');

/* --- Custom Properties --- */
:root {
  --color-primary: #263997;
  --color-text: #000000;
  --color-border: #d2d2d2;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-light: #f5f5f5;
  --font-family: 'Roboto Condensed', sans-serif;
  --font-size-body: 17px;
  --font-size-nav: 15px;
  --font-size-small: 14px;
  --font-size-h1: 50px;
  --font-size-h2: 36px;
  --font-size-h3: 24px;
  --max-width: 1200px;
  --header-height: 80px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */
html {
  font-size: var(--font-size-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin-bottom: 1em;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo img {
  height: 60px;
  width: auto;
}

.site-logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

/* --- Navigation --- */
.site-nav {
  display: flex;
  align-items: center;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 0;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 10px 15px;
  font-size: var(--font-size-nav);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-primary);
  text-decoration: none;
}

/* Dropdown */
.site-nav li:hover > .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.dropdown a {
  padding: 10px 20px;
  font-size: var(--font-size-small);
}

.dropdown a:hover {
  background: var(--color-bg-light);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* --- Hero Section --- */
.hero {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: var(--font-size-h1);
  margin-bottom: 0.3em;
  color: var(--color-white);
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* --- CTA Cards Section --- */
.cta-cards {
  padding: 60px 0;
}

.cta-cards .card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.cta-card {
  border: 3px solid var(--color-primary);
  padding: 40px 30px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.cta-card:hover {
  box-shadow: 0 4px 16px rgba(38, 57, 151, 0.15);
}

.cta-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.5em;
}

.cta-card p {
  font-size: var(--font-size-body);
  margin-bottom: 1.5em;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 9999px;
  font-family: var(--font-family);
  font-size: var(--font-size-nav);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #1c2b75;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* --- Care Package Section --- */
.care-package {
  background: var(--color-bg-light);
  padding: 60px 0;
  text-align: center;
}

.care-package h2 {
  color: var(--color-primary);
  margin-bottom: 0.5em;
}

.care-package p {
  max-width: 700px;
  margin: 0 auto 1.5em;
}

/* --- Post Cards --- */
.post-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 60px 0;
}

.post-card {
  border: 3px solid var(--color-primary);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(38, 57, 151, 0.15);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card-content {
  padding: 20px;
}

.post-card-title {
  font-size: var(--font-size-h3);
  margin-bottom: 0.3em;
}

.post-card-title a {
  color: var(--color-text);
}

.post-card-title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.post-card-excerpt {
  font-size: var(--font-size-body);
  color: #555;
  margin-bottom: 1em;
}

.post-card-meta {
  font-size: var(--font-size-small);
  color: #888;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  padding-top: 60px;
}

.section-header h2 {
  color: var(--color-primary);
}

/* --- Koenig Editor Width Classes --- */
.kg-width-wide {
  margin-left: -100px;
  margin-right: -100px;
  max-width: calc(100% + 200px);
}

.kg-width-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

.kg-width-wide img,
.kg-width-full img {
  width: 100%;
}

@media (max-width: 900px) {
  .kg-width-wide {
    margin-left: -20px;
    margin-right: -20px;
    max-width: calc(100% + 40px);
  }
}

/* --- Single Post --- */
.post-full {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.post-full-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-full-title {
  font-size: var(--font-size-h1);
  margin-bottom: 0.3em;
}

.post-full-meta {
  font-size: var(--font-size-small);
  color: #888;
  margin-bottom: 20px;
}

.post-full-image {
  width: 100%;
  margin-bottom: 40px;
  border-radius: 4px;
}

.post-full-content {
  font-size: var(--font-size-body);
  line-height: 1.8;
}

.post-full-content h2 {
  margin-top: 1.5em;
}

.post-full-content h3 {
  margin-top: 1.2em;
}

.post-full-content img {
  margin: 1.5em 0;
  border-radius: 4px;
}

.post-full-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: #555;
}

.post-full-content ul,
.post-full-content ol {
  margin: 1em 0 1em 2em;
}

.post-full-content li {
  margin-bottom: 0.3em;
}

/* Tags on post */
.post-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.post-tags a {
  display: inline-block;
  padding: 4px 12px;
  margin: 4px;
  background: var(--color-bg-light);
  border-radius: 9999px;
  font-size: var(--font-size-small);
  color: var(--color-primary);
}

.post-tags a:hover {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 30px;
  background: var(--color-bg-light);
  border-radius: 4px;
}

.author-box-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-name {
  font-size: var(--font-size-h3);
  margin-bottom: 0.2em;
}

.author-box-bio {
  font-size: var(--font-size-small);
  color: #555;
}

/* --- Page --- */
.page-template .post-full {
  max-width: 900px;
}

/* --- Tag / Author Archive --- */
.archive-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 60px 0;
  text-align: center;
}

.archive-header h1 {
  color: var(--color-white);
  margin-bottom: 0.2em;
}

.archive-header p {
  opacity: 0.9;
}

/* --- Gym Grid --- */
.gym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.gym-card {
  border: 3px solid var(--color-primary);
  padding: 30px;
}

.gym-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.3em;
}

.gym-card p {
  margin-bottom: 0.5em;
  font-size: var(--font-size-body);
}

/* --- Error Page --- */
.error-page {
  text-align: center;
  padding: 120px 20px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.2em;
}

.error-page p {
  font-size: 20px;
  margin-bottom: 1.5em;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: var(--color-white);
  padding: 40px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  font-size: var(--font-size-small);
  opacity: 0.8;
}

.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.footer-nav a {
  color: var(--color-white);
  font-size: var(--font-size-small);
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 1;
  text-decoration: none;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: var(--color-white);
  font-size: 20px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-social a:hover {
  opacity: 1;
  text-decoration: none;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 40px 0 80px;
}

.pagination a {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid var(--color-primary);
  border-radius: 9999px;
  font-weight: 700;
  font-size: var(--font-size-small);
  text-transform: uppercase;
}

.pagination .page-number {
  font-size: var(--font-size-small);
  color: #888;
}

/* --- Responsive --- */
@media (max-width: 1050px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .site-nav.active {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav a {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--color-bg-light);
  }

  .site-nav li:hover > .dropdown {
    display: none;
  }

  .site-nav li.dropdown-open > .dropdown {
    display: block;
  }
}

@media (max-width: 900px) {
  :root {
    --font-size-h1: 36px;
    --font-size-h2: 28px;
    --font-size-h3: 20px;
  }

  .post-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cta-cards .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .hero {
    padding: 50px 0;
  }
}

@media (max-width: 600px) {
  .post-feed {
    grid-template-columns: 1fr;
  }

  .cta-cards .card-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
  }
}
