/*
Theme Name: Zyra Academy
Theme URI: https://academy.zyra.institute
Author: Zyra Academy
Description: A WordPress theme converted from the Zyra Academy Lovable static export, with dynamic WordPress header/footer, LearnDash-compatible styling, and Elementor-friendly page content.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: zyra-academy
*/

:root {
  --zyra-primary: #6640b8;
  --zyra-primary-dark: #4e2d94;
  --zyra-secondary: #a9782d;
  --zyra-tertiary: #2a9a72;
  --zyra-ink: #1f1f23;
  --zyra-muted: #737373;
  --zyra-surface: #f7f7f7;
}

html { scroll-behavior: smooth; }
body { margin: 0; }
.exported-site { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.exported-site img { max-width: 100%; height: auto; }
.exported-site img:not([class*="object-"]) { object-fit: cover; }
.exported-site a { text-decoration: none; }
.exported-site .current-menu-item > a,
.exported-site .current_page_item > a { color: var(--primary); }

/* WordPress admin bar spacing */
body.admin-bar .exported-site header.sticky { top: 32px; }
@media (max-width: 782px) { body.admin-bar .exported-site header.sticky { top: 46px; } }

/* Dynamic menu safety */
.zyra-primary-menu { display: flex; align-items: center; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.zyra-primary-menu li { margin: 0; padding: 0; }
.zyra-primary-menu a { font-size: .875rem; line-height: 1.25rem; color: var(--foreground); transition: color .15s ease; }
.zyra-primary-menu a:hover { color: var(--primary); }
.zyra-mobile-menu { display: none; border-top: 1px solid var(--border); background: var(--background); padding: 1rem; }
.zyra-mobile-menu.is-open { display: flex; flex-direction: column; gap: .75rem; }
.zyra-mobile-menu a { padding: .5rem 0; color: var(--foreground); }

/* Auth pages */
.zyra-auth-shell { min-height: 72vh; display: grid; place-items: center; padding: 4rem 1rem; background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 9%, white), white 45%, color-mix(in oklab, var(--secondary) 10%, white)); }
.zyra-auth-card { width: min(100%, 520px); background: var(--background); border: 1px solid var(--border); box-shadow: 0 24px 80px rgba(31,31,35,.10); border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.zyra-auth-kicker { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: .35rem .65rem; color: var(--primary); font-size: .75rem; font-weight: 600; margin-bottom: 1rem; }
.zyra-auth-card h1, .zyra-auth-card h2 { margin: 0 0 .5rem; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.04em; }
.zyra-auth-card p { color: var(--text-muted); margin: 0 0 1.25rem; }
.zyra-auth-card form p { margin: 0 0 1rem; }
.zyra-auth-card label { display: block; font-weight: 600; color: var(--foreground); margin-bottom: .4rem; }
.zyra-auth-card input[type="text"],
.zyra-auth-card input[type="email"],
.zyra-auth-card input[type="password"] { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: .85rem 1rem; background: var(--surface); color: var(--foreground); }
.zyra-auth-card input[type="submit"], .zyra-auth-button { width: 100%; border: 0; border-radius: 999px; padding: .9rem 1.25rem; background: var(--primary); color: var(--primary-foreground); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.zyra-auth-links { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; font-size: .9rem; }
.zyra-auth-links a { color: var(--primary); font-weight: 600; }
.zyra-notice { border: 1px solid var(--border); border-radius: 16px; padding: 1rem; background: var(--surface); }

/* LearnDash brand layer */
.learndash-wrapper { --ldx-color-primary: var(--zyra-primary); --ldx-color-link: var(--zyra-primary); font-family: Inter, system-ui, sans-serif; }
.learndash-wrapper .ld-button,
.learndash-wrapper .ld-status,
.learndash-wrapper .ld-course-status .ld-status.ld-status-progress,
.learndash-wrapper .ld-expand-button,
.learndash-wrapper .wpProQuiz_button { border-radius: 999px !important; }
.learndash-wrapper .ld-button,
.learndash-wrapper .ld-expand-button,
.learndash-wrapper .wpProQuiz_button { background: var(--zyra-primary) !important; color: #fff !important; }
.learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage,
.learndash-wrapper .ld-status-complete,
.learndash-wrapper .ld-item-list .ld-item-list-item.ld-is-complete .ld-item-name .ld-item-title .ld-item-components span { background: var(--zyra-tertiary) !important; }
.learndash-wrapper .ld-alert-success { border-color: var(--zyra-tertiary) !important; }
.learndash-wrapper .ld-alert-warning { border-color: var(--zyra-secondary) !important; }
.learndash-wrapper .ld-course-status,
.learndash-wrapper .ld-item-list .ld-item-list-item,
.learndash-wrapper .ld-table-list { border-radius: 20px !important; border-color: var(--border) !important; box-shadow: 0 16px 50px rgba(31,31,35,.05); }
.zyra-course-archive { padding: 5rem 1rem; }
.zyra-course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; max-width: 80rem; margin: 0 auto; }
.zyra-course-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 1.25rem; box-shadow: 0 16px 50px rgba(31,31,35,.04); transition: transform .2s ease, box-shadow .2s ease; }
.zyra-course-card:hover { transform: translateY(-3px); box-shadow: 0 24px 70px rgba(31,31,35,.08); }
.zyra-course-card h2, .zyra-course-card h3 { margin: .65rem 0; }
.zyra-course-meta { color: var(--text-muted); font-size: .9rem; }
.zyra-pill { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: .3rem .65rem; font-size: .75rem; color: var(--primary); font-weight: 600; }

@media (max-width: 900px) {
  .zyra-primary-menu { display: none; }
}

/* v1.2 Lovable header parity and Elementor layout safety */
.zyra-primary-menu,
.zyra-primary-menu ul,
.zyra-primary-menu li { display: contents; margin: 0; padding: 0; list-style: none; }
.zyra-primary-menu a { color: var(--text-secondary); font-size: 14px; font-weight: 400; transition: color .15s ease; }
.zyra-primary-menu a:hover,
.zyra-primary-menu .current-menu-item > a,
.zyra-primary-menu .current_page_item > a { color: var(--foreground); }
.exported-site .custom-logo { max-height: 32px; width: auto; }
.zyra-mobile-menu[hidden] { display: none !important; }
.zyra-mobile-menu { border-top: 1px solid var(--border); background: var(--background); padding: 1rem; }
.zyra-mobile-menu.is-open { display: block; }
.zyra-mobile-menu-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.zyra-mobile-menu-list a { display: block; color: var(--foreground); font-size: 15px; padding: .55rem 0; }
.zyra-mobile-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.zyra-mobile-actions a { display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; border: 1px solid var(--border); padding: .75rem 1rem; font-size: 14px; font-weight: 500; }
.zyra-mobile-actions a:last-child { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.elementor .exported-site, .elementor-page .exported-site { width: 100%; }
.elementor-widget-container > section:first-child { margin-top: 0; }
.zyra-filter.is-active { background: var(--foreground); color: var(--background); }
