/*
 * Welcome Page Section Styles
 * BWP-inspired full-width section wrapper system
 * Created: 2025-12-29
 */

/* ============================================
   SECTION WRAPPER SYSTEM
   ============================================ */

/* Base wrapper - full-width sections */
.section-wrapper {
  width: 100vw;
  position: relative;
  padding: 40px 20px; /* Mobile-first: 20px sides */
  box-sizing: border-box;
}

.section-inner {
  max-width: 1424px;
  margin-left: auto;
  margin-right: auto;
}

/* Background color variants */
.section-purple {
  background-color: var(--color-primary); /* #6B2D8F */
  color: var(--color-text-light);
}

.section-lavender {
  background-color: var(--color-bg-secondary); /* #E8DFF5 */
  color: var(--color-text-primary);
}

.section-white {
  background-color: var(--color-bg-primary); /* #FFFFFF */
  color: var(--color-text-primary);
}

.section-red {
  background-color: #c62828; /* BWP-style red */
  color: var(--color-text-light);
}

/* Desktop padding adjustment */
@media (min-width: 1024px) {
  .section-wrapper {
    padding: 40px; /* Equal padding on desktop */
  }
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */

.section-heading {
  font-family: Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem); /* 28px → 40px */
  margin-bottom: 2rem;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.25;
}

.section-purple .section-heading {
  color: var(--color-text-light);
}

.lead-paragraph {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: left;

}

@media (max-width: 768px) {
  .about-content p {
    font-size: 16px;
  }
}

/* ============================================
   SERVICES SECTION
   (Extracted from inline styles in _services.html.erb)
   ============================================ */

.services-content {
  padding: 48px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 2rem;
}

.service-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 48px 40px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: var(--radius-md, 8px);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.service-icon-link {
  display: block;
  text-decoration: none;
  text-align: left;
}

.service-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.service-icon i {
  font-size: 60px;
  color: var(--primary-color, var(--color-primary));
  transition: color 0.2s ease;
}

.service-card:hover .service-icon i {
  color: var(--primary-color-dark, var(--color-primary-hover));
}

.service-svg-icon {
  width: 60px;
  height: 60px;
  fill: var(--primary-color, var(--color-primary));
  transition: fill 0.2s ease;
}

.service-card:hover .service-svg-icon {
  fill: var(--primary-color-dark, var(--color-primary-hover));
}

.service-icon-fallback {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  color: var(--primary-color, var(--color-primary));
  font-size: 20px;
  border-radius: 6px;
}

.service-title {
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 20px 0;
  line-height: 1.1;
  text-align: left;
}

.service-title a {
  color: var(--primary-color, var(--color-primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-title a:hover {
  color: var(--primary-color-dark, var(--color-primary-hover));
}

.service-description {
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  flex-grow: 1;
  text-align: left;
}

.service-item {
  margin: 0 0 8px 0;
  padding: 0;
}

/* Responsive - Services */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .service-title {
    font-size: 30px;
  }
}

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

  .service-card {
    padding: 32px 24px;
    min-height: auto;
  }

  .service-icon,
  .service-svg-icon,
  .service-icon-fallback {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .service-title {
    font-size: 24px;
  }

  .service-description {
    font-size: 16px;
    margin-bottom: 24px;
  }
}

/* ============================================
   TESTIMONIALS SECTION
   (Extracted from inline styles in _testimonials.html.erb)
   ============================================ */

.testimonials-content {
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: var(--color-bg-primary); /* White cards */
  padding: 30px;
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.testimonial-content {
  color: var(--color-text-primary); /* Dark text */
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  margin-top: 1rem;
}

.client-name {
  color: var(--color-text-primary); /* Dark text */
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 1rem;
}

.company-name {
  color: var(--color-text-muted, #757575);
  font-size: 0.9rem;
  margin-top: 0;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */

.portfolio-content {
  padding: 48px 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.portfolio-item {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.portfolio-item:hover {
  transform: scale(1.02);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
}

.portfolio-category {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.portfolio-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.portfolio-link:hover {
  text-decoration: underline;
}

.portfolio-description {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.95;
}

.portfolio-cta {
  text-align: center;
  margin-top: 3rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--color-primary, #6B2D8F);
  color: var(--color-text-light, #FFFFFF);
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md, 8px);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  background-color: var(--color-primary-hover, #5a2577);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* Responsive - Portfolio */
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-item {
    min-height: 250px;
  }
}

/* ============================================
   HERO SECTION - BWP STYLE (MOBILE-FIRST)
   ============================================ */

/* Base styles: Mobile (no media query) - matches BWP @media (max-width:600px) */
.hero-container.section-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Push black bar to bottom */
  min-height: 640px; /* Mobile: adjusted for smaller skyline (50% image, 50% black bar) */
  max-height: none; /* BWP mobile: max-height none */
  overflow: visible; /* Allow black bar to show fully */
  padding: 0; /* BWP mobile: no padding - content wrapper handles it */
  margin-top: -1.5em; /* BWP style: negative margin to sit under header */
  z-index: 1000;
  width: 100%; /* Override section-wrapper's 100vw */
}

/* Background image wrapper for animation */
.hero-bgimg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  animation: fadeInHero 1s ease-in 0.5s forwards;
  pointer-events: none; /* Don't block interaction with content */
}

@keyframes fadeInHero {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Skyline background - Mobile-first */
.hero-bgimg {
  position: absolute;
  right: 0;
  bottom: 260px; /* Mobile: position just above black bar (260px black bar height) */
  width: 600px; /* Mobile: smaller, more subtle skyline */
  margin-right: -100px; /* Mobile: less overhang */
  z-index: 0;
  height: 340px; /* Mobile: taller to show full skyline */
  overflow: visible; /* Mobile: don't cut off bottom */
}

.hero-bgimg img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Mobile: contain to show full image */
  object-position: bottom right; /* Mobile: anchor to bottom right */
}


/* Animated element (train/bus) */
.hero-bus {
  display: none; /* Mobile: hide train on iPhone */
  position: absolute;
  z-index: 1;
  bottom: 260px;
  right: 600px;
  width: 50px;
  height: auto;
}

/* Hero content wrapper - BWP mobile: black bar */
.hero-content-wrapper {
  position: relative;
  width: 100%; /* Mobile: full width within container */
  padding: 36px 0; /* Mobile: balanced padding for 50/50 split */
  background-color: #000; /* Mobile: black background */
  z-index: 502;
  flex-shrink: 0; /* Prevent black bar from shrinking */
  min-height: 260px; /* Mobile: black bar ~50% of 640px total */
}

/* Hero grid/content layout - Mobile */
.hero-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto; /* BWP mobile: no min-height */
  padding: 0; /* Mobile: no padding - content handles it */
  position: relative;
  z-index: 1;
}

/* Hero content - Mobile */
.hero-content {
  padding: 0 20px; /* BWP mobile: content padding */
  max-width: 100%;
  color: #FFFFFF;
}

.hero-content h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 32px; /* BWP mobile: fixed 32px */
  font-weight: 500; /* BWP: font-weight 500 */
  line-height: 1.15; /* BWP h1: line-height 1.15 */
  margin-bottom: 12px; /* Space between heading and paragraph */
  margin-top: 0;
  letter-spacing: 1%;
  color: #FFFFFF;
  text-shadow: none;
}

.hero-content p {
  font-size: 16px !important; /* BWP mobile: 16px with !important */
  line-height: 1.5;
  font-weight: 500;
  color: #FFFFFF;
  opacity: 1;
  text-shadow: none;
  margin-bottom: 0; /* Remove bottom margin */
  margin-top: 0; /* Remove top margin */
  max-width: 100%; /* Full width on mobile */
}

/* Tablet/Medium: 601px - 900px */
@media (min-width: 601px) and (max-width: 900px) {
  .hero-container.section-wrapper {
    display: block; /* Reset flexbox on tablet */
    min-height: 450px;
    max-height: 500px; /* BWP: @media (max-width:1100px) */
    padding: 0 20px; /* Restore padding for tablet */
  }

  .hero-bgimg {
    bottom: 0; /* Tablet: reset to bottom */
    width: 800px; /* Tablet: medium size */
    margin-right: -80px;
    height: auto; /* Reset height constraint */
    overflow: visible;
  }

  .hero-bgimg img {
    object-fit: cover; /* Tablet: back to cover */
    object-position: center;
  }

  .hero-bus {
    display: block; /* Tablet: show train */
    bottom: -15px; /* Reset train position on tablet */
    right: 800px; /* Tablet: adjust for medium skyline width */
    width: 75px; /* Tablet: medium train size */
  }

  .hero-content-wrapper {
    position: absolute; /* BWP tablet: absolute positioning */
    top: 0;
    left: 0;
    right: 0; /* Tablet: full width */
    width: 100%; /* Tablet: full width to prevent text from stacking */
    max-width: 1424px; /* Tablet: BWP constraint */
    margin: 0 auto;
    padding: 0;
    background-color: transparent; /* Remove black bar on tablet+ */
    min-height: auto; /* Reset min-height */
  }

  .hero-grid {
    display: flex; /* Tablet: ensure flexbox */
    flex-direction: column; /* Tablet: column layout for content */
    justify-content: center;
    min-height: 450px;
    padding-top: 120px; /* BWP: @media (max-width:820px) */
    padding-bottom: 24px;
  }

  .hero-content {
    padding: 0;
    max-width: 750px;
    width: auto; /* Tablet: auto width, not constrained */
  }

  .hero-content h1 {
    font-size: 42px; /* BWP: @media (max-width:900px) */
    white-space: normal; /* Tablet: allow normal text wrapping */
    word-break: normal; /* Tablet: normal word breaking */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Tablet: restore shadow for readability */
  }

  .hero-content p {
    font-size: 18px !important;
    white-space: normal; /* Tablet: allow normal text wrapping */
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); /* Tablet: restore shadow for readability */
    opacity: 0.95;
  }
}

/* Desktop: 901px and up */
@media (min-width: 901px) {
  .hero-container.section-wrapper {
    display: block; /* Reset flexbox on desktop */
    min-height: 450px;
    padding: 0 40px; /* BWP desktop: 40px sides */
  }

  .hero-bgimg {
    bottom: 0; /* Desktop: reset to bottom */
    width: 1030px; /* Desktop: Dice Media Group's fixed width */
    margin-right: -120px;
    height: auto; /* Reset height constraint */
    overflow: visible;
  }

  .hero-bgimg img {
    object-fit: cover; /* Desktop: back to cover */
    object-position: center;
  }

  .hero-bus {
    display: block; /* Desktop: show train */
    bottom: -15px; /* Reset train position on desktop */
    right: 1030px; /* Desktop: original position */
    width: 113px; /* Larger on desktop */
  }

  .hero-content-wrapper {
    position: static;
    width: auto;
    max-width: 1424px; /* BWP: max-width constraint */
    margin: 0 auto;
    padding: 0;
    background-color: transparent; /* Remove black bar on desktop */
    min-height: auto; /* Reset min-height */
  }

  .hero-grid {
    min-height: 450px;
    padding-top: 160px; /* BWP desktop: padding-top */
    padding-bottom: 24px;
  }

  .hero-content {
    padding: 0;
    max-width: 750px;
  }

  .hero-content h1 {
    font-size: 50px; /* BWP desktop: 50px */
  }

  .hero-content p {
    font-size: 20px !important; /* BWP desktop: 20px */
  }
}

/* Hero brand elements (bottom right corner) */
.hero-brand-elements {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 503; /* On top of everything in hero, below header */
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-box {
  background: #FFFFFF;
  color: #6f42c1; /* Purple to match nav */
  padding: 12px 16px;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: #FFFFFF;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Fan icon */
.brand-fan::before {
  content: '';
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #6f42c1 30%, transparent 30%);
  background-size: 100% 100%;
  border: 3px solid #6f42c1;
  border-radius: 50%;
}

/* Grid icon */
.brand-grid {
  background: #FFFFFF;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  padding: 8px;
}

.brand-grid::before,
.brand-grid::after {
  content: '';
  background: #6f42c1; /* Purple to match nav */
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .hero-brand-elements {
    bottom: 20px;
    right: 20px;
    gap: 8px;
  }

  .brand-box {
    padding: 8px 12px;
    font-size: 14px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .brand-fan::before {
    width: 22px;
    height: 22px;
  }
}
