/*
Theme Name: Pawtopia Starter
Theme URI: https://caninecoldlaser.com
Author: Pawtopia
Author URI: https://caninecoldlaser.com
Description: A clean, modern WordPress theme for Canine Cold Laser — featuring a teal and amber color palette, glassmorphism hero, responsive post grid, and dark mode support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: pawtopia-starter
Tags: blog, one-column, two-columns, three-columns, custom-menu, featured-images, responsive-layout
*/

/* =========================================================
   0. GOOGLE FONTS
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* =========================================================
   1. CSS CUSTOM PROPERTIES (LIGHT MODE)
   ========================================================= */
:root {
  --primary-teal: #14b8a6;
  --primary-teal-light: #2dd4bf;
  --primary-teal-dark: #0f766e;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-amber-dark: #d97706;

  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.04);
  --shadow-card-hover: 0 20px 40px -8px rgba(20,184,166,.18), 0 8px 16px -4px rgba(0,0,0,.06);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", system-ui, -apple-system, sans-serif;

  --header-height: 72px;
  --content-max: 1200px;
  --reading-max: 800px;
}

/* =========================================================
   2. DARK MODE
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-color: #334155;
    --border-color-light: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.3), 0 2px 4px -2px rgba(0,0,0,.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.35), 0 4px 6px -4px rgba(0,0,0,.2);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.4), 0 8px 10px -6px rgba(0,0,0,.25);
    --shadow-card-hover: 0 20px 40px -8px rgba(20,184,166,.25), 0 8px 16px -4px rgba(0,0,0,.3);
  }
}

/* =========================================================
   3. RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-teal);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover {
  color: var(--primary-teal-dark);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }

p { margin-bottom: 1rem; }

/* =========================================================
   4. UTILITY / CONTAINER
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* =========================================================
   5. SITE HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo */
.site-brand {
  display: flex;
  align-items: center;
  gap: .125rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--text-primary);
}
.site-brand .brand-accent {
  color: var(--primary-teal);
}

/* Navigation */
.primary-nav {
  display: none;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: .25rem;
}
.primary-nav a {
  display: inline-block;
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: rgba(20,184,166,.08);
  color: var(--primary-teal);
}

/* Mobile toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: background .2s;
}
.nav-toggle:hover {
  background: var(--border-color-light);
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile menu */
.mobile-nav {
  display: none;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: .75rem 1.25rem 1rem;
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav ul {
  list-style: none;
}
.mobile-nav a {
  display: block;
  padding: .625rem 0;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color-light);
}
.mobile-nav li:last-child a {
  border-bottom: none;
}
.mobile-nav a:hover {
  color: var(--primary-teal);
}

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

/* =========================================================
   6. HERO SECTION (HOMEPAGE)
   ========================================================= */
.hero-section {
  position: relative;
  padding: 5rem 0 3rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20,184,166,.06) 0%, rgba(245,158,11,.04) 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(20,184,166,.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(245,158,11,.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-card {
  position: relative;
  max-width: 680px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
  animation: heroFadeIn .8s ease-out both;
}

@media (prefers-color-scheme: dark) {
  .hero-card {
    background: rgba(30,41,59,.6);
    border-color: rgba(255,255,255,.08);
  }
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .875rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary-teal-dark);
  background: rgba(20,184,166,.1);
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--primary-teal);
  border-radius: 50%;
}

.hero-card h1 {
  margin-bottom: 1rem;
}
.hero-card p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* =========================================================
   7. POST GRID
   ========================================================= */
.posts-section {
  padding: 3rem 0 4rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.section-header h2 {
  position: relative;
}
.section-header h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background: var(--primary-teal);
  border-radius: 2px;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

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

/* =========================================================
   8. ARTICLE CARDS
   ========================================================= */
.article-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--border-color-light);
}
.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.article-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

/* Placeholder when no thumbnail */
.card-thumbnail-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumbnail-placeholder svg {
  width: 48px;
  height: 48px;
  color: rgba(255,255,255,.5);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  display: inline-block;
  padding: .25rem .75rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  background: var(--primary-teal);
  border-radius: var(--radius-full);
  margin-bottom: .875rem;
  width: fit-content;
  line-height: 1.4;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: .625rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.card-title a:hover {
  color: var(--primary-teal);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-read-more {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary-teal);
  transition: gap .25s ease, color .2s;
}
.card-read-more:hover {
  gap: .625rem;
  color: var(--primary-teal-dark);
}

/* =========================================================
   9. PAGINATION
   ========================================================= */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 3rem 0;
}
.pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  font-size: .9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  transition: all .2s;
}
.pagination-wrap .page-numbers:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}
.pagination-wrap .page-numbers.current {
  background: var(--primary-teal);
  border-color: var(--primary-teal);
  color: #fff;
}

/* =========================================================
   10. SINGLE POST
   ========================================================= */
.single-post-wrap {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.single-post-header {
  margin-bottom: 2.5rem;
}
.single-post-header .card-category {
  margin-bottom: 1rem;
}
.single-post-header h1 {
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: .875rem;
}
.post-meta .meta-sep {
  width: 4px;
  height: 4px;
  background: var(--text-tertiary);
  border-radius: 50%;
}

.single-featured-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.single-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post content typography */
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.post-content h2 {
  margin: 2.5rem 0 1rem;
}
.post-content h3 {
  margin: 2rem 0 .75rem;
}
.post-content p {
  margin-bottom: 1.5rem;
}
.post-content ul, .post-content ol {
  margin: 0 0 1.5rem 1.5rem;
}
.post-content li {
  margin-bottom: .5rem;
}
.post-content blockquote {
  border-left: 4px solid var(--primary-teal);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(20,184,166,.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.post-content code {
  background: var(--border-color-light);
  padding: .2em .4em;
  border-radius: 4px;
  font-size: .9em;
}
.post-content pre {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.post-content pre code {
  background: none;
  padding: 0;
}
.post-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.post-content a {
  color: var(--primary-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content a:hover {
  color: var(--primary-teal-dark);
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.post-content th, .post-content td {
  padding: .75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}
.post-content th {
  background: var(--border-color-light);
  font-weight: 600;
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}
.post-tags a {
  display: inline-block;
  padding: .35rem .875rem;
  font-size: .8rem;
  font-weight: 500;
  background: var(--border-color-light);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: background .2s, color .2s;
}
.post-tags a:hover {
  background: rgba(20,184,166,.1);
  color: var(--primary-teal);
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}
.post-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.post-nav a:hover {
  color: var(--primary-teal);
}

/* =========================================================
   11. PAGE TEMPLATE
   ========================================================= */
.page-wrap {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-wrap h1 {
  margin-bottom: 2rem;
}

/* =========================================================
   12. ARCHIVE HEADER
   ========================================================= */
.archive-header {
  padding: 3rem 0 0;
}
.archive-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.archive-description {
  color: var(--text-secondary);
  margin-top: .5rem;
  font-size: 1rem;
}

/* =========================================================
   13. 404 PAGE
   ========================================================= */
.error-404-wrap {
  text-align: center;
  padding: 6rem 1.25rem;
}
.error-404-wrap .error-code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 800;
  color: var(--primary-teal);
  line-height: 1;
  opacity: .2;
}
.error-404-wrap h1 {
  margin: 1rem 0 .75rem;
}
.error-404-wrap p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary-teal);
  border-radius: var(--radius-full);
  transition: background .2s, transform .15s;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--primary-teal-dark);
  transform: translateY(-1px);
  color: #fff;
}

/* =========================================================
   14. SITE FOOTER
   ========================================================= */
.site-footer {
  margin-top: auto;
  background: var(--text-primary);
  color: rgba(255,255,255,.6);
  padding: 3rem 0;
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    background: #020617;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.footer-brand .brand-accent {
  color: var(--primary-teal-light);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: .875rem;
  color: rgba(255,255,255,.5);
  transition: color .2s;
}
.footer-links a:hover {
  color: var(--primary-teal-light);
}

.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* =========================================================
   15. WORDPRESS DEFAULTS
   ========================================================= */
.alignleft   { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright  { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption  { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--text-secondary); margin-top: .5rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: .5rem; margin-bottom: 1.5rem; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: var(--radius-sm); }

/* =========================================================
   16. ACCESSIBILITY
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--primary-teal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: .75rem 1.5rem;
  background: var(--primary-teal);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top .2s;
}
.skip-link:focus {
  top: 1rem;
}

/* =========================================================
   17. SEARCH FORM
   ========================================================= */
.search-form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
}
.search-form .search-field {
  flex: 1;
  padding: .625rem 1rem;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font-sans);
  background: var(--surface-color);
  color: var(--text-primary);
}
.search-form .search-submit {
  padding: .625rem 1.25rem;
  border: none;
  background: var(--primary-teal);
  color: #fff;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: background .2s;
}
.search-form .search-submit:hover {
  background: var(--primary-teal-dark);
}

/* =========================================================
   18. COMMENTS
   ========================================================= */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}
.comments-title {
  margin-bottom: 1.5rem;
}
.comment-list {
  list-style: none;
  padding: 0;
}
.comment-body {
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.comment-meta {
  margin-bottom: .75rem;
  font-size: .85rem;
  color: var(--text-secondary);
}
.comment-author .fn {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-respond {
  margin-top: 2rem;
}
.comment-form label {
  display: block;
  margin-bottom: .25rem;
  font-size: .9rem;
  font-weight: 500;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: .625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .95rem;
  margin-bottom: 1rem;
  background: var(--surface-color);
  color: var(--text-primary);
}
.comment-form .submit {
  padding: .625rem 1.5rem;
  background: var(--primary-teal);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.comment-form .submit:hover {
  background: var(--primary-teal-dark);
}
