/* ==================== Global Styles ==================== */
*,
*::before,
*::after {
  box-sizing: border-box; /* Include padding/border in element width */
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;     /* Prevent horizontal scrolling */
  font-family: 'Poppins', sans-serif;
  background: #f4f8fb;
  color: #333;
  line-height: 1.6;
  scroll-padding-top: 80px; /* Navbar offset for anchor links */
}

/* ==================== Navbar ==================== */
nav {
  background: transparent;
  color: #ffffff;
  padding: 10px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 999;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
  background: #0077b6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #ffffff;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

nav ul li a:hover {
  color: #90e0ef;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #0077b6;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 10px;
    border-radius: 0 0 8px 8px;
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    color: white;
  }
}

/* ==================== Hero Section ==================== */
header {
  background: linear-gradient(135deg, #0077b6, #0096c7);
  color: white;
  padding: 120px 20px 80px;
  text-align: center;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
}

.hero-image img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgb(27, 156, 220);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s;
}

.hero-image img:hover {
  transform: scale(1.05);
}

.hero-text {
  text-align: center;
}

@media (min-width: 768px) {
  .hero-text {
    text-align: left;
  }
}

/* Hero buttons */
.btn, .btn-outline {
  display: inline-block;
  margin: 10px;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.btn {
  background: white;
  color: #0077b6;
}

.btn:hover {
  background: #90e0ef;
}

.btn-outline {
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: #0077b6;
}

/* ==================== Sections ==================== */
section {
  background: white;
  margin: 40px auto;
  padding: 40px 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 1100px;
}

/* Section headings */
h2 {
  color: #0077b6;
  margin-bottom: 20px;
}

/* ==================== Cards ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
}

.card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ==================== Gallery ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
}

.gallery-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

.image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  overflow: hidden;
}

.image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: 0.3s;
}

.image-container img:hover {
  transform: scale(1.05);
}

.caption {
  padding: 10px 5px;
  font-weight: 500;
  color: #222;
  text-align: center;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== Lightbox ==================== */
#lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#lightboxCaption {
  color: #fff;
  font-size: 1rem;
  text-align: center;
}

#closeBtn {
  position: absolute;
  top: 15px; right: 35px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

#closeBtn:hover {
  color: #bbb;
}

/* ==================== Footer ==================== */
footer {
  background: #0077b6;
  color: white;
  text-align: center;
  padding: 20px 0;
}

footer a {
  color: #90e0ef;
  text-decoration: none;
}

/* ==================== Project Modal ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.modal .close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #aaa;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

.modal .close:hover {
  color: #000;
}

/* ==================== Contact Form ==================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-bottom: 5px;
  font-weight: 500;
  color: #0077b6;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #0077b6;
  outline: none;
}

.contact-form button {
  align-self: flex-start;
}
