/* ========================================
   Phayel Enterprises - Main Stylesheet
   ShadCN-Inspired Design | Mobile First
   ======================================== */

/* CSS Variables - Design Tokens */
:root {
  /* Colors - Light Theme */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 211 61% 43%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 211 61% 43%;
  --success: 142.1 76.2% 36.3%;
  --warning: 38 92% 50%;

  /* Radius */
  --radius: 0.5rem;

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

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --container-padding: 1rem;
  --section-padding: 4rem;
}

/* Dark Theme */
[data-theme="dark"] {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 211 70% 55%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 211 61% 48%;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.875rem; }
  h4 { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.75rem; }
  h2 { font-size: 2.5rem; }
}

p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Section */
.section {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header p {
  font-size: 1.125rem;
  margin-top: 1rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

.btn-secondary:hover {
  background-color: hsl(var(--accent));
}

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

.btn-outline:hover {
  background-color: hsl(var(--accent));
}

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

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

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 0.625rem;
}

/* Cards */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Ensure all content inside cards wraps properly */
.card * {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card-content {
  padding: 1.5rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  accent-color: hsl(var(--primary));
}

.form-hint {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
}

.form-error {
  font-size: 0.8125rem;
  color: hsl(var(--destructive));
  margin-top: 0.375rem;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: hsl(var(--foreground));
}

.navbar-logo img {
  height: 32px;
  width: auto;
}

.navbar-menu {
  display: none;
  list-style: none;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .navbar-menu {
    display: flex;
  }
}

.navbar-menu a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-toggle {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
}

@media (min-width: 768px) {
  .navbar-toggle {
    display: none;
  }
}

/* Mobile Menu */
.mobile-menu {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: hsl(var(--background));
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease, visibility 0.3s, opacity 0.3s;
}

.mobile-menu.active {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu-list {
  list-style: none;
}

.mobile-menu-list a {
  display: block;
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
  background: hsl(var(--accent));
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 6rem 0;
  }
}

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

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: hsl(var(--primary));
}

.hero-description {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
}

@media (min-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

@media (min-width: 768px) {
  .hero-stat-value {
    font-size: 2.25rem;
  }
}

.hero-stat-label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  padding: 1.5rem;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.portfolio-card {
  position: relative;
  overflow: hidden;
}

.portfolio-image {
  aspect-ratio: 16 / 10;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-card-content {
  padding: 1.25rem;
}

.portfolio-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.portfolio-card p {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  word-break: keep-all;
  white-space: nowrap;
}

/* Ensure all text content in portfolio cards wraps */
.portfolio-card p,
.portfolio-card h3,
.portfolio-card h4,
.card p,
.card h3,
.card h4 {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.pricing-card.popular {
  border-color: hsl(var(--primary));
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-header {
  padding: 1.5rem 1.5rem 0;
  text-align: center;
}

.pricing-plan {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.pricing-currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.pricing-amount {
  font-size: 3rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
}

.pricing-period {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.pricing-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
}

.pricing-content {
  flex: 1;
  padding: 1.5rem;
}

.pricing-features {
  list-style: none;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.pricing-features li svg {
  flex-shrink: 0;
  color: hsl(var(--success));
  margin-top: 0.125rem;
}

.pricing-footer {
  padding: 0 1.5rem 1.5rem;
}

.pricing-footer .btn {
  width: 100%;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  padding: 1.5rem;
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  color: hsl(var(--warning));
  margin-bottom: 1rem;
}

.testimonial-content {
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
  font-weight: 600;
  font-size: 0.875rem;
}

.testimonial-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.testimonial-info p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid hsl(var(--border));
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(221 83% 43%) 100%);
  color: white;
  text-align: center;
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  margin: 0 1rem;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 4rem 2rem;
    margin: 0;
  }
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-section .btn {
  background: white;
  color: hsl(var(--primary));
}

.cta-section .btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Footer */
.footer {
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border));
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: hsl(var(--primary));
  color: white;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.footer-links a:hover {
  color: hsl(var(--foreground));
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-legal {
    justify-content: flex-end;
  }
}

.footer-legal a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* About Page */
.about-hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(to bottom, hsl(var(--muted)) 0%, hsl(var(--background)) 100%);
}

@media (min-width: 768px) {
  .about-hero {
    padding: 6rem 0;
  }
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image {
  aspect-ratio: 4 / 3;
  background: hsl(var(--muted));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.value-card {
  text-align: center;
  padding: 1.5rem;
}

.value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 50%;
  margin: 0 auto 1rem;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: var(--radius);
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Payment Form */
.payment-form-card {
  max-width: 500px;
  margin: 0 auto;
}

.order-summary {
  background: hsl(var(--muted));
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.order-summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid hsl(var(--border));
  font-weight: 600;
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: hsl(var(--muted-foreground));
}

.legal-content ul,
.legal-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  text-decoration: underline;
}

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

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.w-full { width: 100%; }

.bg-muted { background: hsl(var(--muted)); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Toast/Alert */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  margin-bottom: 1rem;
}

.alert-success {
  background: hsl(var(--success) / 0.1);
  border-color: hsl(var(--success) / 0.3);
  color: hsl(var(--success));
}

.alert-error {
  background: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.3);
  color: hsl(var(--destructive));
}

.alert-warning {
  background: hsl(var(--warning) / 0.1);
  border-color: hsl(var(--warning) / 0.3);
  color: hsl(var(--warning));
}

/* Process/Steps */
.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process-card {
  text-align: center;
  padding: 1.5rem;
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: hsl(var(--primary));
  color: white;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.badge-success {
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

/* Divider */
.divider {
  height: 1px;
  background: hsl(var(--border));
  margin: 2rem 0;
}

/* Skip Link (Accessibility) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: hsl(var(--primary));
  color: white;
  z-index: 1000;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border-radius: var(--radius);
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .mobile-menu {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}

/* ========================================
   Enhanced Features & Improvements
   ======================================== */

/* Form Error States */
.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: hsl(var(--destructive));
  background-color: hsl(var(--destructive) / 0.05);
}

.form-label.required::after {
  content: " *";
  color: hsl(var(--destructive));
}

/* Enhanced Focus Indicators */
:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Newsletter Signup in Footer */
.footer-newsletter {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.footer-newsletter h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-newsletter p {
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form .form-input {
  flex: 1;
  min-width: 0;
}

.newsletter-form .btn {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* Dark Mode Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  color: hsl(var(--foreground));
  transition: background-color 0.2s ease;
}

.theme-toggle:hover {
  background: hsl(var(--accent));
}

.theme-toggle .theme-icon-light,
.theme-toggle .theme-icon-dark {
  width: 18px;
  height: 18px;
}

.theme-toggle .theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: block;
}

/* Animated Counter */
.counter-value {
  display: inline-block;
}

/* Testimonial Carousel */
.testimonials-carousel {
  position: relative;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonials-carousel .testimonial-card {
  flex: 0 0 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .testimonials-carousel .testimonial-card {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .testimonials-carousel .testimonial-card {
    flex: 0 0 33.333%;
  }
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--border));
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.carousel-dot.active {
  background: hsl(var(--primary));
}

.carousel-arrows {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.carousel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: hsl(var(--primary));
  color: white;
}

.carousel-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Exit Intent Popup */
.exit-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.exit-popup.active {
  opacity: 1;
  visibility: visible;
}

.exit-popup-content {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  position: relative;
}

.exit-popup.active .exit-popup-content {
  transform: scale(1);
}

.exit-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  padding: 0.25rem;
}

.exit-popup-close:hover {
  color: hsl(var(--foreground));
}

.exit-popup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: hsl(var(--primary) / 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
}

.exit-popup-content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.exit-popup-content p {
  margin-bottom: 1.5rem;
  color: hsl(var(--muted-foreground));
}

.exit-popup-content .btn {
  margin-bottom: 1rem;
}

.exit-popup-skip {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
  display: block;
  width: 100%;
}

.exit-popup-skip:hover {
  color: hsl(var(--foreground));
  text-decoration: underline;
}

/* Client Logos Section */
.client-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  opacity: 0.6;
}

.client-logos img {
  height: 32px;
  width: auto;
  filter: grayscale(100%);
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.client-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Loading State for Buttons */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Success/Error States for Forms */
.form-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: hsl(var(--success) / 0.1);
  border: 1px solid hsl(var(--success) / 0.3);
  border-radius: var(--radius);
  color: hsl(var(--success));
  margin-bottom: 1rem;
}

.form-success svg {
  flex-shrink: 0;
}

/* ========================================
   Mobile Text Size Adjustments
   ======================================== */
@media (max-width: 480px) {
  /* Base typography */
  body {
    font-size: 0.9375rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }

  /* Hero section */
  .hero-description {
    font-size: 1rem;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-stat-label {
    font-size: 0.8125rem;
  }

  /* Section headers */
  .section-header p {
    font-size: 1rem;
  }

  .section-badge {
    font-size: 0.8125rem;
    padding: 0.2rem 0.625rem;
  }

  /* Cards */
  .service-card p,
  .portfolio-card p,
  .testimonial-content {
    font-size: 0.8125rem;
  }

  /* Pricing */
  .pricing-amount {
    font-size: 2.25rem;
  }

  .pricing-currency {
    font-size: 1.25rem;
  }

  .pricing-features li {
    font-size: 0.8125rem;
  }

  /* Legal pages */
  .legal-content p,
  .legal-content li {
    font-size: 0.875rem;
  }

  .legal-content h2 {
    font-size: 1.25rem;
  }

  .legal-content h3 {
    font-size: 1.125rem;
  }

  /* Buttons */
  .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
  }

  .btn-lg {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }

  /* CTA section */
  .cta-section p {
    font-size: 1rem;
  }

  /* About page */
  .about-hero p {
    font-size: 1rem;
  }

  /* Footer */
  .footer-brand p,
  .footer-links a,
  .footer-bottom p {
    font-size: 0.8125rem;
  }

  /* Mobile menu */
  .mobile-menu-list a {
    font-size: 1rem;
    padding: 0.875rem 0;
  }

  /* Portfolio cards - reduce padding on mobile */
  .card > div > div[style*="padding: 2rem"] {
    padding: 1rem !important;
  }

  /* Portfolio grid layouts - ensure proper wrapping */
  .card div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Headings in cards */
  .card h3 {
    word-break: break-word;
    hyphens: auto;
  }

  /* Portfolio tags wrapping */
  .portfolio-tag {
    font-size: 0.6875rem;
    padding: 0.2rem 0.5rem;
  }
}
