* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background-color: #faf9f6;
  font-family: 'Cambria', serif;
  font-size: 16px;
  color: #444;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #faf9f6;
  padding: 10px 20px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 2px -2px gray;
  transition: top 0.3s ease;
}

.sticky-header.hidden {
  top: -100px;
}

.sticky-header .logo a {
  font-size: 1.5rem;
  color: #092043;
  text-decoration: none;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav-menu ul {
  display: flex;
  list-style: none;
}

.nav-menu ul li {
  margin-left: 20px;
}

.nav-menu ul li a {
  color: #444;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-menu ul li a:hover {
  color: #092043;
}

.grid-container {
  margin-top: 100px;
}

h1 {
  line-height: 1;
  padding-top: 0px;
  padding-bottom: 50px;
}

@media (max-width: 768px) {
  p {
    padding-left: 10px;
    padding-right: 10px;
  }
  .instagram-link {
    margin-top: 50px;
  }
  .container {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 200px;
  }
  .nav-menu {
    display: none;
    width: 100%;
    background-color: #faf9f6;
    position: absolute;
    top: 60px;
    left: 0;
    flex-direction: column;
    text-align: left;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
  }

  .hamburger .line {
    width: 30px;
    height: 4px;
    background-color: #444;
    transition: all 0.3s;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul {
    padding: 0;
    list-style: none;
    display: block;
  }

  .nav-menu ul li {
    margin: 10px 0;
  }

  .nav-menu ul li a {
    display: block;
    padding: 10px;
    color: #444;
    font-size: 1.2rem;
    text-align: left;
  }

  .nav-menu ul li a:hover {
    background-color: #444;
    color: #faf9f6;
  }
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  padding: 20px;
}

.grid-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #faf9f6;
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  height: 600px;
}

.grid-item:hover {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .grid-item {
    height: 300px;
  }
}

.container h1 {
  font-size: 6rem;
}

.header-image {
  margin-top: 120px;
  margin-left: 25%;
  width: 50%;
  height: 600px; /* Safari fallback for object-fit and object-position */
  background-image: url('assets/personal/C1.jpg');
  background-size: cover;
  background-position: 10% 40%; /* Retain original styles for browsers that support them */
  object-fit: cover;
  object-position: 10% 40%; /* Ensure compatibility with older Safari versions */
  -webkit-object-fit: cover;
  -webkit-object-position: 10% 40%;
}

.vision-container h1 {
  margin-top: -15rem;
  color: #faf9f6;
}

.vision-container p {
  padding-top: 0rem;
}

.vision-container h1 {
  font-size: 10rem;
  margin-bottom: 10px;
}

.vision-container p {
  margin-top: 2rem;
}

.container {
  padding-top: 100px;
  margin: 0 auto;
  text-align: left;
}

.about-container {
  display: flex;
  flex-direction: row;
}

.container h1 {
  font-size: 6rem;
}

.about-container p {
  font-size: 1.2rem;
  padding-left: 40px;
  margin-top: -10px;
}

.about-text {
  max-width: 700px;
}

.about-text img {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    padding-bottom: 2rem;
  }
  .container h1 {
    font-size: 4rem;
  }
  .container p {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 1600px) {
  .vision-container h1 {
    font-size: 4rem;
    margin-top: -12rem;
  }

  .header-image {
    margin-top: 0;
    margin-left: 0;
    width: 100%;
    height: 600px;

    background-size: contain;
    background-position: center;
  }

  .vision-container p {
    margin-top: 0rem;
    padding-bottom: 2rem;
  }
}

.services-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding-bottom: 2rem;
}

.profile-img {
  height: 500px;
  object-fit: cover;
  margin-bottom: 50px;
}

h2 {
  font-size: 2rem;
  text-align: left;
  color: #444;
}

h3 {
  text-align: left;
  color: #333;
}

p,
li {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto;
  color: #555;
  line-height: 1.8;
  text-align: left;
}

ul {
  list-style-position: inside;
  padding-left: 0;
}

li {
  margin: 10px 0;
}

.service-block {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: top;
  gap: 1rem;
  margin-top: 3rem;
}

.service-block-text {
  flex: 1;
  max-width: 600px;
}

.service-block-image {
  flex-shrink: 0;
}

.service-block-image img {
  width: 200px;
  height: auto;
}

@media (max-width: 768px) {
  .service-block-image img {
    width: 0px;
    height: auto;
  }
  .service-block-text {
    flex: 1;
    max-width: 100%;
  }
  p {
    padding-left: 0;
  }
}
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-content {
  position: relative;
  max-width: 80%;
  max-height: 80vh;
  margin: auto;
  top: 5%;
  bottom: 10%;
  overflow: hidden;
}

.modal-img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0%;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.close:hover {
  color: rgb(39, 39, 39);
  background: rgba(0, 0, 0, 0.7);
  animation: timerAnimation 0.5s forwards;
}

@keyframes timerAnimation {
  0% {
    transform: rotate(0deg);
    background: rgba(0, 0, 0, 0.5);
  }
  100% {
    transform: rotate(180deg);
    background: rgba(255, 0, 0, 0.7);
  }
}

footer {
  width: 100%;
  background-color: #444;
  margin: 0;
}

footer p {
  color: #faf9f6;
  margin: 0;
  width: 100%;
  padding: 1rem;
  padding-left: 2rem;
  text-align: left;
  font-size: 14px;
}

h2 b {
  color: #222;
}

.landing-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
}

.bottom-part {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.bottom-left {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
  text-align: left;
}
.bottom-left h1 {
  padding: 0;
  padding-left: 20px;
  padding-bottom: 20px;
}
.bottom-right-column {
  display: flex;
  flex-direction: column;
  text-align: left;
  height: 100%;
  justify-content: end;
  max-width: 400px;
  padding-right: 1rem;
}
.bottom-right-column p {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  text-align: left;
  padding-bottom: 20px;
}

.carousel-container {
  color: #555;
  padding-top: 100px;
  width: 100%;
  height: 100vh;
  perspective: 4000px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.carousel {
  position: relative;
  transform-style: preserve-3d;
  animation: spin 300s infinite linear;
}

.carousel img {
  position: absolute;
  width: 200px;
  height: 300px;
  object-fit: cover;
  top: 50%;
  left: 50%;
  transform-origin: center;
  transform: translate(-50%, -50%) rotateY(calc(25.7142857deg * var(--i)))
    translateZ(1000px); /* Increase translateZ to make the circle bigger */
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.carousel img:nth-child(1) {
  --i: 0;
}
.carousel img:nth-child(2) {
  --i: 1;
}
.carousel img:nth-child(3) {
  --i: 2;
}
.carousel img:nth-child(4) {
  --i: 3;
}
.carousel img:nth-child(5) {
  --i: 4;
}
.carousel img:nth-child(6) {
  --i: 5;
}
.carousel img:nth-child(7) {
  --i: 6;
}
.carousel img:nth-child(8) {
  --i: 7;
}
.carousel img:nth-child(9) {
  --i: 8;
}
.carousel img:nth-child(10) {
  --i: 9;
}
.carousel img:nth-child(11) {
  --i: 10;
}
.carousel img:nth-child(12) {
  --i: 11;
}
.carousel img:nth-child(13) {
  --i: 12;
}
.carousel img:nth-child(14) {
  --i: 13;
}
.carousel img:nth-child(15) {
  --i: 14;
}

@keyframes spin {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

@media (max-width: 1500px) {
  .bottom-left h1 {
    font-size: 4rem;
  }
  .bottom-right-column p {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
    padding-left: 20px;
    padding-bottom: 20px;
  }

  .carousel img {
    position: absolute;
    width: 200px;
    height: 300px;
    object-fit: cover;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%) rotateY(calc(25.7142857deg * var(--i)))
      translateZ(800px); /* Increase translateZ to make the circle bigger */
    transition: filter 0.5s ease, opacity 0.5s ease;
  }
}

@media (max-width: 768px) {
  .bottom-part {
    flex-direction: column;
  }
  .bottom-left h1 {
    font-size: 3rem;
    padding-bottom: 40px;
  }

  .carousel img {
    position: absolute;
    width: 200px;
    height: 300px;
    object-fit: cover;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%) rotateY(calc(25.7142857deg * var(--i)))
      translateZ(500px); /* Increase translateZ to make the circle bigger */
    transition: filter 0.5s ease, opacity 0.5s ease;
  }
}
