/* --- Global & Reset --- */
:root {
  --primary-color: #007bff;
  --primary-dark-color: #0056b3;
  --secondary-color: #6c757d;
  --light-color: #f8f9fa; /* Light background for sections */
  --dark-color: #212529; /* Darker, more modern dark */
  --text-color: #343a40;
  --text-light-color: #f8f9fa;
  --success-color: #198754;
  --danger-color: #dc3545;
  --font-family: "Poppins", "Arial", sans-serif;
  --header-height: 70px;
  --border-radius: 8px;
  --transition-speed: 0.3s;
  --animation-duration: 0.6s;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base font size */
}

body {
  font-family: var(--font-family);
  line-height: 1.7;
  color: var(--text-color);
  background-color: #fff;
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: var(--primary-dark-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--dark-color);
}

h1 {
  font-size: 2.8rem;
}
h2 {
  font-size: 2.2rem;
}
h3 {
  font-size: 1.5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.py-section {
  padding: 60px 0;
} /* Consistent section padding */
.bg-light {
  background-color: var(--light-color);
}
.bg-dark {
  background-color: var(--dark-color);
}
.text-light {
  color: var(--text-light-color) !important;
} /* Override specificity if needed */
.text-light h1,
.text-light h2,
.text-light h3,
.text-light p {
  color: var(--text-light-color);
}
.bg-dark .section-title,
.bg-dark .section-title::after {
  color: var(--text-light-color);
}
.bg-dark .section-title::after {
  background-color: var(--primary-color);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: 2px solid transparent;
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark-color);
  border-color: var(--primary-dark-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: #fff;
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #545b62; /* Darken secondary */
  border-color: #545b62;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* --- Header (Transparent on Top, Solid on Scroll) --- */
#main-header {
  background-color: transparent;
  color: var(--text-light-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: none;
  height: var(--header-height);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}

#main-header.scrolled {
  background-color: #fff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  color: var(--dark-color);
}

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

#main-header .logo {
  font-size: 1.7rem;
  font-weight: 700;
  color: inherit;
  transition: color 0.4s ease;
  letter-spacing: 0.5px;
}
#main-header.scrolled .logo {
  color: var(--dark-color);
}
#main-header .logo .logo-highlight {
  color: var(--primary-color);
}

#navbar ul {
  display: flex;
}
#navbar ul li {
  margin-left: 28px;
}
#navbar ul li a {
  color: inherit;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  transition: color 0.4s ease;
}
#main-header.scrolled #navbar ul li a {
  color: var(--dark-color);
}

#navbar ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2.5px;
  background-color: var(--primary-color);
  border-radius: 1px;
  transition: width var(--transition-speed) ease;
}

#navbar ul li a:hover,
#navbar ul li a.active {
  color: var(--primary-color);
}
#navbar ul li a:hover::after,
#navbar ul li a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.4s ease;
}
#main-header.scrolled .menu-toggle {
  color: var(--dark-color);
}

/* --- Hero Section --- */
#hero {
  color: #fff;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.slideshow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 1;
}
.hero-slide.active-slide {
  opacity: 1;
  z-index: 2;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 3;
}
#hero .hero-content-container {
  position: relative;
  z-index: 4;
}

#hero h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #fff;
  line-height: 1.2;
}
#hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.9);
}

/* --- About Us Section --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Image smaller */
  gap: 3rem;
  align-items: center;
}
.about-image {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.about-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}
.about-content p {
  margin-bottom: 1.2rem;
  color: #555;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.service-card {
  background: #fff;
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}
.service-card i {
  color: var(--primary-color);
  margin-bottom: 1.2rem;
}
.service-card h3 {
  margin-bottom: 0.8rem;
  color: var(--dark-color);
  font-size: 1.3rem;
}
.service-card p {
  font-size: 0.95rem;
  color: #666;
}

/* --- Portfolio Section (No Images) --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.portfolio-item {
  display: flex;
} /* Ensure content card fills item */
.portfolio-content-card {
  /* Replaces old .portfolio-overlay */
  width: 100%;
  min-height: 280px;
  background-image: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark-color) 100%
  );
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}
.portfolio-item:hover .portfolio-content-card {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 123, 255, 0.35);
}
.portfolio-content-card i {
  margin-bottom: 1.2rem;
  color: #fff;
  transition: transform var(--transition-speed) ease;
}
.portfolio-item:hover .portfolio-content-card i {
  transform: scale(1.15) rotate(-5deg);
}
.portfolio-content-card h3 {
  margin-bottom: 0.6rem;
  color: #fff;
  font-size: 1.4rem;
}
.portfolio-content-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* --- Contact Section --- */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: flex-start;
}
.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.contact-info p {
  margin-bottom: 1.2rem;
  display: flex;
  align-items: flex-start;
}
.contact-info i.fas {
  margin-right: 12px;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-top: 5px;
  width: 20px;
  text-align: center;
}
.social-icons {
  margin-top: 1.5rem;
}
.social-icons a {
  color: var(--text-light-color);
  font-size: 1.3rem;
  margin-right: 15px;
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}
.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

#contact-form .form-group {
  margin-bottom: 1.5rem;
}
#contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #555; /* Darker border for dark bg */
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.05); /* Subtle background */
  color: var(--text-light-color);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}
#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
#contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Footer --- */
#main-footer {
  background: var(--dark-color);
  color: #adb5bd;
  text-align: center;
}
#main-footer p {
  font-size: 0.9rem;
}
#main-footer .fa-heart {
  color: var(--danger-color);
}

/* --- Scroll-triggered Animations --- */
[data-animate] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: var(--animation-duration);
  transition-timing-function: cubic-bezier(
    0.175,
    0.885,
    0.32,
    1.275
  ); /* Easing with overshoot */
}
[data-animate].is-visible {
  opacity: 1;
  transform: none !important;
}

[data-animate="fade-in"] {
  transform: translateY(20px);
}
[data-animate="fade-in-up"] {
  transform: translateY(50px);
}
[data-animate="fade-in-down"] {
  transform: translateY(-50px);
}
[data-animate="fade-in-left"] {
  transform: translateX(-50px);
}
[data-animate="fade-in-right"] {
  transform: translateX(50px);
}
[data-animate="zoom-in"] {
  transform: scale(0.9);
}

/* --- Responsive --- */
@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  .section-title {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
  }
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-image {
    margin: 0 auto 2rem auto;
    max-width: 380px;
  }
  .contact-content {
    grid-template-columns: 1fr;
  }
  .contact-info {
    margin-bottom: 2.5rem;
    text-align: center;
  }
  .contact-info p {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  #hero h1 {
    font-size: 2.5rem;
  }
  #hero p {
    font-size: 1.1rem;
    max-width: 90%;
  }
  .py-section {
    padding: 50px 0;
  }

  #navbar {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
  }
  #navbar.active {
    display: flex;
  }
  #navbar ul {
    flex-direction: column;
    width: 100%;
  }
  #navbar ul li {
    margin: 0;
    text-align: center;
  }
  #navbar ul li a {
    display: block;
    padding: 0.9rem 1rem;
    color: var(--dark-color); /* For mobile dropdown */
    border-bottom: 1px solid #f0f0f0;
  }
  #navbar ul li a::after {
    display: none;
  }
  #navbar ul li:last-child a {
    border-bottom: none;
  }
  #navbar ul li a:hover,
  #navbar ul li a.active {
    color: var(--primary-color);
    background-color: #f8f9fa;
  }
  .menu-toggle {
    display: block;
  }
}

@media (max-width: 576px) {
  #hero h1 {
    font-size: 2rem;
  }
  #hero p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .py-section {
    padding: 40px 0;
  }
}
