/* ============================================
   JMCo Hub Page Styles - Mobile-First
   Matches main site styling
   ============================================ */

.jmco-hub-page {
  --navy: #0C1425;
  --navy-light: #1a2438;
  --cream: #f1e4e3;
  --white: #ffffff;
  --text-dark: #0C1425;
  --text-light: #6b7280;
  --accent: #c9a962;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
}

.jmco-hub-page * {
  box-sizing: border-box;
}

.jmco-hub-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.jmco-hub-page h1,
.jmco-hub-page h2,
.jmco-hub-page h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0;
  color: var(--navy);
}

.jmco-hub-page h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.jmco-hub-page h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.jmco-hub-page h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-bottom: 0.5rem; }

.jmco-hub-page p {
  margin-bottom: 1rem;
  margin-top: 0;
}

.jmco-hub-page a {
  color: var(--navy);
  text-decoration: none;
}

/* Hero Section */
.jmco-hub-page .hero {
  background: var(--navy);
  color: var(--cream);
  padding: 80px 0;
  min-height: 50vh;
  display: flex;
  align-items: center;
}

.jmco-hub-page .hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

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

.jmco-hub-page .hero h1 {
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.jmco-hub-page .hero p {
  color: var(--cream);
  opacity: 0.9;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.jmco-hub-page .hero-image {
  border-radius: 8px;
  overflow: hidden;
}

.jmco-hub-page .hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
.jmco-hub-page .btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.jmco-hub-page .btn-primary {
  background: var(--cream);
  color: var(--navy);
}

.jmco-hub-page .btn-primary:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.jmco-hub-page .btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.jmco-hub-page .btn-outline:hover {
  background: var(--navy);
  color: var(--cream);
}

/* Outline button on dark backgrounds */
.jmco-hub-page .section-dark .btn-outline {
  color: var(--cream);
  border: 2px solid var(--cream);
  background: transparent;
}

.jmco-hub-page .section-dark .btn-outline:hover {
  background: var(--cream);
  color: var(--navy);
}

.jmco-hub-page .btn-navy {
  background: var(--navy);
  color: var(--cream);
}

.jmco-hub-page .btn-navy:hover {
  background: var(--navy-light);
}

/* Sections */
.jmco-hub-page .section {
  padding: 80px 0;
}

.jmco-hub-page .section-light {
  background: var(--white);
}

.jmco-hub-page .section-cream {
  background: var(--cream);
}

.jmco-hub-page .section-dark {
  background: var(--navy);
  color: var(--cream);
}

/* Headers on light/cream backgrounds should be dark blue */
.jmco-hub-page .section-light h2,
.jmco-hub-page .section-light h3,
.jmco-hub-page .section-cream h2,
.jmco-hub-page .section-cream h3 {
  color: var(--navy);
}

.jmco-hub-page .section-dark h2,
.jmco-hub-page .section-dark h3 {
  color: var(--cream);
}

.jmco-hub-page .section-dark p {
  color: var(--cream);
  opacity: 0.9;
}

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

.jmco-hub-page .section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

.jmco-hub-page .section-dark .section-header p {
  color: var(--cream);
  opacity: 0.9;
}

/* Services Grid */
.jmco-hub-page .services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

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

.jmco-hub-page .service-card {
  background: var(--white);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jmco-hub-page .service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.jmco-hub-page .service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.jmco-hub-page .service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.jmco-hub-page .service-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.jmco-hub-page .service-card a {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--navy);
}

.jmco-hub-page .service-card a:hover {
  text-decoration: underline;
}

/* Features Grid */
.jmco-hub-page .features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

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

.jmco-hub-page .feature-item {
  text-align: center;
}

.jmco-hub-page .feature-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.jmco-hub-page .feature-item h3 {
  margin-bottom: 1rem;
}

.jmco-hub-page .section-dark .feature-item h3 {
  color: var(--cream);
}

.jmco-hub-page .section-dark .feature-item p {
  color: var(--cream);
  opacity: 0.9;
}

/* Portfolio Grid */
.jmco-hub-page .portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

@media (min-width: 900px) {
  .jmco-hub-page .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.jmco-hub-page .portfolio-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--navy-light);
  display: block;
}

.jmco-hub-page .portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.jmco-hub-page .portfolio-item:hover img {
  transform: scale(1.05);
}

.jmco-hub-page .portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(12,20,37,0.9));
  color: var(--cream);
}

.jmco-hub-page .portfolio-overlay h3 {
  color: var(--cream);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.jmco-hub-page .portfolio-overlay span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Video Embed for Portfolio */
.jmco-hub-page .portfolio-video-item {
  display: block;
}

.jmco-hub-page .portfolio-video {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--navy-light);
}

.jmco-hub-page .portfolio-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

.jmco-hub-page .portfolio-video-info {
  padding: 12px 0;
}

.jmco-hub-page .portfolio-video-info h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  color: var(--navy);
}

.jmco-hub-page .section-dark .portfolio-video-info h3 {
  color: var(--cream);
}

.jmco-hub-page .portfolio-video-info span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.jmco-hub-page .section-dark .portfolio-video-info span {
  color: var(--cream);
  opacity: 0.7;
}

/* Process Steps */
.jmco-hub-page .process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

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

@media (min-width: 900px) {
  .jmco-hub-page .process-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.jmco-hub-page .process-step {
  text-align: center;
  padding: 20px 16px;
}

.jmco-hub-page .process-step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.jmco-hub-page .process-step p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.jmco-hub-page .process-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  background: var(--navy);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: 600;
  font-size: 1.25rem;
}

.jmco-hub-page .section-dark .process-number {
  background: var(--cream);
  color: var(--navy);
}

.jmco-hub-page .section-cream .process-step h3,
.jmco-hub-page .section-light .process-step h3 {
  color: var(--navy);
}

.jmco-hub-page .section-cream .process-step p,
.jmco-hub-page .section-light .process-step p {
  color: var(--text-light);
}

/* Testimonial */
.jmco-hub-page .testimonial {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0;
}

.jmco-hub-page .testimonial-quote-mark {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 0.6;
  color: var(--cream);
  opacity: 0.3;
  margin-bottom: 1rem;
}

.jmco-hub-page .testimonial-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--cream);
}

.jmco-hub-page .testimonial-author {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  color: var(--cream);
}

.jmco-hub-page .testimonial-role {
  font-size: 0.9rem;
  color: var(--cream);
  opacity: 0.8;
  margin-bottom: 0.1rem;
}

.jmco-hub-page .testimonial-company {
  font-size: 0.9rem;
  color: var(--cream);
  opacity: 0.7;
  font-weight: 500;
}

/* CTA Section */
.jmco-hub-page .cta-section {
  text-align: center;
  padding: 100px 0;
}

.jmco-hub-page .cta-section h2 {
  margin-bottom: 1.5rem;
}

.jmco-hub-page .section-light .cta-section h2 {
  color: var(--navy);
}

.jmco-hub-page .cta-section p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.jmco-hub-page .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

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

.jmco-hub-page .faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.jmco-hub-page .faq-item:last-child {
  border-bottom: none;
}

.jmco-hub-page .faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.jmco-hub-page .faq-answer {
  color: var(--text-light);
}

/* Logo Grid */
.jmco-hub-page .logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.jmco-hub-page .logo-grid img {
  height: 40px;
  width: auto;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.jmco-hub-page .logo-grid img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Industries Grid */
.jmco-hub-page .industries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .jmco-hub-page .industries-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }
}

.jmco-hub-page .industry-item {
  text-align: center;
  padding: 20px 16px;
  background: var(--white);
  border-radius: 8px;
  font-weight: 500;
  color: var(--navy);
  border-left: 4px solid var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.jmco-hub-page .section-cream .industry-item {
  background: var(--white);
}

.jmco-hub-page .section-light .industry-item {
  background: #f8f8f8;
}

/* Contact Modal */
.jmco-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jmco-modal:target {
  opacity: 1;
  visibility: visible;
}

.jmco-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 20, 37, 0.8);
  cursor: pointer;
}

.jmco-modal-container {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 100000;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.jmco-modal:target .jmco-modal-container {
  transform: translateY(0);
}

.jmco-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: #0C1425;
  text-decoration: none;
  line-height: 1;
  z-index: 100001;
}

.jmco-modal-close:hover {
  color: #666;
}

.jmco-modal-content {
  padding: 48px 40px;
  text-align: center;
}

.jmco-modal-content h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #0C1425;
  margin-bottom: 1rem;
}

.jmco-modal-content > p {
  color: #6b7280;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Fluent Forms styling inside modal */
.jmco-modal .fluentform {
  text-align: left;
}

.jmco-modal .ff-el-input--label {
  color: #0C1425;
  font-weight: 500;
}

.jmco-modal .ff-el-form-control {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px 16px;
}

.jmco-modal .ff-el-form-control:focus {
  border-color: #0C1425;
  outline: none;
}

.jmco-modal .ff-btn-submit {
  background: #0C1425 !important;
  color: #f1e4e3 !important;
  border: none !important;
  padding: 14px 32px !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}

.jmco-modal .ff-btn-submit:hover {
  background: #1a2438 !important;
}

@media (max-width: 600px) {
  .jmco-modal-content {
    padding: 40px 24px;
  }

  .jmco-modal-content h2 {
    font-size: 1.75rem;
  }
}

/* Utilities */
.jmco-hub-page .text-center { text-align: center; }
.jmco-hub-page .mb-0 { margin-bottom: 0; }
.jmco-hub-page .mb-1 { margin-bottom: 1rem; }
.jmco-hub-page .mb-2 { margin-bottom: 2rem; }
.jmco-hub-page .mb-3 { margin-bottom: 3rem; }
.jmco-hub-page .mt-3 { margin-top: 3rem; }

/* Hide theme page title on hub pages */
body:has(.jmco-hub-page) .entry-title,
body:has(.jmco-hub-page) .page-title,
body:has(.jmco-hub-page) h1.elementor-heading-title,
body:has(.jmco-hub-page) .elementor-page-title,
.jmco-hub-page ~ .entry-title,
.page .jmco-hub-page ~ h1,
article:has(.jmco-hub-page) > header,
.entry-header:has(+ .entry-content .jmco-hub-page),
.page-header,
body.page .entry-title {
  display: none !important;
}

/* Override theme styles with higher specificity */
body .jmco-hub-page .hero {
  background: #0C1425 !important;
}

body .jmco-hub-page .section-cream {
  background: #f1e4e3 !important;
}

body .jmco-hub-page .section-dark {
  background: #0C1425 !important;
}

body .jmco-hub-page .section-light {
  background: #ffffff !important;
}

/* Make all sections full-width, breaking out of theme container */
body .jmco-hub-page .section,
body .jmco-hub-page .hero,
body .jmco-hub-page .section-light,
body .jmco-hub-page .section-cream,
body .jmco-hub-page .section-dark {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Ensure container inside sections stays centered */
body .jmco-hub-page .section .container,
body .jmco-hub-page .hero .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* Ensure text colors override theme */
body .jmco-hub-page .hero h1,
body .jmco-hub-page .hero p,
body .jmco-hub-page .section-dark h2,
body .jmco-hub-page .section-dark h3,
body .jmco-hub-page .section-dark p {
  color: #f1e4e3 !important;
}

body .jmco-hub-page .section-cream h2,
body .jmco-hub-page .section-cream h3,
body .jmco-hub-page .section-light h2,
body .jmco-hub-page .section-light h3 {
  color: #0C1425 !important;
}
