.hero {
  background: linear-gradient(135deg, rgba(26, 35, 126, 0.05) 0%, rgba(249, 168, 38, 0.05) 100%);
  padding: 150px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 600px;
  flex: 1;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  animation: slideInLeft 0.8s ease forwards;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 2.5rem;
  max-width: 600px;
  animation: fadeIn 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 2rem;
  animation: slideInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-image {
  flex: 1;
  position: relative;
  animation: slideInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.hero-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-heavy);
  display: block;
}

.service-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.service-section:nth-child(even) {
  background: linear-gradient(135deg, rgba(26, 35, 126, 0.03) 0%, rgba(249, 168, 38, 0.03) 100%);
}

.service-section .container {
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 2;
}

.service-section.reverse .container {
  flex-direction: row-reverse;
}

.service-content {
  flex: 1;
  animation: slideInLeft 0.8s ease forwards;
  opacity: 0;
}

.service-section.reverse .service-content {
  animation: slideInRight 0.8s ease forwards;
}

.service-content h2 {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.service-content p {
  font-size: 1.15rem;
  color: var(--gray);
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.6;
}

.service-content .btn {
  padding: 15px 35px;
  font-size: 1rem;
  font-weight: 600;
}

.service-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
  animation: slideInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.service-section.reverse .service-image {
  animation: slideInLeft 0.8s ease 0.3s forwards;
}

.service-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.service-section:hover .service-image img {
  transform: scale(1.03);
}

.service-section.hero-style {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 120px 0;
}

.service-section.hero-style .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  position: relative;
}

.service-section.hero-style.reverse .container {
  flex-direction: row-reverse;
}

.service-section.hero-style .hero-content {
  flex: 1;
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.service-section.hero-style .hero-content h2 {
  color: white;
  font-size: 2.8rem;
  animation: slideInLeft 0.8s ease forwards;
  opacity: 0;
}

.service-section.hero-style .hero-content p {
  color: rgba(255, 255, 255, 0.9);
  animation: fadeIn 0.8s ease 0.2s forwards;
  opacity: 0;
}

.service-section.hero-style .hero-image {
  flex: 1;
  position: relative;
  animation: slideInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.service-section.hero-style .hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-heavy);
}

.service-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26, 35, 126, 0.05) 0%, transparent 70%);
  z-index: 1;
}

.service-section.reverse::before {
  left: -200px;
  right: auto;
}

.service-section:nth-child(even)::before {
  background: radial-gradient(circle, rgba(249, 168, 38, 0.05) 0%, transparent 70%);
}

.divisions {
  background-color: var(--light-gray);
}

.divisions .section-title {
  position: relative;
}

.divisions .section-title .btn {
  margin-top: 20px;
  animation: fadeIn 0.8s ease 0.6s forwards;
  opacity: 0;
}

.divisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.division-card {
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.division-card:nth-child(1) { animation-delay: 0.1s; }
.division-card:nth-child(2) { animation-delay: 0.2s; }
.division-card:nth-child(3) { animation-delay: 0.3s; }
.division-card:nth-child(4) { animation-delay: 0.4s; }
.division-card:nth-child(5) { animation-delay: 0.5s; }
.division-card:nth-child(6) { animation-delay: 0.6s; }

.division-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

.division-img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.division-content {
  padding: 25px;
}

.division-content h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.division-content p {
  color: var(--gray);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.division-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.division-link:hover {
  color: var(--secondary);
  gap: 10px;
}

.divisions .text-center {
  margin-top: 50px;
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.8s;
}

.about.section {
  padding: 100px 0;
  background-color: #f8fafc;
}

.about .section-title .btn {
  margin-top: 20px;
  animation: fadeIn 0.8s ease 0.3s forwards;
  opacity: 0;
}

.about-container {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  margin-top: 40px;
}

.about-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.detail-item {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  animation: slideInLeft 0.8s ease forwards;
  opacity: 0;
}

.detail-item:nth-child(1) { animation-delay: 0.1s; }
.detail-item:nth-child(2) { animation-delay: 0.2s; }
.detail-item:nth-child(3) { animation-delay: 0.3s; }

.detail-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.detail-item h4 {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.detail-item h4 i {
  color: var(--secondary);
}

.detail-item p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: slideInRight 0.8s ease forwards;
  opacity: 0;
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.portfolio {
  background-color: var(--light-gray);
}

.portfolio .section-title .btn {
  margin-top: 20px;
  animation: fadeIn 0.8s ease 0.3s forwards;
  opacity: 0;
}

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

.portfolio-item {
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

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

.portfolio-item-content {
  padding: 20px;
}

.portfolio-item-content h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.portfolio-item-content p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.portfolio-item-content .division-link {
  display: inline-block;
  margin-top: 10px;
}

.portfolio .text-center {
  margin-top: 50px;
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.8s;
}

.contact .section-title .btn {
  margin-top: 20px;
  animation: fadeIn 0.8s ease 0.3s forwards;
  opacity: 0;
}

.contact-container {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  margin-top: 40px;
}

.contact-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: slideInLeft 0.8s ease forwards;
  opacity: 0;
}

.contact-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  animation: slideInRight 0.6s ease forwards;
  opacity: 0;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }
.contact-item:nth-child(5) { animation-delay: 0.5s; }

.contact-icon {
  background-color: var(--light-gray);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-details h4 {
  color: var(--primary);
  margin-bottom: 5px;
}

.contact-details p {
  color: var(--gray);
  margin: 0;
}

.contact-details a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .service-content h2,
  .service-section.hero-style .hero-content h2 {
    font-size: 2.5rem;
  }
  
  .service-section .container,
  .service-section.hero-style .container {
    gap: 60px;
  }
}

@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .about-container,
  .contact-container {
    flex-direction: column;
    gap: 40px;
  }
  
  .service-section .container,
  .service-section.hero-style .container {
    flex-direction: column;
    gap: 50px;
  }
  
  .service-section.reverse .container,
  .service-section.hero-style.reverse .container {
    flex-direction: column;
  }
  
  .service-content,
  .service-image,
  .hero-content,
  .hero-image {
    width: 100%;
  }
  
  .service-content h2,
  .service-section.hero-style .hero-content h2 {
    font-size: 2.3rem;
    text-align: center;
  }
  
  .service-content p,
  .service-section.hero-style .hero-content p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  .service-content .btn,
  .service-section.hero-style .hero-content .btn {
    display: block;
    margin: 0 auto;
  }
  
  .service-section::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
  }
  
  .service-section.reverse::before {
    left: -150px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero .container {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 2.3rem;
    text-align: center;
  }

  .hero p {
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

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

  .hero-image img {
    height: 400px;
  }

  .divisions-grid,
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .service-section,
  .service-section.hero-style {
    padding: 80px 0;
  }
  
  .service-content h2,
  .service-section.hero-style .hero-content h2 {
    font-size: 2rem;
  }
  
  .service-content p,
  .service-section.hero-style .hero-content p {
    font-size: 1.05rem;
  }
  
  .service-image img,
  .service-section.hero-style .hero-image img {
    height: 350px;
  }
  
  .about-image img,
  .contact-image img {
    height: 400px;
  }
  
  .section-title .btn {
    width: 100%;
    justify-content: center;
  }
  
  .service-content .btn,
  .service-section.hero-style .hero-content .btn {
    width: 100%;
    justify-content: center;
  }
  
  .portfolio .text-center .btn {
    width: 100%;
    justify-content: center;
  }
  
  .divisions .text-center .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }
  
  .division-content h3 {
    font-size: 1.3rem;
  }
  
  .portfolio-item-content h3 {
    font-size: 1.2rem;
  }
  
  .service-content h2,
  .service-section.hero-style .hero-content h2 {
    font-size: 1.8rem;
  }
  
  .service-content p,
  .service-section.hero-style .hero-content p {
    font-size: 1rem;
  }
  
  .service-section,
  .service-section.hero-style {
    padding: 60px 0;
  }

  .hero-image img,
  .service-image img,
  .service-section.hero-style .hero-image img {
    height: 300px;
  }

  .about-image img,
  .contact-image img {
    height: 350px;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(5px);
}

.section {
  padding: 100px 0;
}

.section:first-of-type {
  padding-top: 50px;
}

.division-card,
.portfolio-item {
  position: relative;
  overflow: hidden;
}

.division-card::before,
.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 1;
}

.division-card:hover::before,
.portfolio-item:hover::before {
  transform: scaleX(1);
}

.division-card,
.portfolio-item,
.contact-item,
.about-image,
.about-details .detail-item,
.service-section,
.service-image img,
.service-section.hero-style .hero-image img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.division-img,
.portfolio-item img,
.about-image img,
.contact-image img,
.hero-image img,
.service-image img,
.service-section.hero-style .hero-image img {
  transition: transform 0.5s ease;
}

.division-card:hover .division-img,
.portfolio-item:hover img,
.about-image:hover img,
.contact-image:hover img,
.service-section:hover .service-image img,
.service-section.hero-style:hover .hero-image img {
  transform: scale(1.05);
}

.division-link:focus,
.btn:focus,
.contact-details a:focus,
.service-content .btn:focus,
.service-section.hero-style .hero-content .btn:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-secondary.loading::after {
  border: 2px solid rgba(26, 35, 126, 0.3);
  border-top-color: var(--primary);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.service-section {
  scroll-margin-top: 100px; /* For better anchor link navigation */
}

.service-content .btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  position: relative;
  overflow: hidden;
}

.service-content .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.service-content .btn:hover::before {
  left: 100%;
}

.service-section.hero-style .hero-content .btn {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}
