/**
 * Anymag Child — Premium Design Overrides
 *
 * Completely overrides the parent theme's visual language using CSS custom
 * properties injected by the branding engine (branding.json → :root vars).
 *
 * Design Principles:
 * - High legibility with spacious whitespace
 * - Clean borders and soft shadows (no harsh lines)
 * - Modern typography scale (Inter + Outfit)
 * - Micro-animations for engagement
 * - Frosted-glass / glassmorphism accents
 *
 * @package AnymagChild
 * @version 1.0.0
 */

/* ═══════════════════════════════════════════════════════════════════════════
   §1. GLOBAL RESET & TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

body {
  font-family: var(--brand-font, 'Inter', sans-serif);
  font-size: 15px;
  color: var(--text-secondary, #475569);
  line-height: 1.72;
  letter-spacing: -0.008em;
  background: var(--surface-secondary, #f8fafc);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--brand-heading-font, 'Outfit', sans-serif);
  color: var(--text-primary, #0f172a);
  letter-spacing: -0.025em;
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }

a {
  color: var(--brand-primary, #1B5E20);
  text-decoration: none;
  transition: color var(--duration-fast, 150ms) var(--ease-out);
}

a:hover {
  color: var(--brand-primary-hover, #145218);
}

p {
  margin-bottom: 1.5em;
  line-height: 1.72;
}

::selection {
  background: var(--brand-primary-muted, #c8e6c9);
  color: var(--text-primary, #0f172a);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §2. LAYOUT & CONTAINERS
   ═══════════════════════════════════════════════════════════════════════════ */

.site-wrapper {
  background: var(--surface-secondary, #f8fafc);
}

#main-area {
  padding-top: 2rem;
  margin-bottom: 3rem;
}

.container {
  max-width: 1280px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §3. PREMIUM CARD SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.widget,
.edu-widget,
.edu-exam-card {
  background: var(--surface-elevated, #ffffff);
  border: 1px solid var(--border-subtle, rgba(0,0,0,0.06));
  border-radius: var(--brand-radius, 12px);
  box-shadow: var(--brand-shadow, 0 2px 16px rgba(0,0,0,0.06));
  transition:
    transform var(--duration-normal, 250ms) var(--ease-out),
    box-shadow var(--duration-normal, 250ms) var(--ease-out);
}

.edu-exam-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

/* Widget titles */
.widget-title,
.edu-widget-title {
  font-family: var(--brand-heading-font, 'Outfit', sans-serif);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary, #0f172a);
  padding-bottom: var(--space-sm, 8px);
  margin-bottom: var(--space-md, 16px);
  border-bottom: 2px solid var(--brand-primary, #1B5E20);
  display: inline-block;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §4. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.edu-cta-btn,
input[type='submit'],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-primary, #1B5E20);
  color: #ffffff !important;
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-family: var(--brand-font, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition:
    background var(--duration-normal) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.edu-cta-btn:hover,
input[type='submit']:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--brand-primary-hover, #145218) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.edu-cta-btn:active,
input[type='submit']:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* Secondary / outline button variant */
.btn-secondary,
.edu-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: transparent;
  color: var(--brand-primary, #1B5E20);
  border: 1.5px solid var(--brand-primary, #1B5E20);
  border-radius: 100px;
  font-family: var(--brand-font, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-secondary:hover,
.edu-view-all:hover {
  background: var(--brand-primary, #1B5E20);
  color: #ffffff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §5. FORMS & INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
select,
textarea {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--brand-font, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary, #0f172a);
  background: var(--surface-elevated, #ffffff);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-primary, #1B5E20);
  box-shadow: 0 0 0 3px var(--brand-primary-light, rgba(27,94,32,0.10));
  outline: none;
}

label {
  font-family: var(--brand-font, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  margin-bottom: 6px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §6. HEADER MODERNIZATION
   ═══════════════════════════════════════════════════════════════════════════ */

#cover-header,
#site-header,
#content-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.header-social-links a {
  color: var(--text-secondary, #475569);
  font-size: 15px;
  transition: color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-spring);
}

.header-social-links a:hover {
  color: var(--brand-primary, #1B5E20);
  transform: scale(1.1);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §7. NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hidden sidebar / off-canvas menu */
.hidden-sidebar {
  background: var(--surface-elevated, #ffffff);
}

.hidden-sidebar .widget-title {
  font-family: var(--brand-heading-font);
  color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §8. EDUCATION PLATFORM OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Trust bar */
.edu-trust-bar {
  background: var(--brand-primary-light, #e8f5e9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--brand-radius, 12px);
  padding: var(--space-md) var(--space-lg);
}

.edu-trust-item i {
  color: var(--brand-primary, #1B5E20);
}

/* Exam badges */
.edu-exam-badge {
  font-family: var(--brand-font, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--brand-primary-light, #e8f5e9);
  color: var(--brand-primary, #1B5E20);
}

.edu-exam-badge-premium {
  background: var(--brand-secondary-light, #fff3e0);
  color: var(--accent-color, #E65100);
}

.edu-exam-badge-free {
  background: #ecfdf5;
  color: #059669;
}

/* Section headers */
.edu-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg, 24px);
}

.edu-section-header h2 {
  margin: 0;
  font-size: 1.375rem;
}

/* Subject tiles */
.edu-subject-tile {
  background: var(--surface-elevated, #ffffff);
  border: 1px solid var(--border-subtle);
  border-radius: var(--brand-radius, 12px);
  padding: var(--space-lg, 24px);
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out);
}

.edu-subject-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.10);
  border-color: var(--brand-primary, #1B5E20);
}

.edu-subject-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary-light, #e8f5e9);
  border-radius: 14px;
  font-size: 20px;
  color: var(--brand-primary, #1B5E20);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.edu-subject-tile:hover .edu-subject-icon {
  transform: scale(1.1) rotate(-3deg);
}

.edu-subject-name {
  display: block;
  font-family: var(--brand-heading-font, 'Outfit', sans-serif);
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  font-size: 14px;
  margin-bottom: 2px;
}

.edu-subject-count {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

/* Newsletter section */
.edu-newsletter {
  background: linear-gradient(135deg, var(--brand-primary, #1B5E20), var(--brand-primary-hover, #145218));
  border-radius: var(--brand-radius, 12px);
  padding: var(--space-2xl, 48px) var(--space-xl, 32px);
  text-align: center;
  color: #ffffff;
}

.edu-newsletter h3 {
  color: #ffffff;
  margin-top: 0;
  font-size: 1.5rem;
}

.edu-newsletter p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.edu-newsletter-form {
  display: flex;
  gap: var(--space-sm, 8px);
  max-width: 440px;
  margin: 0 auto;
}

.edu-newsletter-form input[type="email"] {
  flex: 1;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 100px;
  padding: 12px 20px;
  font-size: 14px;
}

.edu-newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.edu-newsletter-form input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.edu-newsletter-form button {
  background: #ffffff;
  color: var(--brand-primary, #1B5E20);
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.edu-newsletter-form button:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §9. SIDEBAR PREMIUM TREATMENT
   ═══════════════════════════════════════════════════════════════════════════ */

.edu-home-sidebar .edu-widget,
.edu-sidebar .widget {
  padding: var(--space-lg, 24px);
  margin-bottom: var(--space-lg, 24px);
}

/* Trending list */
.edu-trending-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 8px);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
  list-style: none;
  margin-left: 0;
}

.edu-trending-item:last-child {
  border-bottom: none;
}

.edu-trending-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-secondary, #f8fafc);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
}

.edu-trending-rank.rank-1 {
  background: #fef3c7;
  color: #d97706;
}

.edu-trending-rank.rank-2 {
  background: #e0e7ff;
  color: #4f46e5;
}

.edu-trending-rank.rank-3 {
  background: #fce7f3;
  color: #db2777;
}

.edu-trending-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary) !important;
  text-decoration: none;
  line-height: 1.4;
}

.edu-trending-title:hover {
  color: var(--brand-primary) !important;
}

.edu-trending-attempts {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

/* Sticky CTA widget */
.edu-sticky-cta {
  background: linear-gradient(135deg, var(--brand-primary-light, #e8f5e9), var(--surface-elevated, #ffffff));
  border: 1.5px solid var(--brand-primary, #1B5E20) !important;
  text-align: center;
}

.edu-sticky-cta .edu-widget-title {
  border-bottom-color: var(--brand-secondary, #FF9800);
}

.edu-sticky-cta-price {
  font-family: var(--brand-heading-font);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.edu-sticky-cta-period {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.edu-sticky-cta-features {
  text-align: left;
  margin-bottom: var(--space-lg);
}

.edu-sticky-cta-features li {
  list-style: none;
  margin-left: 0;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.edu-sticky-cta-features li::before {
  content: '✓ ';
  color: var(--brand-primary, #1B5E20);
  font-weight: 700;
  margin-right: 6px;
}

.edu-sticky-cta-features li:last-child {
  border-bottom: none;
}

/* Leaderboard */
.edu-leaderboard-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 8px);
  padding: var(--space-sm) 0;
  list-style: none;
  margin-left: 0;
}

.edu-leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.edu-leaderboard-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.edu-leaderboard-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary, #1B5E20);
  background: var(--brand-primary-light, #e8f5e9);
  padding: 2px 10px;
  border-radius: 100px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §10. BLOCKQUOTES & CONTENT ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

blockquote {
  border-left: 3px solid var(--brand-primary, #1B5E20);
  background: var(--brand-primary-light, #e8f5e9);
  padding: var(--space-lg) var(--space-xl);
  border-radius: 0 var(--brand-radius, 12px) var(--brand-radius, 12px) 0;
  color: var(--text-primary, #0f172a);
  font-style: normal;
  font-weight: 500;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  border: none;
  border-radius: var(--brand-radius, 12px);
  padding: var(--space-lg);
  font-size: 13px;
}

table th {
  font-family: var(--brand-heading-font, 'Outfit', sans-serif);
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  background: var(--surface-secondary, #f8fafc);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §11. FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.main-footer,
.footer-wrapper {
  background: var(--text-primary, #0f172a);
  color: rgba(255, 255, 255, 0.7);
}

.main-footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--duration-fast) var(--ease-out);
}

.main-footer a:hover {
  color: #ffffff;
}

.footer-widget-title,
.footer-mag-heading {
  font-family: var(--brand-heading-font, 'Outfit', sans-serif);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §12. MICRO-ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fade-in on scroll (utility class for JS-driven animations) */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--duration-slow, 400ms) var(--ease-out),
    transform var(--duration-slow, 400ms) var(--ease-out);
}

.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse badge animation */
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.edu-exam-badge-premium {
  animation: pulse-badge 2s infinite ease-in-out;
}

/* Skeleton loading shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §13. RESPONSIVE REFINEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }

  .edu-newsletter-form {
    flex-direction: column;
  }

  .edu-newsletter-form button {
    width: 100%;
  }

  .edu-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .edu-home-sidebar {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  .edu-trust-bar {
    flex-direction: column;
    text-align: center;
  }

  .edu-exam-card-stats {
    flex-wrap: wrap;
    gap: 6px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   §14. PRINT OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
  body {
    font-family: Georgia, serif;
    color: #000;
    background: #fff;
  }

  .edu-sticky-cta,
  .edu-newsletter,
  .edu-trust-bar,
  .header-social-links {
    display: none !important;
  }
}
