/**
 * pages.css - Page-specific styles for D&H Engraving website
 * 
 * Purpose: Define unique styles for individual pages
 * Dependencies: base.css (for CSS variables)
 * 
 * Contents:
 * 1. About Page Timeline
 * 2. Review Page Styles
 * 3. Coupon Page Styles
 * 4. Privacy Page Styles
 * 
 * Page-specific styles that don't fit into reusable components
 */

/* ============================================
   1. ABOUT PAGE / TIMELINE STYLES
   ============================================ */

/* About page container */
.about-container {
  padding: var(--spacing-xl) var(--spacing-md); /* Standard padding */
  max-width: 75rem; /* Max width */
  margin: 0 auto; /* Center */
}

/* Mobile adjustments for about container */
@media (max-width: 48rem) {
  .about-container {
    padding: 0.5rem 0.25rem; /* 50% reduced padding on mobile - was 1rem 0.5rem */
  }
}

/* Timeline main container */
.timeline {
  position: relative; /* For positioning the line */
  max-width: 75rem; /* 1200px max width */
  margin: 0 auto; /* Center the timeline */
  padding: 1.5rem 0; /* Vertical padding */
}

/* Timeline vertical line */
.timeline::after {
  content: ''; /* Empty content for pseudo-element */
  position: absolute; /* Position absolutely */
  width: 0.1875rem; /* 3px width */
  background-color: var(--color-primary); /* Brand blue color */
  top: 0; /* Start at top */
  bottom: 0; /* Extend to bottom */
  left: 50%; /* Position at center */
  margin-left: -0.09375rem; /* Offset half the width (-1.5px) */
}

/* Timeline item container */
.timeline-item {
  padding: 0.625rem 2.5rem; /* 10px top/bottom, 40px sides */
  position: relative; /* For positioning */
  width: 50%; /* Half width for alternating layout */
  box-sizing: border-box; /* Include padding in width */
  margin-bottom: 1.5rem; /* Space between items */
}

/* Odd timeline items (left side) */
.timeline-item:nth-child(odd) {
  left: 0; /* Align to left */
  padding-right: 0; /* Remove right padding */
  padding-left: 3.75rem; /* 60px left padding */
}

/* Even timeline items (right side) */
.timeline-item:nth-child(even) {
  left: 50%; /* Position on right */
  padding-left: 0; /* Remove left padding */
  padding-right: 3.75rem; /* 60px right padding */
}

/* Timeline content card */
.timeline-content {
  padding: 1.5rem; /* Internal padding */
  background: white; /* White background */
  border-radius: var(--radius-md); /* Rounded corners */
  box-shadow: 0 0.125rem 0.625rem var(--color-shadow-light); /* Light shadow */
  position: relative; /* For positioning */
  transition: transform var(--transition-base), /* Smooth transform */
              box-shadow var(--transition-base); /* Smooth shadow */
  font-size: 0.95em; /* Slightly smaller text */
  line-height: 1.5; /* Comfortable line height */
}

/* Timeline content hover effect */
.timeline-content:hover {
  transform: translateY(-0.3125rem); /* 5px lift on hover */
  box-shadow: 0 0.3125rem 0.9375rem var(--color-shadow); /* Enhanced shadow */
}

/* Timeline year heading */
.timeline-year {
  font-weight: var(--font-weight-bold); /* Bold text */
  color: var(--color-primary); /* Brand blue */
  font-size: 1.3rem; /* Larger text for year */
  margin-bottom: 0.3rem; /* Space below */
}

/* Timeline description container */
.timeline-desc {
  color: #555; /* Gray text */
  line-height: 1.6; /* Comfortable line height */
  display: flex; /* Flexbox layout */
  flex-direction: column; /* Stack content vertically */
  gap: 1.25rem; /* 20px gap between elements */
  align-items: center; /* Center align items */
  contain: content; /* Improve rendering performance */
  content-visibility: auto; /* Skip offscreen rendering */
}

/* Timeline text section */
.timeline-text {
  width: 100%; /* Full width */
  margin-bottom: 0.9375rem; /* 15px space below - desktop */
}

/* Mobile adjustments for timeline text */
@media (max-width: 48rem) {
  .timeline-text {
    margin-bottom: 0.46875rem; /* 50% reduction on mobile - was 0.9375rem */
  }
}

/* Timeline image container */
.timeline-image {
  width: 100%; /* Full width */
  max-width: 18.75rem; /* 300px max width */
  text-align: center; /* Center images */
  margin-top: auto; /* Push to bottom */
}

/* Timeline photo */
.timeline-photo {
  max-width: 100%; /* Responsive width */
  height: auto; /* Maintain aspect ratio */
  border-radius: var(--radius-sm); /* Rounded corners */
  margin-bottom: 0.5rem; /* Space below */
  box-shadow: 0 0.125rem 0.3125rem var(--color-shadow); /* Light shadow */
}

/* Photo caption */
.photo-caption {
  font-size: 0.85em; /* Smaller text */
  color: var(--color-text-light); /* Light gray */
  font-style: italic; /* Italic style */
}

/* Timeline responsive adjustments */
@media (max-width: 48rem) {
  /* Adjust timeline container padding on mobile */
  .timeline {
    padding: 0.75rem 0; /* 50% reduction - was 1.5rem */
  }
  
  /* Adjust timeline for mobile */
  .timeline::after {
    left: 1rem; /* 16px from left - moved closer to edge */
    margin-left: -0.09375rem; /* Adjust offset */
  }
  
  /* Full width timeline items on mobile */
  .timeline-item {
    width: 100%; /* Full width */
    padding-left: 2.5rem; /* 40px left padding - keeping for line space */
    padding-right: 0.375rem; /* 6px right padding - 50% reduction */
    margin-bottom: 0.5rem; /* 50% reduced space between items */
  }
  
  /* Reset odd/even specific styles on mobile */
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    left: 0; /* All items on left */
    padding-left: 2.5rem; /* Same left padding - keeping for line space */
    padding-right: 0.375rem; /* Same right padding - 50% reduction */
  }
  
  /* Reduce padding on content cards for mobile */
  .timeline-content {
    padding: 0.5rem; /* 50% reduction - was 1rem */
  }
  
  /* Adjust year text size on mobile */
  .timeline-year {
    font-size: 1.1rem; /* Slightly smaller */
    margin-bottom: 0.25rem; /* 50% reduction - was 0.5rem */
  }
}

/* ============================================
   2. REVIEW PAGE STYLES
   ============================================ */

/* Reviews main container */
.reviews-container {
  max-width: 75rem; /* 1200px max width */
  margin: 0 auto; /* Center container */
  padding: 2.5rem 1.25rem; /* 40px vertical, 20px horizontal */
}

/* Reviews header card */
.reviews-header {
  text-align: center; /* Center text */
  margin: 0 auto 3.125rem; /* Center with bottom margin */
  max-width: 50rem; /* 800px max width */
  background: white; /* White background */
  border-radius: var(--radius-lg); /* Rounded corners */
  padding: 1.875rem; /* 30px padding */
  box-shadow: 0 0.25rem 0.375rem var(--color-shadow); /* Standard shadow */
}

/* Reviews header title */
.reviews-header h1 {
  font-size: var(--font-size-3xl); /* 2.5rem size */
  color: #2c3e50; /* Dark gray color */
  margin-bottom: 1.25rem; /* Space below */
}

/* Reviews header paragraph */
.reviews-header p {
  font-size: 1.2rem; /* Larger text */
  color: var(--color-text-muted); /* Muted gray */
  max-width: 50rem; /* Match container */
  margin: 0 auto; /* Center */
}

/* Review platforms grid */
.review-platforms {
  display: grid; /* Grid layout */
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr)); /* Responsive columns (300px min) */
  gap: 1.875rem; /* 30px gap */
  margin-top: 2.5rem; /* Space above */
}

/* Platform icon */
.platform-icon {
  font-size: 3rem; /* Large icon */
  margin-bottom: 1.25rem; /* Space below */
  color: #3498db; /* Light blue color */
}

/* Platform card heading */
.platform-card h3 {
  font-size: 1.5rem; /* Large heading */
  margin-bottom: 0.9375rem; /* Space below */
  color: #2c3e50; /* Dark gray */
}

/* Platform card paragraph */
.platform-card p {
  color: var(--color-text-muted); /* Muted gray */
  margin-bottom: 1.5625rem; /* Space below */
  min-height: 3.75rem; /* 60px minimum height */
}

/* Review button */
.btn-review {
  display: inline-block; /* Allow dimensions */
  background: #3498db; /* Light blue */
  color: white; /* White text */
  padding: 0.75rem 1.5625rem; /* 12px × 25px */
  border-radius: 3.125rem; /* 50px rounded */
  text-decoration: none; /* No underline */
  font-weight: var(--font-weight-medium); /* Medium weight */
  transition: background var(--transition-base); /* Smooth transition */
  border: none; /* No border */
  cursor: pointer; /* Pointer cursor */
  font-size: var(--font-size-base); /* Standard size */
}

/* Review button hover */
.btn-review:hover {
  background: #2980b9; /* Darker blue */
  color: white; /* Keep white text */
  text-decoration: none; /* No underline */
}

/* Thank you section */
.thank-you {
  text-align: center; /* Center text */
  margin: 3.125rem auto 0; /* Top margin and center */
  max-width: 50rem; /* 800px max width */
  padding: 1.875rem; /* 30px padding */
  background: white; /* White background */
  border-radius: var(--radius-lg); /* Rounded corners */
  box-shadow: 0 0.25rem 0.375rem var(--color-shadow); /* Shadow */
}

/* Thank you heading */
.thank-you h2 {
  color: #2c3e50; /* Dark gray */
  margin-bottom: 0.9375rem; /* Space below */
}

/* Logo feature CTA section */
.logo-feature-cta {
  margin: 1.875rem auto 0; /* Top margin and center */
  max-width: 50rem; /* 800px max width */
  text-align: center; /* Center text */
  font-size: var(--font-size-base); /* Standard size */
  color: var(--color-text-muted); /* Muted gray */
  background: white; /* White background */
  border-radius: var(--radius-lg); /* Rounded corners */
  padding: 1.25rem 1.875rem; /* 20px × 30px padding */
  box-shadow: 0 0.25rem 0.375rem var(--color-shadow); /* Shadow */
}

/* Logo feature CTA link */
.logo-feature-cta a {
  color: #3498db; /* Light blue */
  font-weight: var(--font-weight-medium); /* Medium weight */
  text-decoration: none; /* No underline */
}

/* Logo feature CTA link hover */
.logo-feature-cta a:hover {
  text-decoration: underline; /* Add underline on hover */
}

/* Review page responsive */
@media (max-width: 48rem) {
  /* Single column on mobile */
  .review-platforms {
    grid-template-columns: 1fr; /* Single column */
  }
  
  /* Smaller heading on mobile */
  .reviews-header h1 {
    font-size: var(--font-size-2xl); /* 2rem size */
  }
}

/* ============================================
   3. COUPON PAGE STYLES
   ============================================ */

/* Coupon main container */
.coupon-main {
  flex: 1; /* Take remaining space */
  display: flex; /* Flexbox layout */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  padding: var(--spacing-xl); /* Padding around */
}

/* Coupon container */
.coupon-container {
  max-width: 50rem; /* 800px max width */
  margin: var(--spacing-xl) auto; /* Center with margins */
  padding: var(--spacing-xl); /* Internal padding */
  background: white; /* White background */
  border-radius: var(--radius-md); /* Rounded corners */
  box-shadow: 0 0.125rem 0.625rem var(--color-shadow); /* Shadow */
}

/* Coupon header */
.coupon-header {
  text-align: center; /* Center text */
  margin-bottom: var(--spacing-xl); /* Space below */
}

/* Coupon header title */
.coupon-header h1 {
  color: var(--color-primary); /* Brand blue */
  margin-bottom: var(--spacing-md); /* Space below */
}

/* Coupon code display */
.coupon-code {
  font-size: var(--font-size-3xl); /* Large text */
  font-weight: var(--font-weight-bold); /* Bold */
  color: #d32f2f; /* Red color */
  margin: var(--spacing-lg) 0; /* Vertical margins */
  padding: var(--spacing-md) var(--spacing-xl); /* Padding */
  background: #fff8e1; /* Light yellow background */
  border: 0.125rem dashed #ffc107; /* Dashed yellow border */
  border-radius: 0.3125rem; /* 5px rounded corners */
  display: inline-block; /* Allow dimensions */
}

/* Coupon details */
.coupon-details {
  margin: var(--spacing-xl) 0; /* Vertical margins */
  text-align: center; /* Center text */
}

/* Coupon details paragraphs */
.coupon-details p {
  margin-bottom: var(--spacing-md); /* Space below */
  line-height: 1.6; /* Comfortable line height */
}

/* Discount amount text */
.discount-amount {
  font-size: 1.2rem; /* Larger text */
  font-weight: var(--font-weight-semibold); /* Semi-bold */
  color: var(--color-primary); /* Brand blue */
  margin: var(--spacing-lg) 0; /* Vertical margins */
}

/* Coupon terms */
.coupon-terms {
  font-size: 0.85rem; /* Small text */
  color: var(--color-text-secondary); /* Gray text */
  margin: var(--spacing-xl) auto 0; /* Top margin and center */
  padding: var(--spacing-md) 0 0; /* Top padding */
  max-width: 90%; /* Don't fill full width */
  text-align: center; /* Center text */
  border-top: 0.0625rem solid var(--color-border); /* Top border */
  font-style: italic; /* Italic style */
}

/* Coupon responsive adjustments */
@media (max-width: 48rem) {
  /* Adjust coupon container on mobile */
  .coupon-container {
    margin: var(--spacing-md); /* Smaller margins */
    padding: var(--spacing-lg); /* Smaller padding */
  }
  
  /* Smaller coupon code on mobile */
  .coupon-code {
    font-size: var(--font-size-2xl); /* 2rem size */
    padding: 0.75rem var(--spacing-lg); /* Smaller padding */
  }
}

/* ============================================
   4. PRIVACY PAGE STYLES
   ============================================ */

/* Privacy content container */
.privacy-content {
  max-width: var(--container-md); /* 1000px max width */
  margin: var(--spacing-xl) auto var(--spacing-2xl); /* Margins */
  padding: var(--spacing-xl); /* Internal padding */
}

/* Privacy content headings */
.privacy-content h2 {
  margin: var(--spacing-xl) 0 var(--spacing-md); /* Vertical margins */
  padding-bottom: var(--spacing-sm); /* Bottom padding */
  border-bottom: 0.0625rem solid var(--color-border-light); /* Bottom border */
}

/* Last updated notice */
.last-updated {
  color: var(--color-text-secondary); /* Gray text */
  font-style: italic; /* Italic style */
  margin-bottom: var(--spacing-xl); /* Space below */
  display: block; /* Block display */
}

/* Minimum supported breakpoint (320px = 20rem) - smallest phones */
@media (max-width: 20rem) {
  /* Timeline ultra-compact */
  .timeline {
    padding: 0.125rem 0; /* 50% of spacing-xs (0.25rem) */
  }
  
  .timeline::after {
    left: 0.75rem; /* 12px from left - even closer to edge */
    width: 0.125rem; /* 2px - thinner line */
  }
  
  .timeline-item {
    padding: 0.125rem 0.25rem 0.125rem 1.75rem; /* Further reduced padding */
    margin-bottom: 0.375rem; /* 50% reduction - was 0.75rem */
  }
  
  .timeline-item::after {
    left: 0.5rem; /* Adjust dot position */
    width: 0.75rem; /* Smaller dot */
    height: 0.75rem; /* Smaller dot */
  }
  
  .timeline-icon {
    left: 0.375rem; /* Adjust icon position */
    font-size: 0.875rem; /* Smaller icon */
  }
  
  .timeline-content {
    padding: 0.375rem; /* 50% reduction - was 0.75rem */
    margin-left: 0.125rem; /* 50% reduction - was 0.25rem */
  }
  
  .timeline-year {
    font-size: 1rem; /* 16px */
    margin-bottom: 0.125rem; /* 50% reduction - was 0.25rem */
  }
  
  .timeline-desc {
    font-size: 0.875rem; /* 14px - keep readable */
  }
  
  /* Reviews ultra-compact */
  .reviews-container {
    padding: var(--spacing-lg) var(--spacing-sm); /* 1.5rem vertical, 0.5rem horizontal */
  }
  
  .reviews-header {
    padding: var(--spacing-md); /* 1rem padding */
    margin-bottom: var(--spacing-lg); /* Less space below */
  }
  
  .reviews-header h1 {
    font-size: 1.5rem; /* 24px */
  }
  
  .reviews-header p {
    font-size: 0.875rem; /* 14px */
  }
  
  .review-platforms {
    gap: var(--spacing-sm); /* 0.5rem gap */
  }
  
  .review-card {
    padding: var(--spacing-sm); /* 0.5rem padding */
  }
  
  .platform-logo {
    height: 2.5rem; /* 40px */
    margin-bottom: var(--spacing-xs); /* Less space */
  }
  
  .platform-name {
    font-size: 1rem; /* 16px */
    margin-bottom: var(--spacing-xs); /* Less space */
  }
  
  .review-card p {
    font-size: 0.75rem; /* 12px */
    margin-bottom: var(--spacing-sm); /* Less space */
  }
  
  .stars {
    font-size: 1rem; /* 16px stars */
    margin: var(--spacing-xs) 0; /* Less margin */
  }
  
  /* Coupon ultra-compact */
  .coupon-container {
    margin: var(--spacing-sm); /* 0.5rem margin */
    padding: var(--spacing-md); /* 1rem padding */
  }
  
  .coupon-header h1 {
    font-size: 1.5rem; /* 24px */
    margin-bottom: var(--spacing-xs); /* Less space */
  }
  
  .coupon-header p {
    font-size: 0.875rem; /* 14px */
  }
  
  .coupon-code {
    font-size: 1.5rem; /* 24px */
    padding: var(--spacing-sm) var(--spacing-md); /* Smaller padding */
    margin: var(--spacing-md) 0; /* Less margin */
  }
  
  .coupon-details {
    padding: var(--spacing-md); /* 1rem padding */
  }
  
  .coupon-details h2 {
    font-size: 1.25rem; /* 20px */
    margin-bottom: var(--spacing-sm); /* Less space */
  }
  
  .coupon-details ul {
    padding-left: 1rem; /* Less indentation */
  }
  
  .coupon-details li {
    font-size: 0.875rem; /* 14px */
    margin-bottom: var(--spacing-xs); /* Less space */
  }
  
  .coupon-disclaimer {
    font-size: 0.75rem; /* 12px */
    padding: var(--spacing-sm); /* 0.5rem padding */
    margin-top: var(--spacing-md); /* Less space above */
  }
  
  /* Privacy content ultra-compact */
  .privacy-content {
    margin: var(--spacing-md) auto; /* Smaller margins */
    padding: var(--spacing-md); /* 1rem padding */
  }
  
  .privacy-content h2 {
    font-size: 1.25rem; /* 20px */
    margin: var(--spacing-md) 0 var(--spacing-sm); /* Smaller margins */
    padding-bottom: var(--spacing-xs); /* Less padding */
  }
  
  .last-updated {
    font-size: 0.75rem; /* 12px */
    margin-bottom: var(--spacing-md); /* Less space */
  }
}

.order-form-iframe-container {
  max-width: 40rem;
  margin: var(--spacing-xl) auto;
  width: 100%;
}

.order-form-iframe {
  width: 100%;
  min-height: 30rem;
  max-height: 100vh;
  border: none;
  display: block;
}

.order-discount-button {
  display: block;
  margin: var(--spacing-xl) auto var(--spacing-lg);
}

.order-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: 1000;
  padding: var(--spacing-md);
  box-sizing: border-box;
}

.order-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.order-modal {
  background: #ffffff;
  border-radius: var(--radius-md);
  max-width: 50rem;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
}

.order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 0.0625rem solid var(--color-border-light);
}

.order-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.order-modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.order-modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  color: var(--color-text-secondary);
}

.order-modal-close:focus {
  outline: none;
}
