html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

/* Navigation */
.navbar {
  padding: 1rem 0;
}

.navbar-brand .logo-img {
  height: 50px;
  width: auto;
}

.navbar-nav .nav-link {
  padding: 0.5rem 1rem;
  color: #333 !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #4CAF50 !important;
}

/* Section Styling */
.hero-section {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.hero-section h1 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.homepage-section {
  padding: 60px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #333;
}

.about-section, .contact-section {
  padding: 80px 0;
}

.projects-section {
  padding: 80px 0;
}

/* Project Gallery */
.projects-container.scrollable {
  max-height: 800px;
  overflow-y: auto;
  padding-right: 10px;
}

.projects-container.scrollable::-webkit-scrollbar {
  width: 8px;
}

.projects-container.scrollable::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.projects-container.scrollable::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.projects-container.scrollable::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.project-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.project-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.project-title {
  padding: 10px;
  text-align: center;
  font-weight: 600;
  color: #333;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-title .badge {
  font-size: 0.75rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 30px;
  padding: 20px 15px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 15px;
  text-align: center;
}

.lightbox-description {
  color: #ccc;
  font-size: 1rem;
  margin-top: 10px;
  text-align: center;
  max-width: 600px;
}

.lightbox-counter {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 10px;
  text-align: center;
}

/* Lightbox Navigation Dots */
.lightbox-nav-dots {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  justify-content: center;
}

.lightbox-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.lightbox-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.lightbox-dot.active {
  background: white;
  transform: scale(1.3);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 40px;
  }

  .lightbox-nav {
    font-size: 25px;
    padding: 15px 10px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-content img {
    max-height: 70vh;
  }

  .lightbox-title {
    font-size: 1.2rem;
  }
}

/* Contact Cards */
.contact-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contact-card h4 {
  color: #4CAF50;
  margin-bottom: 1rem;
  font-weight: 600;
}

.contact-card a {
  color: #667eea;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  margin-top: auto;
}

.social-links a {
  font-size: 1.1rem;
  transition: opacity 0.3s ease;
}

.social-links a:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0 40px;
  }

  .section-title {
    font-size: 2rem;
  }

  .project-img {
    height: 250px;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}