/* Common CSS for EngSolvers Website */

html { 
  scroll-behavior: smooth; 
}

/* Parallax Hero Styles */
.parallax-hero {
  background-color: #fc8b06; /* Fallback orange */
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

.parallax-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: #fc8b06;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  will-change: transform;
  transform: translateZ(0);
  z-index: 0;
}

.parallax-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(252, 139, 6, 0.8), rgba(252, 139, 6, 0.05));
  z-index: 1;
  pointer-events: none;
}

.parallax-hero > *:not(.parallax-hero-bg) {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .parallax-hero-bg {
    transform: none !important;
  }
}

/* Trusted by logos carousel */
.logos-container {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos-track {
  display: flex;
  gap: 4rem;
  animation: scroll 30s linear infinite;
  width: max-content;
}

.logos-track:hover {
  animation-play-state: paused;
}

.logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 100px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.logo-item:hover {
  opacity: 1;
}

.logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.logo-item:hover img {
  filter: grayscale(0%);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Duplicate logos for seamless loop */
.logos-track::after {
  content: '';
  display: flex;
  gap: 4rem;
}

@media (prefers-reduced-motion: reduce) {
  .logos-track {
    animation: none;
  }
}

/* Contact form styles */
.contact-form-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.contact-form-container {
  background-color: #fc8b06;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-form-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  width: 100%;
  padding: 1rem 0;
  font-size: 1rem;
  outline: none;
  transition: border-bottom-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: white;
  opacity: 0.9;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: white;
}

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

.contact-form-submit {
  background: white;
  color: #1e293b;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 1.5rem;
  width: fit-content;
}

.contact-form-submit:hover {
  background: #f1f5f9;
}

@media (max-width: 1024px) {
  .contact-form-section {
    grid-template-columns: 1fr;
  }
  
  .contact-form-image {
    max-height: 400px;
  }
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid #cbd5e1;
  transition: all 0.3s ease;
}

.video-placeholder:hover {
  border-color: #fc8b06;
  box-shadow: 0 4px 12px rgba(252, 139, 6, 0.2);
}

.video-placeholder iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Square parallax image container */
.parallax-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.parallax-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 120%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  will-change: transform;
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  .parallax-image-bg {
    transform: none !important;
  }
}

/* FAQ Accordion Styles */
.faq-accordion {
  max-width: 900px;
}

.faq-item {
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

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

.faq-question {
  width: 100%;
  padding: 1.5rem 0;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #fc8b06;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: #fc8b06;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 0;
}

.faq-item.active .faq-answer {
  max-height: 2000px;
  padding-bottom: 1.5rem;
}

.faq-answer-content {
  color: #475569;
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  .faq-answer {
    transition: none;
  }
  
  .faq-question::after {
    transition: none;
  }
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background-color: white;
  z-index: 51;
  padding: 1.5rem;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #1e293b;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.mobile-menu-close:hover {
  color: #fc8b06;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu-nav a {
  display: block;
  padding: 0.875rem 1rem;
  color: #1e293b;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-nav a:hover {
  background-color: #f8fafc;
  color: #fc8b06;
}

.burger-menu-button {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-menu-button span {
  width: 100%;
  height: 2px;
  background-color: #1e293b;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger-menu-button.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu-button.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu-button.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

@media (min-width: 768px) {
  .burger-menu-button {
    display: none;
  }
  
  .mobile-menu-overlay,
  .mobile-menu {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-overlay,
  .mobile-menu,
  .burger-menu-button span {
    transition: none;
  }
}

