/*
 * Global Stylesheet for the portfolio site
 * The design takes inspiration from a minimal, modern aesthetic.
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #1a1a1a;
  background-color: #f9f9f9;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.btn-primary {
  background-color: #000;
  color: #fff;
}
.btn-primary:hover {
  background-color: #333;
}

.btn-dark {
  background-color: #000;
  color: #fff;
}
.btn-dark:hover {
  background-color: #333;
}

.btn-outline {
  border: 1px solid #ccc;
  color: #1a1a1a;
  background-color: transparent;
}
.btn-outline:hover {
  border-color: #000;
  color: #000;
}

/* Navigation */
.navbar {
  width: 100%;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 100;
  border-bottom: 1px solid #eaeaea;
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1.2rem;
  gap: 0.4rem;
}
.logo-icon {
  font-weight: 700;
  font-size: 1.4rem;
  background-color: #000;
  color: #fff;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

/* Logo image style */
.logo img {
  /* Set a reasonable height for the logo while preserving its aspect ratio */
  height: 32px;
  width: auto;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  position: relative;
  font-weight: 500;
  color: #444;
  padding-bottom: 0.25rem;
}
.nav-links a.active,
.nav-links a:hover {
  color: #000;
}
.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: #000;
  border-radius: 1px;
}
.talk-btn {
  font-size: 0.85rem;
}

/* Hero Section */
.hero {
  padding: 4rem 0 3rem;
  background-color: #fafafa;
}
.hero-content {
  display: flex;
  /* Prevent wrapping on larger screens so the hero image stays aligned to the right */
  flex-wrap: nowrap;
  align-items: center;
  /* Set a modest gap between text and image */
  gap: 1rem;
}
.hero-text {
  /* Allocate approximately 40% of the hero section to text. We use calc() to subtract half of the gap so the 40% and 60% columns plus the gap sum to 100%. */
  flex: 0 0 calc(40% - 0.5rem);
  max-width: calc(40% - 0.5rem);
}
.hero-image {
  /* Set the hero image container to 60% of the hero section width (double the original 20%). We subtract half of the gap so the combined width plus gap equals 100%. */
  flex: 0 0 calc(60% - 0.5rem);
  max-width: calc(60% - 0.5rem);
  display: flex;
  justify-content: center;
  align-items: center;

  /* Hide overflowing parts of the slider so it doesn't spill into the next section */
  overflow: hidden;

  /* Limit the height of the hero image to prevent it from overflowing vertically when the width is large */
  height: 450px;
  max-height: 450px;

  /* Give the entire slider container rounded corners so the curve is visible regardless of the slide image */
  border-radius: 32px;
}
.greeting {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero .description {
  color: #666;
  margin-bottom: 1.5rem;
  max-width: 480px;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.scroll-down {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #666;
}
.scroll-down i {
  font-size: 0.8rem;
}
/* Slider styles for the hero section */
.hero-image .slider {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-image .slider img {
  width: 100%;
  /* Stretch each slide to fill the height of the slider container so object-fit: cover crops correctly */
  height: 100%;
  /* Increase border radius for more pronounced curved edges */
  border-radius: 24px;
  object-fit: cover;
  /* Position will be set per slide rules below */
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* The first image remains in the normal flow to set the container height */
.hero-image .slider img:first-child {
  position: relative;
}

/* All other images are absolutely positioned on top of the first */
.hero-image .slider img:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
}

/* Show the active slide */
.hero-image .slider img.active {
  opacity: 1;
}

/* Work Section */
.work {
  padding: 4rem 0;
}
.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.work-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background-color: #f0f0f0;
  font-size: 0.85rem;
  cursor: pointer;
}
.filter.active {
  background-color: #000;
  color: #fff;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.work-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  /* Smooth transition for scaling effect on hover */
  transition: transform 0.3s ease;
}

/* Ensure images scale nicely on hover without affecting the grid layout */
.work-item {
  overflow: hidden;
}

/* Zoom effect on hover */
.work-item img:hover {
  transform: scale(1.05);
}
.work-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.work-item .category {
  font-size: 0.85rem;
  color: #777;
}
.view-all-wrapper {
  display: flex;
  justify-content: center;
}
.view-all-btn i {
  margin-left: 0.4rem;
}

/* Features Section */
.features {
  background-color: #1a1a1a;
  color: #fff;
  padding: 4rem 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.feature-item {
  text-align: center;
  padding: 1rem;
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.feature-item h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.feature-item p {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.5;
}

/* Footer */
.footer {
  padding: 2rem 0;
  background-color: #fafafa;
  border-top: 1px solid #eaeaea;
  text-align: center;
}
.footer p {
  font-size: 0.85rem;
  color: #777;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-text,
  .hero-image {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .hero-image {
    height: 320px;
  }
  .nav-links {
    display: none;
  }
  .talk-btn {
    display: none;
  }
  .navbar {
    justify-content: center;
  }
}

/* Experience Section */
.experience {
  padding: 4rem 0;
  background-color: #f5f5f5;
  text-align: center;
}

.experience-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.experience-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.experience-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  flex: 1 1 280px;
  max-width: 320px;
}

.experience-card h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.experience-card p {
  color: #666;
}

/* About Page */
.about-hero {
  padding: 4rem 0 2rem;
  background-color: #fafafa;
}
.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.about-hero .lead {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1rem;
  max-width: 850px;
}
.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.about-stats .stat {
  flex: 1 1 150px;
  text-align: center;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.about-stats h2 {
  font-size: 2rem;
  color: #000;
  margin-bottom: 0.25rem;
}
.about-stats p {
  font-size: 0.85rem;
  color: #777;
}

/* Services Page */
.services-section {
  padding: 4rem 0;
}
.services-intro {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #666;
  text-align: center;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.service-item {
  background-color: #fff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
}
.service-icon {
  font-size: 2rem;
  color: #000;
  margin-bottom: 1rem;
}
.service-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}
.service-item p {
  font-size: 0.9rem;
  color: #777;
}

/* Contact Page */
.contact-section {
  padding: 4rem 0;
  background: #fafafa;
  min-height: calc(100vh - 180px);
}
.contact-intro {
  max-width: 650px;
  margin: 0 auto 2.5rem;
  color: #666;
  text-align: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: start;
}
.contact-form,
.contact-details {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
.contact-form {
  padding: 2rem;
}
.contact-details {
  padding: 2rem;
}
.contact-form .form-group {
  margin-bottom: 1.2rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #222;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #111;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}
.contact-form .btn {
  border: 0;
  min-width: 160px;
}
.contact-details h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}
.contact-details p {
  margin-bottom: 0.8rem;
  color: #444;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.contact-details i {
  width: 18px;
  color: #000;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.whatsapp-float img {
  width: 34px;
  height: 34px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-form, .contact-details {
    padding: 1.25rem;
  }
  .about-hero h1 {
    font-size: 2rem;
  }
}

/* Portfolio Full Image Preview / Lightbox */
.work-item img {
  cursor: zoom-in;
}

.nas-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999999;
}

.nas-lightbox.active {
  display: flex;
}

.nas-lightbox__image {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  background: #fff;
}

.nas-lightbox__close {
  position: fixed;
  top: 18px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #111;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.nas-lightbox__close:hover {
  background: #f2f2f2;
}

@media (max-width: 768px) {
  .nas-lightbox {
    padding: 14px;
  }
  .nas-lightbox__image {
    max-width: 96vw;
    max-height: 84vh;
    border-radius: 8px;
  }
  .nas-lightbox__close {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    font-size: 28px;
  }
}
