/*
Theme Name: Learning Legacy
Theme URI: https://learninglegacy.com
Author: Learning Legacy Team
Author URI: https://learninglegacy.com
Description: A modern, elegant WordPress theme for the Learning Legacy educational resources platform. Features a clean design with Learning Legacy pink (#b7195c) branding, optimized for WooCommerce integration and digital book sales.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: learning-legacy
Tags: e-commerce, education, books, woocommerce, custom-colors, responsive-layout, accessibility-ready, one-column, two-columns, custom-menu, featured-images, footer-widgets, sticky-post, theme-options
*/

/* ===========================
   CSS VARIABLES - Learning Legacy Theme
   =========================== */
:root {
  /* Learning Legacy Pink (#b7195c) - Primary Brand Color */
  --color-primary: #b7195c;
  --color-primary-hover: #9a1450;
  --color-primary-light: #e894bb;
  --color-primary-dark: #7d1140;

  /* Background Colors */
  --color-background: #fafafa; /* Light warm cream */
  --color-card: #ffffff;
  --color-muted: #f5f5f5;

  /* Text Colors */
  --color-foreground: #1a1a1a; /* Primary text */
  --color-muted-foreground: #6b7280; /* Secondary text */
  --color-text-on-primary: #ffffff;

  /* Border & Divider Colors */
  --color-border: #e5e7eb;
  --color-input-border: #d1d5db;

  /* Interactive States */
  --color-focus: #b7195c;
  --color-hover: rgba(183, 25, 92, 0.1);

  /* Spacing System (8px base) */
  --spacing-xs: 0.5rem;   /* 8px */
  --spacing-sm: 1rem;     /* 16px */
  --spacing-md: 1.5rem;   /* 24px */
  --spacing-lg: 2rem;     /* 32px */
  --spacing-xl: 3rem;     /* 48px */
  --spacing-2xl: 4rem;    /* 64px */

  /* Border Radius */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.65rem;   /* 10px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;  /* Fully rounded */

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Container Max Width */
  --container-max-width: 1280px;
}

/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
  position: relative;
}

/* Subtle background pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.02;
  background-image:
    radial-gradient(circle at 25% 25%, var(--color-primary) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, var(--color-primary) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-foreground);
  margin-bottom: 1rem;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

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

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

a:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-sm);
  padding-right: var(--spacing-sm);
}

@media (min-width: 640px) {
  .container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }
}

.site-content {
  min-height: 70vh;
  padding: var(--spacing-lg) 0;
}

/* ===========================
   BUTTONS
   =========================== */
.btn,
.wp-block-button__link,
input[type="submit"],
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary,
.wp-block-button__link {
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover,
.wp-block-button__link:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background-color: var(--color-hover);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  background-color: var(--color-muted);
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: var(--font-size-lg);
}

/* ===========================
   CARDS
   =========================== */
.card {
  background-color: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(183, 25, 92, 0.5);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.5rem;
  color: var(--color-foreground);
}

.card-text {
  color: var(--color-muted-foreground);
  font-size: var(--font-size-sm);
}

/* ===========================
   FORMS & INPUTS
   =========================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--color-foreground);
  background-color: var(--color-card);
  border: 2px solid var(--color-input-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(183, 25, 92, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-foreground);
}

/* ===========================
   BADGES & TAGS
   =========================== */
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  background-color: rgba(183, 25, 92, 0.1);
  color: var(--color-primary);
}

/* ===========================
   UTILITIES
   =========================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-muted-foreground); }

.bg-primary { background-color: var(--color-primary); }
.bg-card { background-color: var(--color-card); }
.bg-muted { background-color: var(--color-muted); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.pt-1 { padding-top: var(--spacing-xs); }
.pt-2 { padding-top: var(--spacing-sm); }
.pt-3 { padding-top: var(--spacing-md); }
.pt-4 { padding-top: var(--spacing-lg); }

.pb-1 { padding-bottom: var(--spacing-xs); }
.pb-2 { padding-bottom: var(--spacing-sm); }
.pb-3 { padding-bottom: var(--spacing-md); }
.pb-4 { padding-bottom: var(--spacing-lg); }

/* ===========================
   RESPONSIVE UTILITIES
   =========================== */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
  .show-mobile { display: none !important; }
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 100000;
  padding: 1rem 1.5rem;
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.skip-link:focus {
  top: 0;
}

/* ===========================
   WORDPRESS SPECIFIC
   =========================== */
.alignleft {
  float: left;
  margin-right: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.alignright {
  float: right;
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

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

.sticky {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--spacing-md);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-sm);
}

.bypostauthor {
  background-color: rgba(183, 25, 92, 0.05);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
}
