/* =========================================================
   Adventure Gear Lab — WordPress Theme Styles
   ========================================================= */

/* Design tokens */
:root {
  --radius: 0.625rem;

  --font-heading: "Bebas Neue", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --ocean-50: #f4f8f9;
  --ocean-100: #d8e7eb;
  --ocean-200: #b3d0d8;
  --ocean-300: #8ab4c0;
  --ocean-400: #5f96a6;
  --ocean-500: #437a8a;
  --ocean-600: #35616e;
  --ocean-700: #2a4d57;
  --ocean-800: #1f3a42;
  --ocean-900: #14262b;
  --ocean-950: #0d181c;

  --background: #f8fafb;
  --foreground: #0d181c;
  --card: #ffffff;
  --card-foreground: #0d181c;
  --popover: #ffffff;
  --popover-foreground: #0d181c;
  --primary: #2a4d57;
  --primary-foreground: #ffffff;
  --secondary: #d8e7eb;
  --secondary-foreground: #14262b;
  --muted: #d8e7eb;
  --muted-foreground: #2a4d57;
  --accent: #8ab4c0;
  --accent-foreground: #0d181c;
  --destructive: #c9372d;
  --destructive-foreground: #ffffff;
  --border: #b3d0d8;
  --input: #b3d0d8;
  --ring: #437a8a;
}

/* Reset-ish base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 400;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem;
  color: var(--muted-foreground);
}

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

a:hover {
  text-decoration: underline;
}

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

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* WordPress alignment */
.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* Container */
.agl-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .agl-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .agl-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Buttons */
.agl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.agl-btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.agl-btn-primary:hover {
  background-color: var(--ocean-800);
  text-decoration: none;
}

.agl-btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.agl-btn-accent:hover {
  background-color: var(--ocean-400);
  text-decoration: none;
}

.agl-btn-outline {
  background-color: transparent;
  border-color: currentColor;
  color: inherit;
}

.agl-btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.agl-btn-ghost {
  background-color: transparent;
  color: var(--muted-foreground);
}

.agl-btn-ghost:hover {
  background-color: var(--secondary);
  color: var(--foreground);
  text-decoration: none;
}

.agl-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.agl-btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: rgba(248, 250, 251, 0.95);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.site-logo svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
}

.primary-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .primary-nav {
    display: flex;
  }
}

.primary-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.current-menu-item,
.primary-nav a.current_page_item {
  color: var(--foreground);
  background-color: var(--secondary);
  text-decoration: none;
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: block;
  }
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--background);
  padding: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-menu__nav {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu__nav a {
  padding: 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
}

.mobile-menu__nav a:hover,
.mobile-menu__nav a.current-menu-item {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.mobile-menu__footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

.mobile-menu__footer .agl-btn {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--ocean-950);
  color: var(--primary-foreground);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--ocean-950) 0%, rgba(13, 24, 28, 0.8) 50%, transparent 100%);
}

.hero__content {
  position: relative;
  padding-top: 5rem;
  padding-bottom: 5rem;
  max-width: 640px;
}

@media (min-width: 640px) {
  .hero__content {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

@media (min-width: 1024px) {
  .hero__content {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

.hero__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}

.hero__title {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  color: var(--primary-foreground);
}

.hero__excerpt {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--ocean-100);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Section spacing */
.agl-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 1024px) {
  .agl-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.agl-section--secondary {
  background-color: rgba(216, 231, 235, 0.3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agl-section--dark {
  background-color: var(--ocean-950);
  color: var(--primary-foreground);
  border-top: 1px solid var(--ocean-800);
  border-bottom: 1px solid var(--ocean-800);
}

.agl-section__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .agl-section__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.agl-section__title {
  margin: 0;
}

.agl-section__description {
  max-width: 42rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.agl-section--dark .agl-section__description {
  color: var(--ocean-100);
}

/* Article cards */
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  box-shadow: 0 10px 25px -5px rgba(13, 24, 28, 0.1);
  transform: translateY(-2px);
}

.article-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card__media img {
  transform: scale(1.05);
}

.article-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
}

.article-card__category {
  display: inline-flex;
  width: fit-content;
  padding: 0.125rem 0.5rem;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: calc(var(--radius) - 2px);
}

.article-card__title {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.article-card__title a {
  color: var(--card-foreground);
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--primary);
}

.article-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.article-card__meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.article-card__meta svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Grids */
.article-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .article-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-grid--2 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .article-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Featured card (editors choice) */
.article-card--featured {
  flex-direction: column;
}

@media (min-width: 768px) {
  .article-card--featured {
    flex-direction: row;
    align-items: stretch;
  }

  .article-card--featured .article-card__media {
    width: 50%;
    aspect-ratio: auto;
  }

  .article-card--featured .article-card__body {
    padding: 2rem;
  }

  .article-card--featured .article-card__title {
    font-size: 1.75rem;
  }
}

/* How-To dark section */
.howto-section {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .howto-section {
    grid-template-columns: 1fr 1fr;
  }
}

.howto-section__text {
  color: var(--ocean-100);
}

.howto-section__text h2 {
  color: var(--primary-foreground);
}

/* Page header */
.page-header {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.page-header__title {
  margin: 0;
}

.page-header__description {
  font-size: 1.125rem;
  margin-top: 1rem;
  max-width: 42rem;
}

/* Single article */
.single-article__hero {
  position: relative;
  height: 40vh;
  min-height: 320px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .single-article__hero {
    height: 50vh;
  }
}

.single-article__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-article__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ocean-950) 0%, rgba(13, 24, 28, 0.6) 60%, transparent 100%);
}

.single-article__hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 2.5rem;
}

.single-article__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}

.single-article__title {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  color: var(--primary-foreground);
}

.single-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--ocean-100);
}

.single-article__meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.single-article__meta svg {
  width: 1rem;
  height: 1rem;
}

.single-article__body {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.single-article__layout {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .single-article__layout {
    grid-template-columns: 1fr 320px;
  }
}

.single-article__content {
  font-size: 1.125rem;
  line-height: 1.75;
}

.single-article__content h2,
.single-article__content h3,
.single-article__content h4 {
  color: var(--foreground);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.single-article__content p {
  margin-bottom: 1.25rem;
}

.single-article__content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-article__content a:hover {
  color: var(--ocean-800);
}

.single-article__content ul,
.single-article__content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.single-article__content li {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
}

.single-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.single-article__content th,
.single-article__content td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.single-article__content th {
  background-color: var(--secondary);
  color: var(--foreground);
  font-weight: 600;
}

.single-article__content td {
  color: var(--muted-foreground);
  vertical-align: top;
}

.single-article__content tr:hover td {
  background-color: rgba(216, 231, 235, 0.3);
}

/* Affiliate disclosure box */
.affiliate-disclosure {
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: rgba(216, 231, 235, 0.5);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.affiliate-disclosure strong {
  color: var(--foreground);
}

/* Amazon CTA button */
.amazon-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: #ff9900;
  color: #111111;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.amazon-cta:hover {
  background-color: #e68a00;
  text-decoration: none;
}

.amazon-cta svg {
  width: 1rem;
  height: 1rem;
}

/* Pros / Cons */
.pros-cons {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .pros-cons {
    grid-template-columns: 1fr 1fr;
  }
}

.pros-cons__box {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.pros-cons__box--pros {
  background-color: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}

.pros-cons__box--cons {
  background-color: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.pros-cons__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.pros-cons__box--pros .pros-cons__title {
  color: #15803d;
}

.pros-cons__box--cons .pros-cons__title {
  color: #b91c1c;
}

.pros-cons__list {
  margin: 0;
  padding-left: 1.25rem;
}

.pros-cons__list li {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
}

/* Sidebar */
.single-article__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .single-article__sidebar {
    position: sticky;
    top: 92px;
    align-self: start;
  }
}

.sidebar-widget {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
}

.sidebar-widget__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.sidebar-widget p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.sidebar-widget ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.9375rem;
}

.sidebar-widget li {
  margin-bottom: 0.5rem;
}

.sidebar-widget a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.sidebar-widget a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--ocean-950);
  color: var(--ocean-100);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer__brand p {
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ocean-200);
}

.site-footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.site-footer__social a {
  color: var(--ocean-300);
  transition: color 0.2s ease;
}

.site-footer__social a:hover {
  color: var(--primary-foreground);
}

.site-footer__social svg {
  width: 1.25rem;
  height: 1.25rem;
}

.site-footer__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-foreground);
  margin-bottom: 1rem;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li {
  margin-bottom: 0.5rem;
}

.site-footer__links a {
  font-size: 0.875rem;
  color: var(--ocean-200);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--primary-foreground);
}

.site-footer__bottom {
  border-top: 1px solid var(--ocean-800);
  padding-top: 2rem;
  padding-bottom: 2rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ocean-300);
}

/* Archive / blog list */
.archive-list {
  display: grid;
  gap: 1.5rem;
}

.archive-list .article-card {
  flex-direction: row;
  align-items: stretch;
}

.archive-list .article-card__media {
  width: 33%;
  min-width: 160px;
  aspect-ratio: auto;
}

.archive-list .article-card__body {
  justify-content: center;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  text-decoration: none;
}

.pagination a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

.pagination .current {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* 404 / search */
.page-not-found,
.page-search {
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: center;
}

.page-not-found__title {
  font-size: 6rem;
  color: var(--primary);
  margin-bottom: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* WordPress core */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
}

.gallery {
  display: grid;
  gap: 1rem;
}

.gallery-item {
  margin: 0;
}

/* Elementor full width fix */
.elementor-page .site-header,
.elementor-page .site-footer {
  display: none;
}

/* Search form */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  color: var(--foreground);
}

.search-form .search-field:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

