/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
  font-size: 1.1em;
  width: 100%;
  box-sizing: border-box;
}

/* prevents horizontal scrolling*/
html,
body {
  overflow-x: hidden;
}

/* Header */
header {
  color: white;
  padding-right: 1em;
  height: 9rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

header img {
  width: 90px;
}

.top-header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
  animation-delay: 0.3s;
}

/* Animations */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes navFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  transform: translateX(-40px);
  opacity: 0;
  animation: slideInLeft 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

/* Layout */
.container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

section {
  margin-bottom: 40px;
}

h1,
h2 {
  color: #264653;
}

/* Footer */
footer {
  background-color: #264653;
  color: white;
  text-align: center;
  padding: 1.5em 1em;
  font-size: 0.9em;
}

.social-icons ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.social-icons ul li {
  margin: 0 10px;
}

.social-icons ul li a {
  width: 40px;
  height: 40px;
  background-color: #fff;
  text-align: center;
  line-height: 40px;
  font-size: 20px;
  display: block;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 2px solid #fff;
  z-index: 1;
  transition: background-color 0.3s ease;
}

.social-icons ul li a .icon {
  position: relative;
  color: #333;
  transition: .5s;
  z-index: 3;
}

.social-icons ul li a:hover .icon {
  color: #fff;
  transform: rotateY(360deg);
}

.social-icons ul li a:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f00;
  transition: .5s;
  z-index: 2;
}

.social-icons ul li a:hover:before {
  top: 0;
}

.social-icons ul li:nth-child(1) a:before {
  background: #3b5999;
}

.social-icons ul li:nth-child(2) a:before {
  background: #e1306c;
}

.social-icons ul li:nth-child(3) a:before {
  background: #00b87a;
}

.zampe-link {
  color: white;
  text-decoration: none;
}

.zampe-link:hover {
  text-decoration: underline;
}

/* --- Services Section & Card Alignment --- */
.service-box {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-box-content {
  flex-grow: 1;
}

.service-box h3 {
  font-size: 1.3rem;
  color: #264653;
  margin-bottom: 0.5rem;
  min-height: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-box h4 {
  font-size: 1em;
  color: #555;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.service-box .service-img {
  margin-top: auto;
}

.service-box img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* --- Swiper General Adjustments --- */
.swiper-container {
  position: relative;
  padding-bottom: 30px;
}

.swiper {
  padding: 2rem 0;
}

.swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 80%;
  max-width: 320px;
}

@media (min-width: 768px) {
  .swiper-slide {
    width: auto;
  }
}

/* --- Pagination & Navigation Styling --- */
.swiper-pagination {
  bottom: 0px !important;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background-color: #ccc;
  opacity: 1;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background-color: #2a9d8f;
  width: 12px;
  height: 12px;
}

.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background-color: transparent;
  border: 2px solid #2a9d8f;
  border-radius: 50%;
  color: #2a9d8f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, background-color 0.3s, color 0.3s;
  opacity: 1;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: #2a9d8f;
  color: white;
}

.swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 18px;
  font-weight: bold;
}

@media (min-width: 1024px) {
  .swiper-button-next {
    right: -40px;
  }
  .swiper-button-prev {
    left: -40px;
  }
}

@media screen and (max-width: 767px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 40px;
    height: 40px;
  }
  .swiper-button-next {
    right: 0px;
  }
  .swiper-button-prev {
    left: 0px;
  }
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 16px;
  }
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
  align-items: center; /* Center items vertically */
}

.contact-info p {
  margin: 0.8em 0;
  font-size: 1.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info i {
  color: #2a9d8f;
  min-width: 20px;
}

.contact-info a {
  color: #2a9d8f;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-social ul {
  margin-top: 20px;
}

/* --- New Contact Form Styling --- */
.contact-form {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px; /* Give it some height */
}

.contact-form-button {
  background-color: #2a9d8f;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-form-button:hover {
  background-color: #264653; /* Darker color on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}


/* --- Mobile & Other Sections --- */

@media screen and (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px; /* Increase gap for mobile */
    text-align: center;
  }
  .contact-info, .contact-social ul {
    justify-content: center;
  }
}

#about {
  padding-top: 20px;
}

.lang-toggle {
  background: none;
  border: 2px solid #2a9d8f;
  color: #264653;
  font-weight: bold;
  padding: 6px 12px;
  font-size: 0.9em;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s, color 0.3s;
  position: fixed;
  top: 40px;
  right: 25px;
}

.lang-toggle:hover {
  background-color: #2a9d8f;
  color: white;
}

.lang-toggle i {
  font-size: 1em;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 8rem 0 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.identity {
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
  line-height: 1.2;
}

.identity .name {
  font-weight: bold;
  font-size: 1.2em;
  color: #264653;
  white-space: normal;
}

.identity .title {
  font-size: 0.9em;
  color: #3e7287;
}

@media (max-width: 768px) {
  .identity {
    font-size: 0.95em;
  }
}

.about-images {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 2em 0;
  flex-wrap: wrap;
}

.about-images img {
  width: 45%;
  max-width: 300px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.about-images img.slide-in-left.visible {
  transform: translateX(0);
  opacity: 1;
}

.about-images img.slide-in-right.visible {
  transform: translateX(0);
  opacity: 1;
}

.slide-in-left {
  transform: translateX(-50px);
}

.slide-in-right {
  transform: translateX(50px);
}

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

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

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

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

.slide-left,
.slide-right {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.6s ease;
  will-change: transform, opacity;
}

.slide-left.hidden,
.slide-right.hidden {
  opacity: 1;
}

.slide-left.visible {
  animation: slideInLeft 0.8s ease forwards;
}

.slide-left.out {
  animation: slideOutLeft 0.6s ease forwards;
}

.slide-right.visible {
  animation: slideInRight 0.4s ease forwards;
}

.slide-right.out {
  animation: slideOutRight 0.2s ease forwards;
}

#return-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #2a889d;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#return-to-top:hover {
  background: #264653;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#return-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#return-to-top i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

#return-to-top:hover i {
  transform: scale(1.1) translateY(-3px);
}

.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .top-header {
    position: sticky;
    top: 0;
    height: auto;
    padding-bottom: 50px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  .mobile-nav {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: white;
    border-top: 1px solid #ffffff;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  .mobile-nav ul {
    display: flex;
    height: 100%;
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .mobile-nav li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-nav a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #264653;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
  }
}