/* ============================================
   TEXT ALIGNMENT & TYPOGRAPHY UNIFIED SYSTEM
   FOR ARTWORKS DIGITAL
   ============================================ */

/* ============================================
   1. GLOBAL TEXT ALIGNMENT RULES
   ============================================ */

/* Default text alignment for main content */
body {
  text-align: left;
}

/* Center alignment for hero sections and key content */
.section-header,
.cta-section,
.pricing-header,
.process-step {
  text-align: center !important;
}

/* Left alignment for content sections */
.feature-card,
.advantage-card,
.blog-content,
.article-content {
  text-align: left;
}

/* ============================================
   2. HEADING HIERARCHY & ALIGNMENT
   ============================================ */

/* Main headings - centered for impact */
h1, .h1,
.section-title,
.page-title {
  text-align: center;
  margin-bottom: 1rem;
}

.hero-title {
  text-align: left;
  margin-bottom: 1rem;
}

/* Subheadings - centered for hero sections */
.section-subtitle,
.page-subtitle {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-description {
  text-align: left;
  margin-bottom: 1.5rem;
}

/* Feature/Card headings - left aligned */
.feature-card h2,
.feature-card h3,
.advantage-card h3,
.blog-card h3 {
  text-align: left;
}

/* Card descriptions - left aligned */
.feature-card p,
.advantage-card p,
.blog-card p {
  text-align: left;
}

/* ============================================
   3. PARAGRAPH & CONTENT ALIGNMENT
   ============================================ */

/* Default paragraph alignment */
p {
  text-align: left;
  line-height: 1.6;
}

/* Centered paragraphs for hero and CTA sections */
.cta-section p,
.section-header p {
  text-align: center;
}

/* Step descriptions - centered */
.step-title,
.step-description {
  text-align: center !important;
}

.step-number {
  text-align: center !important;
}

.hero-section p {
  text-align: left;
}

/* Left-aligned content blocks */
.content-block,
.text-content,
.article-body {
  text-align: left;
}

/* ============================================
   4. BUTTON & CTA ALIGNMENT
   ============================================ */

/* Center align button containers */
.cta-actions,
.portfolio-cta-actions,
.button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 auto;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
}

/* Individual buttons are centered within flex containers */
.cta-actions > *,
.portfolio-cta-actions > * {
  text-align: center;
}

.hero-actions > * {
  text-align: left;
}

/* Form buttons - center aligned */
.form-actions,
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ============================================
   5. LIST & GRID ALIGNMENT
   ============================================ */

/* Feature lists - left aligned */
ul, ol {
  text-align: left;
  padding-left: 1.5rem;
}

/* Grid containers */
.features-grid,
.advantages-grid,
.pricing-grid,
.blog-grid {
  text-align: left;
}

/* Individual grid items */
.grid-item {
  text-align: left;
}

/* ============================================
   6. FORM & INPUT ALIGNMENT
   ============================================ */

/* Form labels - left aligned */
label,
.form-label {
  text-align: left;
  display: block;
  margin-bottom: 0.5rem;
}

/* Input fields - left aligned text */
input,
textarea,
select {
  text-align: left;
}

/* Form headers - centered */
.form-header,
.form-title {
  text-align: center;
}

/* Form descriptions - centered */
.form-description {
  text-align: center;
  margin-bottom: 2rem;
}

/* ============================================
   7. FOOTER ALIGNMENT
   ============================================ */

/* Footer sections */
.footer-section {
  text-align: left;
}

/* Footer heading */
.footer-section h4 {
  text-align: left;
  margin-bottom: 1rem;
}

/* Footer links */
.footer-links {
  text-align: left;
}

/* Footer copyright - center */
.footer-bottom,
.footer-copyright {
  text-align: center;
}

/* ============================================
   8. NAVIGATION ALIGNMENT
   ============================================ */

/* Nav links - centered in mobile */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Mobile menu - center aligned */
.mobile-menu {
  text-align: center;
}

.mobile-link {
  text-align: center;
  display: block;
}

/* ============================================
   9. RESPONSIVE ALIGNMENT ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  /* Mobile: Center key sections */
  .section-header {
    text-align: center;
  }

  /* Mobile: Keep content left-aligned */
  .feature-card,
  .advantage-card,
  .blog-card {
    text-align: left;
  }

  /* Mobile: Center buttons */
  .cta-actions,
  .portfolio-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions > *,
  .portfolio-cta-actions > * {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-actions > * {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }

  /* Mobile: Center align stats */
  .hero-stats {
    justify-content: flex-start;
    text-align: left;
  }

  .stat-item {
    text-align: left;
  }
}

@media (max-width: 480px) {
  /* Small mobile: Force left for hero */
  .hero-title,
  .hero-description {
    text-align: left;
  }

  /* Small mobile: Reduce padding but keep alignment */
  .section-header {
    text-align: center;
    padding: 0 1rem;
  }
}

/* ============================================
   10. UTILITY CLASSES
   ============================================ */

/* Text alignment utilities */
.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-justify {
  text-align: justify !important;
}

/* Alignment for specific content types */
.content-centered {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.content-wide {
  text-align: left;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   11. MARGIN & PADDING CONSISTENCY
   ============================================ */

/* Consistent vertical spacing */
.section {
  padding: 80px 20px;
}

.section-header {
  margin-bottom: 48px;
}

.hero-section {
  padding: 120px 20px 80px;
}

/* Content spacing */
h1, .h1 {
  margin-bottom: 24px;
}

h2, .h2 {
  margin-bottom: 20px;
}

h3, .h3 {
  margin-bottom: 16px;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ============================================
   12. RESPONSIVE SPACING
   ============================================ */

@media (max-width: 768px) {
  .section {
    padding: 60px 20px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .hero-section {
    padding: 100px 20px 60px;
  }

  h1, .h1 {
    margin-bottom: 20px;
  }

  h2, .h2 {
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 16px;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .hero-section {
    padding: 80px 16px 40px;
  }

  h1, .h1 {
    margin-bottom: 16px;
  }
}

/* ============================================
   13. SPECIAL CASES
   ============================================ */

/* Blog article content - justified on desktop */
@media (min-width: 769px) {
  .article-content p,
  .blog-content p {
    text-align: justify;
  }
}

/* Testimonials - center aligned */
.testimonial,
.review-card {
  text-align: center;
}

.testimonial-text {
  text-align: center;
  font-style: italic;
}

/* Pricing cards - center content */
.pricing-card {
  text-align: center;
}

.pricing-card h3,
.pricing-card .price,
.pricing-card ul {
  text-align: center;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
}

/* Stats and numbers - center */
.stat-value,
.number-stat,
.metric {
  text-align: center;
  font-weight: 700;
}

.stat-label,
.metric-label {
  text-align: center;
}

/* ============================================
   14. ACCESSIBILITY
   ============================================ */

/* Ensure proper reading order */
.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;
}

/* Focus states maintain alignment */
*:focus-visible {
  outline: 3px solid var(--primary, #3B82F6);
  outline-offset: 2px;
}

/* High contrast mode: force visible outline */
@media (prefers-contrast: more) {
  *:focus-visible {
    outline: 4px solid #3B82F6;
    outline-offset: 3px;
  }
}
