/*
 * AYD.yoga Theme Override
 * Transforms the Inspiro WordPress theme to match the AYD.yoga design system
 */

/* ==========================================
   CSS Variables - AYD.yoga Design Tokens
   ========================================== */

:root {
  /* Page backgrounds */
  --bg-page: #f8f9fb;
  --bg-page-alt: #f1f3f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fb;
  --bg-elevated: #ffffff;

  /* Header */
  --bg-header: #1e2430;
  --bg-header-rgb: 30, 36, 48;
  --text-header: #ffffff;
  --text-header-muted: #94a3b8;

  /* Text */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Accent */
  --accent-primary: #4a5568;
  --accent-hover: #374151;
  --accent-light: #e2e8f0;

  /* Buttons */
  --btn-primary-bg: #3b4a5c;
  --btn-primary-hover: #2d3a4a;
  --btn-primary-text: #ffffff;

  /* Borders */
  --border-default: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Override Inspiro variables */
  --inspiro-primary-color: #4a5568;
  --inspiro-secondary-color: #64748b;
  --inspiro-tertiary-color: #1e2430;
  --inspiro-accent-color: #94a3b8;

  /* Override WP variables */
  --wp--preset--color--secondary: #4a5568;
  --wp--preset--color--header-footer: #1e2430;
  --wp--preset--color--background: #f8f9fb;
  --wp--preset--color--primary: #1e293b;
}

/* ==========================================
   Global / Body
   ========================================== */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Typography - Onest for headings (AYD serif)
   ========================================== */

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.site-title {
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
}

.entry-content h2 {
  font-size: 1.75rem !important;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.entry-content h3 {
  font-size: 1.35rem !important;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.entry-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

a:where(:not(.wp-element-button)) {
  color: var(--accent-primary) !important;
  text-decoration: none;
  transition: color 0.25s ease;
}

a:where(:not(.wp-element-button)):hover {
  color: var(--accent-hover) !important;
}

/* ==========================================
   Navigation / Header
   ========================================== */

.navbar,
#site-navigation.navbar {
  background-color: var(--bg-header) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none !important;
}

.headroom--not-top .navbar,
.has-header-image.home.blog .headroom--not-top .navbar,
.has-header-image.inspiro-front-page .headroom--not-top .navbar,
.has-header-video.home.blog .headroom--not-top .navbar,
.has-header-video.inspiro-front-page .headroom--not-top .navbar {
  background-color: rgba(var(--bg-header-rgb), 0.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-nav a,
.navbar-nav .menu-item a {
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  color: var(--text-header) !important;
  transition: color 0.25s ease, opacity 0.25s ease !important;
  opacity: 0.85;
}

.navbar-nav a:hover,
.navbar-nav .menu-item a:hover {
  color: #ffffff !important;
  opacity: 1;
}

.navbar-nav .current-menu-item > a,
.navbar-nav .current_page_item > a {
  opacity: 1 !important;
  color: #ffffff !important;
}

/* Logo / Brand */
.custom-logo-text,
a.custom-logo-text {
  font-family: 'Onest', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.125rem !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

/* Dropdown / Submenu */
.navbar-nav .sub-menu,
.navbar-nav ul.sub-menu {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04) !important;
  padding: 0.5rem !important;
  overflow: hidden;
}

.navbar-nav .sub-menu li a {
  color: var(--text-primary) !important;
  font-size: 0.8125rem !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
  transition: background-color 0.2s ease !important;
  opacity: 1 !important;
}

.navbar-nav .sub-menu li a:hover {
  background-color: var(--bg-page) !important;
  color: var(--accent-primary) !important;
}

/* ==========================================
   Side Nav (Mobile)
   ========================================== */

.side-nav__scrollable-container,
aside#side-nav {
  background: var(--bg-header) !important;
}

:root :where(.side-nav__wrap a:where(:not(.wp-element-button))) {
  color: var(--text-header-muted, #94a3b8) !important;
}

.side-nav__wrap a:hover {
  color: #ffffff !important;
}

/* Hamburger */
.navbar-toggle .icon-bar {
  background-color: #ffffff !important;
}

/* ==========================================
   Hero / Header Image
   ========================================== */

/* Collapse the full-height hero — high specificity to beat theme */
.custom-header,
body.inspiro-front-page .custom-header,
body.inspiro-front-page.has-header-image .custom-header,
body.inspiro-front-page.has-header-video .custom-header,
body.has-header-image.home.blog .custom-header,
body.has-header-video.home.blog .custom-header,
body.full-height-iframe-video .custom-header {
  position: relative !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  display: block !important;
  background-color: var(--bg-header) !important;
}

.custom-header-media,
body.inspiro-front-page.has-header-image .custom-header-media,
body.inspiro-front-page.has-header-video .custom-header-media,
body.home.blog.has-header-image .custom-header-media,
body.home.blog.has-header-video .custom-header-media,
body .custom-header-media {
  position: relative !important;
  height: 55vh !important;
  min-height: 350px !important;
  max-height: 550px !important;
  overflow: hidden !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  display: block !important;
}

/* Gradient overlay — :before */
.custom-header-media:before,
body.has-header-image .custom-header-media:before,
body.has-header-video .custom-header-media:before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-image: linear-gradient(
    to bottom,
    rgba(var(--bg-header-rgb), 0.2) 0%,
    rgba(var(--bg-header-rgb), 0.5) 100%
  ) !important;
  z-index: 2 !important;
  pointer-events: none !important;
  display: block !important;
}

/* Kill the theme's :after overlay */
.custom-header-media:after,
body.inspiro-front-page.has-header-image .custom-header-media:after,
body.inspiro-front-page.has-header-video .custom-header-media:after,
body.home.blog.has-header-image .custom-header-media:after,
body.home.blog.has-header-video .custom-header-media:after,
body .custom-header-media:after {
  display: none !important;
}

/* Hero Carousel */
#hero-carousel {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
}

.hero-slide {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

#hero-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-style: italic;
  text-align: center;
  padding: 0.25rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#hero-caption.visible {
  opacity: 1;
}

/* Position the branding text over the hero image */
.site-branding {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 3 !important;
  padding-bottom: 3rem !important;
}

/* Hide the scroll-down arrow */
#scroll-to-content {
  display: none !important;
}

.site-title a,
body.has-header-image .site-title a,
body.has-header-video .site-title a {
  color: #ffffff !important;
  font-family: 'Onest', sans-serif !important;
  font-weight: 700 !important;
}

.site-description,
body.has-header-image .site-description {
  color: rgba(255, 255, 255, 0.85) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 400 !important;
}

.custom-header-button {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  border-radius: 9999px !important;
  padding: 0.625rem 1.75rem !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(4px);
}

.custom-header-button:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  color: #ffffff !important;
}

#scroll-to-content:before {
  border-color: rgba(255, 255, 255, 0.6) !important;
}

/* ==========================================
   Content Area
   ========================================== */

.entry-content,
.page .entry-content {
  font-family: 'Inter', sans-serif !important;
}

.page .entry-title,
.page-title {
  font-size: 2rem !important;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .page .entry-title,
  .page-title {
    font-size: 2.5rem !important;
  }
}

/* Content wrapper - add card-like styling */
.site-content {
  background-color: var(--bg-page);
}

.entry-wrapper,
.page .entry-content {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   Images
   ========================================== */

.entry-content img,
.wp-block-image img {
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.wp-block-image figcaption {
  color: var(--text-muted) !important;
  font-size: 0.8125rem !important;
  font-style: italic;
  margin-top: 0.5rem;
}

/* ==========================================
   Tables (Moon Days, etc.)
   ========================================== */

.wp-block-table table {
  border-radius: 0.75rem !important;
  overflow: hidden !important;
  border: 1px solid var(--border-default) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  font-family: 'Inter', sans-serif !important;
}

.wp-block-table table th {
  background-color: var(--bg-header) !important;
  color: var(--text-header) !important;
  font-family: 'Onest', sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  padding: 0.75rem 1rem !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.wp-block-table table td {
  padding: 0.75rem 1rem !important;
  border-color: var(--border-default) !important;
  font-size: 0.875rem !important;
  color: var(--text-secondary) !important;
}

.wp-block-table table tbody tr:nth-child(even) {
  background-color: var(--bg-page-alt) !important;
}

.wp-block-table table tbody tr:hover {
  background-color: var(--accent-light) !important;
}

/* ==========================================
   Buttons / Links
   ========================================== */

.wp-element-button,
.wp-block-button__link {
  background-color: var(--btn-primary-bg) !important;
  color: var(--btn-primary-text) !important;
  border-radius: 9999px !important;
  padding: 0.625rem 1.5rem !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: background-color 0.3s ease !important;
  border: none !important;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
  background-color: var(--btn-primary-hover) !important;
}

/* ==========================================
   Footer
   ========================================== */

.site-footer {
  background-color: var(--bg-header) !important;
  color: var(--text-header-muted, #94a3b8) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer a {
  color: var(--text-header-muted, #94a3b8) !important;
  transition: color 0.25s ease !important;
}

.site-footer a:hover {
  color: #ffffff !important;
}

.site-footer h2,
.site-footer h3,
.site-footer .widget-title {
  color: var(--text-header) !important;
  font-family: 'Onest', sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* ==========================================
   Forms (Mailchimp, etc.)
   ========================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: 0.5rem !important;
  padding: 0.625rem 1rem !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.875rem !important;
  color: var(--text-primary) !important;
  transition: border-color 0.25s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
  border-color: var(--accent-primary) !important;
  outline: 2px solid rgba(74, 85, 104, 0.2) !important;
  outline-offset: 2px !important;
}

input[type="submit"],
button[type="submit"] {
  background-color: var(--btn-primary-bg) !important;
  color: var(--btn-primary-text) !important;
  border-radius: 9999px !important;
  padding: 0.625rem 1.5rem !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  border: none !important;
  cursor: pointer;
  transition: background-color 0.3s ease !important;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  background-color: var(--btn-primary-hover) !important;
}

/* ==========================================
   Misc / Cleanup
   ========================================== */

/* Remove WordPress block editor artifacts */
.wp-block-group,
.wp-block-columns {
  border-radius: 0.75rem;
}

/* Smooth transitions */
* {
  transition-property: background-color, color, border-color, opacity;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

/* Override for elements that shouldn't transition */
img, video, iframe, svg, canvas {
  transition: none !important;
}

/* Selection color */
::selection {
  background-color: rgba(74, 85, 104, 0.2);
  color: var(--text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* PayPal buttons - keep functional appearance */
img[src*="paypalobjects"] {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ==========================================
   Print styles
   ========================================== */

@media print {
  .navbar,
  .site-footer,
  .side-nav,
  .side-nav-overlay {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
