@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@400;500&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --text-dark: #333;
  --text-light: #f8f9fa;
  --background-light: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--background-light);
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

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

/* --- Navigation --- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  /* Removed fixed height to allow content to determine size */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  min-height: 40px; /* Use min-height instead of height */
}

.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  margin-left: 25px;
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

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

.nav-links a.active-link {
  color: var(--primary-color);
  font-weight: bold;
}

/* --- Mobile Nav Toggle --- */
.nav-toggle {
  display: none; /* Hidden by default */
  font-size: 2.5rem;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 100px; /* Added padding for space from nav */
  padding-bottom: 60px;
  min-height: 90vh; /* Adjusted height */
}

.hero-content { 
  max-width: 55%; /* Adjusted width */
  padding-right: 30px; /* Added padding */
}
.hero h1 { font-size: 4.8rem; /* Adjusted for new base font size */ }
.hero .subtitle { font-size: 1.1rem; margin: 20px 0 30px; color: #555; }

.hero-image {
  max-width: 45%;
  animation: float 6s ease-in-out infinite;
}
.hero-image img { max-width: 100%; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

/* --- Back to Top Button --- */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none; /* Hidden by default */
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  line-height: 50px;
  font-size: 20px;
  border-radius: 50%;
  z-index: 1000;
  transition: opacity 0.3s, visibility 0.3s;
}

.back-to-top-btn:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--background-light);
    box-shadow: var(--shadow);
    padding: 20px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    margin: 10px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    padding-top: 120px;
  }

  .hero-content,
  .hero-image {
    max-width: 100%;
    padding-right: 0;
  }

  .hero-image {
    margin-top: 40px;
  }

  .hero h1 {
    font-size: 3.8rem;
  }

  .section-title {
    font-size: 2.8rem;
  }
}

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

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
  color: black;
  text-decoration: none;
}

#schedule-form {
  display: flex;
  flex-direction: column;
}

#schedule-form .form-group {
  margin-bottom: 15px;
}

#schedule-form .form-group label {
  margin-bottom: 8px;
}

#schedule-form label {
  display: block !important;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: left;
}

#schedule-form input,
#schedule-form textarea {
  width: 100% !important;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1.6rem;
  box-sizing: border-box;
}

#schedule-form button {
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.6rem;
  transition: background-color 0.3s;
  align-self: flex-end;
  margin-top: 10px;
}

@keyframes slide-down {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* --- Button --- */
.btn {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 5px 15px rgba(37, 117, 252, 0.3);
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 117, 252, 0.5);
}

/* --- Sections --- */
.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; }

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--background-light);
  padding: 40px 30px;
  text-align: center;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.service-card:hover { transform: translateY(-10px); }
.service-card .icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.service-card h3 { margin-bottom: 15px; }

/* --- Testimonials Section --- */
.testimonial-section { background-color: #f8f9fa; }
.testimonial-card {
  background: var(--background-light);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.testimonial-card p { font-style: italic; margin-bottom: 20px; word-wrap: break-word; /* Ensure text wraps */ }
.testimonial-author { display: flex; align-items: center; }
.testimonial-author img { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; }
.author-info h4 { margin: 0; }
.author-info span { color: #777; }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  text-align: center;
  padding: 50px 30px; /* Increased padding */
  border-radius: 15px;
  margin: 40px auto;
}
.cta-section h2 { font-size: 2.2rem; margin-bottom: 20px; }
.cta-section p { max-width: 600px; margin: 0 auto 30px; /* Center text and add bottom margin */ }

/* --- Footer --- */
footer {
  background: var(--text-dark);
  color: var(--text-light);
  text-align: center;
  padding: 20px 0;
  margin-top: 50px;
}

/* --- Portfolio Page --- */
.portfolio-section { padding-top: 120px; }

/* --- Portfolio Demo Pages --- */
.portfolio-hero {
  padding: 120px 0 60px;
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
}

.portfolio-hero .portfolio-title {
  font-size: 3rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.portfolio-item {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background-color: #eee; /* Placeholder background */
}

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

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

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 25px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.portfolio-overlay p {
  transform: translateY(10px);
  transition: transform 0.4s ease;
  transition-delay: 0.1s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
  transform: translateY(0);
}
