html,
body {
  scroll-behavior: smooth;
}

:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Ubuntu", sans-serif;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box; /* A good practice for predictable layout */
}

/* Original styles are preserved above this line */
/* --- Navbar --- */
.navbar {
  background: whitesmoke;
}

.nav-item .nav-link {
  color: white;
}

.navbar-nav .nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: black;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: #06376c;
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: black;
  text-shadow: 0 0 10px rgba(27, 45, 65, 0.5);
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0;
  height: 100vh;
  margin-top: 60px;
  width: 100%;
  min-height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  font-family: montserrat, sans-serif;
  color: darkblue;
}

.hero p {
  margin: 5px 0 30px 0;
  font-size: 22px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-family: montserrat, sans-serif;
}

.hero a {
  padding: 10px 25px;
  font-size: 1rem;
  border-radius: 25px;
  font-family: montserrat, sans-serif;
}

.hero a:hover {
  transition: all 0.3s ease-in-out;
}

.hero .animated {
  animation: up-down 2s ease-in-out infinite alternate-reverse both;
}

@keyframes up-down {
  0% {
    transform: translateY(10px);
  }

  100% {
    transform: translateY(-10px);
  }
}

/* --- General Section & Utility Styles --- */
section {
  padding: 60px 0;
  overflow: hidden; /* Prevents horizontal scroll from animations/shadows */
}

.project-category {
  font-weight: bold;
}

.widget:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .06);
}

.fade-in {
  animation: fadeIn 1s ease-in-out;
}

.key:hover {
  transform: scale(1.1);
  transition: all 0.3s ease-in-out;
}

.section-padding {
  padding: 5rem 0;
  scroll-margin-top: 80px;
}

/* --- About --- */
.aboutimg {
  margin-top: -80px;
}

.story-text {
  margin-top: -20px;
  text-align: center;
}

/* --- Portfolio --- */
.portfolio-card {
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 15px;
}

.portfolio-card:hover {
  transform: scale(1.03);
  border-bottom: 4px groove rgb(94, 158, 231);
}

.portfolio-card:hover .card-title {
  color: rgb(64, 64, 187);
  transition: 0.2s ease-in;
}

.portfolio-content {
  background-color: #fff;
  padding: 20px;
  text-align: center;
  overflow: hidden;
}

/* --- Services --- */
.service {
  transition: all 0.3s ease-in-out;
}

.service-item {
  width: fit-content;
  transition: all 0.3s ease-in-out;
  border: 1px solid #dee2e6;
  z-index: 1;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

.service-item:hover {
  box-shadow: 0 15px 30px rgba(100, 191, 255, 0.3);
  border-color: rgb(94, 158, 231);
}

.service-item img {
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 10px;
}

.service-item:hover img {
  transform: scale(1.02);
}

.service-box-caption {
  text-align: center;
  padding: 10px;
}

.service-category {
  color: black;
}

.service-item:hover .service-category {
  color: rebeccapurple;
}

.service .service-item {
  position: relative;
  overflow: hidden;
}

.service .service-item .service-info {
  opacity: 0;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -100%;
  z-index: 3;
  transition: all ease-in-out 0.5s;
  background: color-mix(in srgb, var(--background-color), transparent 10%);
  padding: 15px;
}

.service .service-item .service-info h4 {
  font-size: 18px;
  font-weight: 600;
  padding-right: 50px;
}

.service .service-item .service-info p {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 14px;
  margin-bottom: 0;
  padding-right: 50px;
}

.service .service-item .service-info .preview-link,
.service .service-item .service-info .details-link {
  position: absolute;
  right: 50px;
  font-size: 24px;
  top: calc(50% - 14px);
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  transition: 0.3s;
  line-height: 0;
}

.service .service-item .service-info .preview-link:hover,
.service .service-item .service-info .details-link:hover {
  color: var(--accent-color);
}

.service .service-item .service-info .details-link {
  right: 14px;
  font-size: 28px;
}

.service .service-item:hover .service-info {
  opacity: 1;
  bottom: 0;
}

/* --- Contact --- */
.contact-card {
  transition: all 0.4s ease-in-out;
  background-color: transparent;
  border: 1px solid #dee2e6;
  border-radius: 15px;
  padding: 40px 20px;
}

.contact-card:hover {
  box-shadow: 0 10px 30px rgba(0, 191, 255, 0.2);
  border-color: #00bfff;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background-color: #00bfff;
  transition: background-color 0.3s ease;
}

.contact-card:hover .contact-icon {
  background-color: #0077cc;
}

/* --- Flash Screen --- */
#startup-screen {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: zoomOut 1.5s ease 0.5s forwards;
  overflow: hidden;
}

.startup-title {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 800;
  color: black;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  animation: popIn 1s ease-in-out;
}

.startup-title span {
  color: darkblue;
}

@keyframes popIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(10);
    opacity: 0;
    visibility: hidden;
  }
}

/* --- Section Title Styling --- */
.section-title-wrapper {
  position: relative;
  display: inline-block;
}

.section-shadow-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5vw;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.05);
  z-index: 1;
  white-space: nowrap;
  pointer-events: none;
  text-transform: uppercase;
  font-family: 'poppito', sans-serif;
}

.section-heading {
  position: relative;
  z-index: 2;
  font-size: 2rem;
}


/************************************************************/
/****************** RESPONSIVE STYLES ADDED *****************/
/************************************************************/

/* --- Laptops & Desktops (up to 1200px) --- */
@media (max-width: 1200px) {
  .hero {
    padding: 60px 0;
  }
}

/* --- Tablets (up to 992px) --- */
@media (max-width: 992px) {
  .hero {
    margin-top: 40px;
    text-align: center;
    height: auto;
    min-height: 70vh;
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 18px;
  }

  .hero .animated {
    /* Reduce image size on smaller screens for better balance */
    max-width: 80%;
    margin: 0 auto;
  }
  
  .section-padding {
    padding: 3.5rem 0;
  }

  .section-heading {
    font-size: 1.8rem;
  }
  
  .section-shadow-title {
    font-size: 7vw;
  }
  
  .aboutimg {
    margin-top: 0; /* Reset negative margin */
  }
}

/* --- Mobile Devices (up to 768px) --- */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 60px 15px;
    margin-top: 20px;
  }

  .hero h1 {
    font-size: 2.2rem; /* Further reduce font size */
  }

  .hero p {
    font-size: 16px;
    margin-bottom: 25px;
  }

  /* Make sure navbar toggler button is easily clickable if you add one */
  .navbar-toggler {
    border: none;
  }
  .navbar-toggler:focus {
    box-shadow: none;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .section-shadow-title {
    font-size: 9vw; /* Adjust for narrower screens */
  }

  /* Make contact cards and other elements stack nicely */
  .contact-card, .service-item, .portfolio-card {
    margin-bottom: 20px;
  }

  .aboutimg {
    margin-top: 20px; /* Add some space above the image */
  }

  .story-text {
    margin-top: 0;
  }
}

/* --- Small Mobile Devices (up to 576px) --- */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 15px;
  }

  .hero a {
    padding: 8px 20px;
    font-size: 0.9rem;
  }

  .section-heading {
    font-size: 1.6rem;
  }

  .section-shadow-title {
    font-size: 12vw;
  }
  
  .contact-card {
    padding: 30px 15px;
  }

  /* Reduce info box padding on small screens */
  .service .service-item .service-info {
    padding: 10px;
  }

  .service .service-item .service-info h4,
  .service .service-item .service-info p {
    padding-right: 40px;
  }
  
  .service .service-item .service-info .preview-link {
    right: 40px;
  }
}