@import url('https://fonts.googleapis.com/css2?family=Chonburi&family=Italianno&family=Manrope:wght@100..800&family=Poiret+One&family=Shippori+Mincho&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* Variables */
:root {
  --primary-color:#0A2640;
  --secondary-color:#B0C6D1;
  --yellow-color: #ff9f1c;
  --accent-color:#FFD700;
  --bg-color: #F5F5F5;
  --text-color:#333333;
  --italiano:"Italianno", serif;
  --manrope: "Manrope", serif;
  }
  .hidden{
    display: none;
  }
  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding:0;
    overflow-x: hidden;
  }
  
  .top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0px 20px;
    font-family: var(--manrope);
    font-size: 16px;
  }
  
  .contact-info span {
    margin-right: 20px;
    padding: 20px;
    display: inline-flex;
    align-items: center;
  }
  
  .contact-info span i {
    margin-right: 8px;
  }
  
  .social-icons a {
    color: white;
    margin-left: 15px;
    font-size: 26px;
    text-decoration: none;
  }
  
  .social-icons a:hover {
    color: #FFD700; /* Optional: Add hover effect for icons */
  }
  
  /* Header Container */
  .header {
    background-color: var(--secondary-color);
    padding: 0; /* Ensure no unnecessary padding */
    position: relative;
  }
  
  /* Flexbox Layout for Header */
  .header header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 100%;
    padding: 0 20px;
    position: relative; /* Ensure child elements can be positioned relative to this container */
  }
  
  /* Left-aligned Logo */
/* Left-aligned Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between the image and text */
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none; /* Remove underline from links */
  color: black; /* Default text color */
}

.profile-img {
  width: 100px; /* Adjust image size as needed */
  height: 100px;
  border-radius: 50%; /* Makes the image circular */
  object-fit: cover;
}


.logo-text h1 {
  font-size: 3rem; /* Adjust font size for the name */
  font-family:var(--italiano); /* Mimics the font style */
  font-weight: normal;
  margin: 0; /* Remove extra spacing */
  letter-spacing: 2.8px;
}

.logo-text p {
  font-size: 10px; /* Adjust font size for the title */
  line-height: 1.3;
  margin-top: -15px;
  font-family: var(--manrope);
}

/* Right Navigation */
.nav-right {
  display: flex;
  font-family: var(--manrope);
  justify-content: space-between;
  gap: 40px;
  height: auto;
  margin-left: auto;
  margin-bottom: auto;
  padding-top:15px;
  position: relative; /* Necessary for hover-rect */
}

.nav-right a {
  text-decoration: none;
  font-size: 20px;
  color: #000000; /* Default color for all nav items */
  transition: color 0.3s ease; /* Smooth color transition */
  position: relative;
  z-index: 2; /* Keep text above hover-rect */
  padding: 10px;
}

.hover-rect {
  position: absolute;
  top: 0; /* Align it to the top of the parent container */
  left: 0;
  height: 100%; /* Dynamically adjust to match parent height */
  background-color: var(--primary-color);
  width: 100px; /* Default width, dynamically updated via JS */
  border-radius: 0; /* Remove rounding for cleaner alignment */
  transition: transform 0.3s ease, width 0.3s ease; /* Smooth hover animation */
  z-index: 1; /* Behind the text */
}

/* Active State for Initial Button */
.nav-item.active {
  color: white; /* Active button text is white */
}

/* Default State (Non-active) */
.nav-item {
  color: black; /* Default non-active state is black */
}

/* Hover Effect */
.nav-item:hover {
  color: white;
}

/* Placeholder (Blurred) */
.placeholder {
  filter: blur(1.2px);
  transition: filter 0.3s ease-in-out; /* Smooth transition when the full image loads */
}

/* Image container to ensure proper sizing */
.profile-img {
  width: 75px; 
  height: 75px;
  border-radius: 50%;
  object-fit: cover;
}

  /* Drop Box */
  .dropbox {
    position: relative; /* Keep it relative to its container */
    margin-left: auto; /* Push it to the right end of the flex container */
    display: inline-block;
    display: none;
  }
  
  .dropbtn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    cursor: pointer;
  }
  
  .dropbtn span {
    display: inline-block;
    transition: all 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940);
  }
  
  .dropbtn:hover {
    color: #fdfffc;
    background-color: #000;
  }
  
  .dropdown-content {
    display: none;
    position: absolute; /* Dropdown appears below the button */
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    right: 0; /* Align dropdown content to the right of the button */
    top: 100%; /* Dropdown appears below the button */
    text-align: center; /* Align text to the right */
  }
  
  .dropdown-content li {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    font-family: var(--manrope);
  }
  
  .dropdown-content li a {
    color: black;
    text-decoration: none;
    display: block;
  }
  
  .dropdown-content li:hover {
    background-color: #f1f1f1;
  }
  
  .dropbox:hover .dropdown-content {
    display: block;
  }
  
  .dropdown-content {
    transform: scale(0.9); /* Shrinks slightly */
    transition: transform 0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940), opacity 0.3s ease;
  }
  
  .dropbox:hover .dropdown-content {
    transform: scale(1); /* Grows to normal size */
  }
  
  /* Dropdown icon animation */
  @keyframes rotate-in-center {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(180deg);
    }
  }
  
  @keyframes rotate-out-center {
    0% {
      transform: rotate(180deg);
    }
    100% {
      transform: rotate(0deg);
    }
  }
  
  
  @media (max-width: 768px) { /* Target devices with a screen width of 768px or smaller */
  /* Drop Box */
  .dropbox {
    display: block;
  }
    .nav-left {
      content-visibility: hidden;
    }
    .nav-right {
      content-visibility: hidden;
    }
    .top-container {
      content-visibility: hidden;
    }
    .header header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      max-width: 100%;
      padding: 2px 2px;
      position: relative; /* Ensure child elements can be positioned relative to this container */
    }
    .profile-img {
      width: 75px; /* Adjust image size as needed */
      height: 75px;
      border-radius: 50%; /* Makes the image circular */
      object-fit: cover;
      margin:10px;
    }
    
    .logo-text h1 {
      font-size: 34px; /* Adjust font size for the name */
      font-family:var(--italiano); /* Mimics the font style */
      font-weight: normal;
      margin: 0; /* Remove extra spacing */
      letter-spacing: 1px;
    }
    
    .logo-text p {
      font-size: 9px; /* Adjust font size for the title */
      text-align: left;
      line-height: 1.3;
      margin: 0;
  }
  }

  .about_banner {
    position: relative;
    width: 100%;
    overflow: hidden;
  }
  
  .about_banner img {
    width: 100%;
    height: auto; /* Automatically adjusts the height to maintain aspect ratio */
    object-fit: cover; /* Ensures the image scales properly */
    display: block;
  }
  
/* Light overlay on the image */
.about_banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Light color with opacity */
  z-index: 1;
}

/* Text styling */
.about_content {
  position: absolute;
  top: 50%;
  left:5%;
  transform: translateY(-50%);
  z-index: 2; /* Ensures text is above the overlay */
  color: white;
  font-family: var(--manrope);
  padding: 20px; /* Adds space around the text */
  text-align: center; /* Centers the text for better appearance */
}

  
  .about_content h2 {
    font-size: 3em; /* Adjusted font size for smaller screens */
    margin: 0;
  }
  
  /* Media queries for mobile responsiveness */
  @media (max-width: 768px) {
    .about_content {
      top: 40%; /* Adjust positioning */
      left: 10%; /* Reduce side spacing */
      transform: translateY(-40%);
      padding: 10px;
    }
  
    .about_content h2 {
      font-size: 2.5em; /* Reduce font size */
    }
  }
  
  @media (max-width: 480px) {
    .about_content {
      top: 50%; /* Adjust positioning further */
      left: 5%; /* Less side spacing */
      transform: translateY(-30%);
      padding: 5px;
    }
  
    .about_content h2 {
      font-size: 1.5em; /* Smaller font size for extra small screens */
    }
  }
/* Container for the grid layout */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Three equal columns */
  gap: 5px; /* Space between grid items */
  padding: 16px;
  margin: 0 auto; /* Center the grid container */
  max-width: 960px; /* Center-align and limit width */
}

/* Style for grid items */
.grid-item {
  position: relative;
  overflow: hidden; /* Crop any overflowing content */
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16 / 9; /* Maintain a consistent aspect ratio for all grid items */
}

.grid-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure images cover the grid-item area while maintaining aspect ratio */
  transition: transform 0.3s ease;
}

.grid-item img:hover {
  transform: scale(1.02);
  cursor: pointer;
}

/* Responsive Layout - 2 columns for medium screens */
@media (max-width: 800px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive Layout - 1 column for small screens */
@media (max-width: 500px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

/* Modal image zoom animation */
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

#imageModal img {
  animation-name: zoom;
  animation-duration: 0.6s;
  max-width: 100%;
  height: auto; /* Ensure the modal image maintains dynamic dimensions */
}


/* Back-to-Top Button Styles */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 15px;
  padding: 15px 15px;
  background-color: var(--primary-color);
  color: white;
  font-size: 14px;
  border-color: white;
  border-width: 3px;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* Initially hidden */
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}
.back-to-top:hover {
  background-color: var(--yellow-color);
  animation:color-change 1s ease-in-out;
  scale:1.2;
}

@keyframes color-change {
  0% {
    background-color: var(--primary-color);
  }
  100% {
    background-color: var(--text-color);
  }
}

/* Animation: bounce-in-top */
@-webkit-keyframes bounce-in-top {
  0% {
    -webkit-transform: translateY(-500px);
            transform: translateY(-500px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
    opacity: 0;
  }
  38% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
    opacity: 1;
  }
  55% {
    -webkit-transform: translateY(-65px);
            transform: translateY(-65px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  72% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  81% {
    -webkit-transform: translateY(-28px);
            transform: translateY(-28px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  90% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  95% {
    -webkit-transform: translateY(-8px);
            transform: translateY(-8px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
}
@keyframes bounce-in-top {
  0% {
    -webkit-transform: translateY(-500px);
            transform: translateY(-500px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
    opacity: 0;
  }
  38% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
    opacity: 1;
  }
  55% {
    -webkit-transform: translateY(-65px);
            transform: translateY(-65px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  72% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  81% {
    -webkit-transform: translateY(-28px);
            transform: translateY(-28px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  90% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  95% {
    -webkit-transform: translateY(-8px);
            transform: translateY(-8px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
}

/* Apply Animation to Button */
.back-to-top.show {
  display: block;
  animation: bounce-in-top 0.8s ease-in-out;
}
.footer {
  background-color: var(--primary-color);
  color: var(--bg-color);
  padding: 40px 20px;
  font-family: var(--manrope);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-links,
.footer-qr,
.footer-socials {
  flex: 1;
  margin: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.footer-links h3,
.footer-qr h3,
.footer-socials h3 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 5px;
}

.footer-links a {
  color: var(--bg-color);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--yellow-color);
}

.qr-container {
  background-color: var(--bg-color);
  padding: 20px;
  display: inline-block;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  align-self: center;
}

.qr-container img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.footer-socials .social-icons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.footer-socials a {
  font-size: 1.5rem;
  color: var(--bg-color);
  transition: color 0.3s;
  text-decoration: none;
}

.footer-socials a:hover {
  color: var(--yellow-color);
}

/* Responsive Design for Tablets and Smaller Screens */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column; /* Stack sections vertically */
    align-items: center; /* Center align sections */
  }
  .footer-links,
  .footer-qr,
  .footer-socials {
    margin-bottom: 20px;
    flex: unset; /* Remove flex equal width for sections */
    width: 100%; /* Ensure sections span full width */
  }

  .qr-container img {
    width: 120px; /* Adjust QR code size for smaller screens */
    height: 120px;
  }
}

/* Responsive Design for Mobile Screens */
@media (max-width: 480px) {
  .footer {
    padding: 30px 15px; /* Reduce padding for smaller screens */
  }

  .footer-links h3,
  .footer-qr h3,
  .footer-socials h3 {
    font-size: 1.2rem; /* Adjust section title size */
  }

  .footer-links a {
    font-size: 0.9rem; /* Adjust link text size */
  }

  .footer-socials a {
    font-size: 1.2rem; /* Adjust social icon size */
  }

  .qr-container img {
    width: 100px; /* Further reduce QR code size */
    height: 100px;
  }
}
