/* ========================================
   HRStudyPro Component Library
   Reusable UI Components
   ======================================== */

/* ========================================
   1. LAYOUT
   ======================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-narrow {
  max-width: 800px;
}

/* ========================================
   2. BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-quad);
  min-height: 48px;
}

.btn:focus-visible {
  box-shadow: var(--focus-ring);
}

.btn-primary {
  background-color: var(--green);
  color: white;
}

.btn-primary:hover {
  background-color: var(--green-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: white;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-secondary:hover {
  background-color: var(--green);
  color: white;
}

.btn-coral {
  background-color: var(--coral);
  color: white;
}

.btn-coral:hover {
  background-color: #C47A5F;
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ========================================
   3. CARDS
   ======================================== */

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease-out-quad), box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--cream-dark);
}

.card-flat:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--green-light);
}

/* ========================================
   4. FORMS
   ======================================== */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: white;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: var(--focus-ring);
}

.form-input.error {
  border-color: var(--error);
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--space-1);
  display: none;
}

.form-input.error + .form-error {
  display: block;
}

.form-success {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: var(--space-1);
}

.form-help {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: var(--space-1);
}

.form-loading {
  opacity: 0.7;
  pointer-events: none;
}

.form-loading button[type="submit"] {
  cursor: wait;
}

.form-loading .form-input {
  position: relative;
}

.form-loading .form-input::after {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--space-4);
  width: 20px;
  height: 20px;
  border: 2px solid var(--cream-dark);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  transform: translateY(-50%);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   5. SITE HEADER
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid var(--cream-dark);
  padding: var(--space-4) 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--green-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--green);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
}

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: 1px solid var(--cream-dark);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* ========================================
   6. SITE FOOTER
   ======================================== */

.site-footer {
  background: var(--text-dark);
  color: white;
  padding: var(--space-12) 0 var(--space-6);
  margin-top: var(--space-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

.footer-legal {
  display: flex;
  gap: var(--space-4);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-legal a:hover {
  color: white;
}

.footer-disclaimers {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.footer-disclaimers p {
  margin-bottom: var(--space-2);
}

.footer-credential {
  color: #D4876C;
  font-weight: 500;
  font-size: 0.875rem;
  margin: 0.25rem 0;
}

/* ========================================
   7. ALERTS
   ======================================== */

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
}

.alert-warning {
  background: var(--warning-bg);
  color: #8B6914;
}

/* ========================================
   8. CONTENT CREDIBILITY SECTION
   ======================================== */

.content-credibility {
  padding: 4rem 0;
  background: #F5F2ED;
}

.credibility-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #2D2A26;
  margin-bottom: 1.5rem;
}

.credibility-content > p {
  font-size: 1.1rem;
  color: #4A4540;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 800px;
}

.credibility-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.credibility-feature {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
}

.credibility-feature strong {
  display: block;
  color: #2D5A47;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.credibility-feature span {
  color: #4A4540;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================================
   9. ABOUT PAGE SECTIONS
   ======================================== */

/* About Hero */
.about-hero {
  padding: 5rem 0 3rem;
  text-align: center;
  background: var(--cream);
}

.about-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #2D2A26;
  margin-bottom: 1rem;
}

.about-hero p {
  font-size: 1.25rem;
  color: #6B6560;
  max-width: 600px;
  margin: 0 auto;
}

/* Founder Story Section */
.founder-story {
  padding: 4rem 0;
  background: white;
}

.story-content {
  max-width: 800px;
  margin: 0 auto;
}

.story-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #2D2A26;
  margin-bottom: 2rem;
}

.story-body p {
  font-size: 1.1rem;
  color: #4A4540;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.founder-credential {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #E8E4DE;
}

.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(45, 90, 71, 0.08);
  padding: 1rem 1.5rem;
  border-radius: 12px;
}

.credential-icon {
  width: 40px;
  height: 40px;
  background: #2D5A47;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.credential-text strong {
  display: block;
  color: #2D5A47;
  font-size: 1.1rem;
}

.credential-text span {
  color: #4A4540;
  font-size: 0.9rem;
}

/* Our Approach Section */
.our-approach {
  padding: 4rem 0;
  background: #F5F2ED;
}

.our-approach h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #2D2A26;
  margin-bottom: 2.5rem;
  text-align: center;
}

.approach-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.approach-point {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(45, 42, 38, 0.06);
}

.approach-point h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #2D5A47;
  margin-bottom: 0.75rem;
}

.approach-point p {
  color: #4A4540;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* About CTA Section */
.about-cta {
  padding: 4rem 0;
  text-align: center;
  background: #E8E4DE;
}

.about-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #2D2A26;
  margin-bottom: 1rem;
}

.about-cta p {
  color: #6B6560;
  max-width: 500px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .about-hero h1 {
    font-size: 2rem;
  }

  .story-content h2,
  .our-approach h2,
  .about-cta h2 {
    font-size: 1.75rem;
  }

  .approach-points {
    grid-template-columns: 1fr;
  }
}
