/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary-color: #f0f0f0;
  --secondary-color: #333;
  --text-color: #333;
  --background-color: #fff;
}

/* Base Styles */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* Top Menu */
.top-menu {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.top-menu ul {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
  display: flex;
  justify-content: flex-end;
}

.top-menu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 1rem 1.5rem;
  display: block;
  transition: background-color 0.2s ease-in-out;
}

.top-menu a:hover {
  background-color: #f4f4f4;
}

/* Hero Section */
.hero {
  background-image: url('images/website-bg-purp-grad.jpg');
  background-size: 100%;
  background-position: center 100%;
  height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.hero-text-modern {
  text-align: center;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 20px;
}

/* Main Content */
main {
  padding: 1rem;
}

/* Companies Carousel */
.companies-section {
  padding: 3rem 2rem;
  background-color: #fff;
  text-align: center;
  overflow: hidden;
}

.companies-section h2 {
  margin-bottom: 2rem;
  color: #333;
  font-size: 2rem;
  font-weight: 600;
}

.companies-section .carousel-container {
  width: 80%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
}

.companies-section .carousel-track {
  display: flex;
  align-items: center;
  animation: seamlessScroll 30s linear infinite;
  width: max-content;
}

.companies-section .company-logo {
  flex: 0 0 220px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 35px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.companies-section .company-logo:hover {
  opacity: 1;
}

.companies-section .company-logo img {
  max-width: 200px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.companies-section .company-logo.large img {
  max-width: 250px;
  max-height: 150px;
}

.companies-section .company-logo.medium img {
  max-width: 180px;
  max-height: 90px;
}

.companies-section .company-logo.small img {
  max-width: 150px;
  max-height: 70px;
}

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

/* Project Cards */
.card-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 400px;
  height: 250px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 0 0 1rem 0;
  padding: 0;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

.card-caption {
  text-align: center;
  max-width: 400px;
}

.card-caption h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #242424;
  font-weight: 600;
}

.card-caption p {
  margin: 0;
  font-size: 0.9rem;
  color: #3b3b3b;
  line-height: 1.4;
  font-weight: 400;
}

/* Portfolio Pages */
.portfolio-main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.portfolio-item {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.portfolio-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-content h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.2rem;
}

.portfolio-content p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.portfolio-item-link {
  text-decoration: none;
  color: inherit;
}

.portfolio-item-link:hover .portfolio-item {
  transform: translateY(-5px);
}

/* Gallery Layout for 3D Page */
.gallery-main {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: brightness(0.8);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 2rem 1rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  animation: fadeIn 0.3s;
}

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

.modal-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 8px;
}

#caption {
  text-align: center;
  color: #ccc;
  font-size: 1.2rem;
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 500;
}

.close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.close:hover,
.close:focus {
  color: #bbb;
}