/* Performance & CLS Optimizations */

/* Prevent layout shifts from font loading */
@font-face {
  font-family: -apple-system;
  font-display: swap;
}

/* Reserve space for hero section to prevent CLS */
.hero {
  min-height: 400px;
}

/* Reserve space for tools section */
.tools {
  min-height: 800px;
}

/* Reserve space for getting started section */
.getting-started {
  min-height: 600px;
}

/* Getting Started & Workflows - Move from inline styles */
.getting-started {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%);
  border-top: 3px solid #2563eb;
  border-bottom: 3px solid #2563eb;
}

.getting-started .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.getting-started .section-title {
  margin-bottom: 15px;
}

.getting-started .section-description {
  color: #6b7280;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

.getting-started .guides-button {
  background: #2563eb;
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.getting-started .guides-button:hover {
  background: #1d4ed8;
}

/* Popular Combinations Container */
.combinations-container {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}

.combinations-title {
  text-align: center;
  color: #1f2937;
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.combinations-subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 40px;
}

.combinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

/* Combination Cards */
.combination-card {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  min-height: 180px; /* Prevent layout shift */
}

.combination-card.pdf-workflow {
  border-left: 4px solid #8b5cf6;
}

.combination-card.image-pipeline {
  border-left: 4px solid #f59e0b;
}

.combination-card.marketing-materials {
  border-left: 4px solid #10b981;
}

.combination-card h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
}

.combination-card.pdf-workflow h4 { color: #8b5cf6; }
.combination-card.image-pipeline h4 { color: #f59e0b; }
.combination-card.marketing-materials h4 { color: #10b981; }

.combination-card p {
  color: #6b7280;
  margin: 10px 0 15px 0;
  font-size: 0.95rem;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-link {
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.tool-link.pdf { background: #8b5cf6; }
.tool-link.image { background: #f59e0b; }
.tool-link.utility { background: #10b981; }

/* Quick Stats */
.quick-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #e5e7eb;
}

.stat-item {
  text-align: center;
  min-width: 80px; /* Prevent layout shift */
}

.stat-number {
  color: #2563eb;
  font-weight: 700;
  font-size: 1.3rem;
}

.stat-label {
  color: #6b7280;
  font-size: 0.9rem;
}

/* AdSense placeholder to prevent CLS */
.adsbygoogle {
  min-height: 250px; /* Reserve space for typical ad size */
  display: block;
}

/* Prevent emoji layout shifts */
.tool-icon,
.logo-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .hero {
    min-height: 300px;
  }
  
  .tools {
    min-height: 1200px;
  }
  
  .getting-started {
    min-height: 800px;
  }
  
  .combinations-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-stats {
    flex-direction: column;
    gap: 20px;
  }
  
  .contact-methods-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-title,
  .about-title {
    font-size: 1.8rem;
  }
  
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .header-left {
    position: static;
    transform: none;
    margin-bottom: 10px;
  }
  
  .header-center {
    text-align: center;
  }
  
  .contact-card {
    min-height: 250px;
  }
  
  .mission-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-section-title {
    font-size: 1.8rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .different-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .problem-title,
  .values-title,
  .different-title,
  .about-contact-title {
    font-size: 1.8rem;
  }
  
  .about-contact-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* Optimize font loading */
.logo,
.hero-title,
.section-title {
  font-display: swap;
}

/* Prevent flash of unstyled content */
body {
  opacity: 0;
  animation: fadeIn 0.1s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Critical CSS for above-the-fold content */
.header,
.hero {
  contain: layout style;
}

/* Force hero banner size reduction */
body .hero:not(.hero-main) {
  padding: 25px 0 !important;
}

/* Specific overrides for all secondary pages */
body .hero.contact-hero,
body .hero.about-hero,
body .hero.guides-hero {
  padding: 25px 0 !important;
}

/* Header Navigation */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-left {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.header-center {
  flex: 1;
  text-align: center;
}

.back-home-btn {
  background: #2563eb;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.back-home-btn:hover {
  background: #1d4ed8;
}

/* Contact Page Styles */
.hero.contact-hero,
body .hero.contact-hero {
  padding: 25px 0 !important;
}

.contact-title {
  font-size: 2.2rem;
}

.contact-subtitle {
  max-width: 700px;
}

.contact-main {
  padding: 80px 0;
  background: #fff;
}

.contact-methods {
  margin-bottom: 80px;
  text-align: center;
}

.contact-section-title {
  color: #1f2937;
  font-size: 2rem;
  margin-bottom: 50px;
}

.contact-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-card {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  min-height: 280px; /* Prevent layout shift */
}

.support-card {
  border-top: 4px solid #2563eb;
}

.business-card {
  border-top: 4px solid #10b981;
}

.legal-card {
  border-top: 4px solid #f59e0b;
}

.contact-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.contact-card-title {
  margin-bottom: 15px;
}

.support-title {
  color: #2563eb;
}

.business-title {
  color: #10b981;
}

.legal-title {
  color: #f59e0b;
}

.contact-card-description {
  color: #6b7280;
  margin-bottom: 25px;
}

.contact-email-btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  color: white;
  text-align: center;
  width: fit-content;
  margin: 0 auto;
  font-size: 0.9rem;
}

.support-btn {
  background: #2563eb;
}

.business-btn {
  background: #10b981;
}

.legal-btn {
  background: #f59e0b;
}

.contact-response-time {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 15px;
}

/* About Page Styles */
.hero.about-hero,
body .hero.about-hero,
.hero.guides-hero,
body .hero.guides-hero {
  padding: 25px 0 !important;
}

/* Guides Page Styles */
.guides-hero {
  padding: 25px 0 !important;
}

.guides-title {
  font-size: 2.2rem;
}

.guides-subtitle {
  max-width: 700px;
}

.about-title {
  font-size: 2.2rem;
}

.about-subtitle {
  max-width: 700px;
}

.about-main {
  padding: 80px 0;
  background: #fff;
}

.about-section {
  margin-bottom: 80px;
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-section-title {
  color: #1f2937;
  font-size: 2rem;
  margin-bottom: 30px;
}

.mission-text {
  color: #4b5563;
  line-height: 1.7;
  font-size: 1.1rem;
}

.mission-paragraph {
  margin-bottom: 20px;
}

.mission-paragraph-last {
  margin-bottom: 0;
}

.mission-highlight {
  color: #2563eb;
}

.mission-callout {
  background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
}

.mission-callout-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.mission-callout-title {
  color: #1f2937;
  margin-bottom: 15px;
}

.mission-callout-text {
  color: #6b7280;
  margin: 0;
}

/* Why We're Different Section */
.different-section {
  background: #f8fafc;
  padding: 60px 40px;
  border-radius: 16px;
  margin-bottom: 80px;
}

.different-title {
  text-align: center;
  color: #1f2937;
  font-size: 2rem;
  margin-bottom: 50px;
}

.different-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.different-item {
  text-align: center;
}

.different-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
  color: white;
}

.blue-icon {
  background: #2563eb;
}

.green-icon {
  background: #10b981;
}

.orange-icon {
  background: #f59e0b;
}

.different-item-title {
  color: #1f2937;
  margin-bottom: 15px;
}

.different-item-text {
  color: #6b7280;
  margin: 0;
}

/* Values Section */
.values-section {
  margin-bottom: 80px;
}

.values-title {
  text-align: center;
  color: #1f2937;
  font-size: 2rem;
  margin-bottom: 50px;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Problem Section */
.problem-section {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 60px 40px;
  border-radius: 16px;
  margin-bottom: 80px;
  text-align: center;
}

.problem-title {
  font-size: 2rem;
  margin-bottom: 30px;
}

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

.problem-paragraph-large {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

.problem-paragraph-medium {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.problem-quote {
  background: rgba(255,255,255,0.1);
  padding: 30px;
  border-radius: 12px;
}

.problem-quote-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

/* About Contact Section */
.about-contact-section {
  text-align: center;
}

.about-contact-title {
  color: #1f2937;
  font-size: 2rem;
  margin-bottom: 30px;
}

.about-contact-description {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.about-contact-btn {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn {
  background: #2563eb;
  color: white;
}

.secondary-btn {
  background: white;
  color: #2563eb;
  border: 2px solid #2563eb;
}