/* Testloop Labs Website - Minimalist Gallery Style */

/* Base Typography and Reset */
:root {
  --main-bg-color: #ffffff;
  --secondary-bg-color: #fafafa;
  --text-color: #111111;
  --accent-color: #3da8a3;
  --border-color: #dddddd;
  --spacing-unit: 1rem;
  --font-primary: "Neue Haas Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--main-bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1.5rem;
  font-weight: 300;
  line-height: 1.8;
}

/* Layout Components */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  box-sizing: border-box;
}

.section {
  padding: calc(var(--spacing-unit) * 8) 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1rem;
}

.col {
  flex: 1;
  padding: 0 1rem;
}

/* Spacing Utilities */
.mt-1 {
  margin-top: calc(var(--spacing-unit) * 1);
}
.mt-2 {
  margin-top: calc(var(--spacing-unit) * 2);
}
.mt-3 {
  margin-top: calc(var(--spacing-unit) * 3);
}
.mt-4 {
  margin-top: calc(var(--spacing-unit) * 4);
}
.mt-5 {
  margin-top: calc(var(--spacing-unit) * 5);
}

.mb-1 {
  margin-bottom: calc(var(--spacing-unit) * 1);
}
.mb-2 {
  margin-bottom: calc(var(--spacing-unit) * 2);
}
.mb-3 {
  margin-bottom: calc(var(--spacing-unit) * 3);
}
.mb-4 {
  margin-bottom: calc(var(--spacing-unit) * 4);
}
.mb-5 {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

/* Header and Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-link {
  margin-left: 2rem;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--text-color);
  position: relative;
  transition: all 0.2s ease;
}

.nav-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -5px;
  left: 0;
  background-color: var(--text-color);
  transition: width 0.3s ease;
}

.nav-link:hover:after {
  width: 100%;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  outline: none;
  margin-left: auto;
}

.mobile-nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px; /* Adjust for fixed header */
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  width: 100%;
}

.with-animation-bg {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero h1,
.hero p {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  margin-bottom: 2rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons & CTAs */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0.5rem;
}

.btn:hover {
  background-color: var(--text-color);
  color: var(--main-bg-color);
}

.btn-accent {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-accent:hover {
  background-color: var(--accent-color);
  color: var(--main-bg-color);
}

/* Schedule Button Styles */
.schedule-btn {
  position: relative;
  font-weight: 500;
}

.nav-link.schedule-btn {
  color: var(--accent-color);
}

.nav-link.schedule-btn:after {
  background-color: var(--accent-color);
}

/* Calendar Modal Styles */
.calendar-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

.calendar-modal-content {
  position: relative;
  background-color: var(--main-bg-color);
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.calendar-iframe {
  width: 100%;
  height: 650px;
  border: none;
}

.close-calendar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
}

.close-calendar:hover {
  color: var(--accent-color);
}

/* Gallery Style Display for Services and Products */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.gallery-item h3 {
  margin-bottom: 1rem;
}

.gallery-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

/* Products Exhibition Style */
.exhibition {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 4rem;
  margin: 5rem 0;
}

.exhibition-item {
  display: flex;
  flex-direction: column;
  padding: 3rem;
  background-color: var(--secondary-bg-color);
  transition: all 0.3s ease;
  height: 100%;
}

.exhibition-item h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.exhibition-item p {
  margin-bottom: 1.5rem;
}

.exhibition-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  margin-bottom: 2rem;
}

.product-logo-container {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 45px;
}

.product-logo {
  max-width: 100%;
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

.placeholder-logo {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 4rem auto;
}

.form-group {
  margin-bottom: 2rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--text-color);
}

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

/* Footer */
.footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 2rem 0;
}

.social-link {
  margin: 0 1rem;
}

.social-icon {
  width: 24px;
  height: 24px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2.2rem;
  }
  .exhibition {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.8rem;
  }

  .header {
    height: 70px;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-content {
    max-width: 100%;
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    background-color: var(--main-bg-color);
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0;
    z-index: 1000;
  }

  .nav-links.active {
    height: auto;
    padding: 20px 0;
  }

  .nav-links li {
    margin: 12px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-link {
    margin: 0.5rem 0;
    font-size: 1.2rem;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .gallery,
  .exhibition {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .exhibition-item.large {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .exhibition-content {
    padding: 1.5rem;
    order: 2;
  }

  .exhibition-placeholder {
    order: 1;
    aspect-ratio: 16/9;
  }

  /* Fix for horizontal scrolling logo animation */
  .logo-scroll-container {
    width: 100%;
    overflow: hidden;
  }

  .client-logo {
    height: 40px;
    max-width: 120px;
    margin: 0 1.5rem;
  }

  .logo-scroll-content {
    animation: scrollLogos 20s linear infinite;
  }

  .calendar-modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .calendar-iframe {
    height: 580px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .container {
    padding: 0 1.5rem;
  }
  .section {
    padding: 4rem 0;
  }
  .btn {
    width: 100%;
    margin: 0.5rem 0;
  }
}

/* Animations and Transitions */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--main-bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-color);
}

/* Companies Section Styles */
.companies-section {
  overflow: hidden;
  padding: 3rem 0;
  width: 100%;
}

.logo-scroll-container {
  width: 100%;
  overflow: hidden;
  margin: 2rem 0;
}

.logo-scroll {
  position: relative;
  width: 100%;
}

.logo-scroll-content {
  display: flex;
  animation: scrollLogos 30s linear infinite;
  white-space: nowrap;
  width: fit-content;
}

.client-logo {
  height: 60px;
  max-width: 180px;
  object-fit: contain;
  margin: 0 3rem;
  filter: grayscale(100%) opacity(0.7);
  transition: filter 0.3s ease;
}

.client-logo:hover {
  filter: grayscale(0%) opacity(1);
}

.brand-separator {
  display: inline-block;
  margin: 0 1.5rem;
  font-size: 2rem;
  color: var(--text-color);
  opacity: 0.3;
  font-weight: 300;
}

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

.background-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
