/* =========================================
   GLOBAL LAYOUT
========================================= */
.container {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  width: 95%;
  max-width: 1200px;
  margin: 40px auto;
  position: relative;
  overflow: visible;
}

/* =========================================
   SIDEBAR AREA (STICKY + SMOOTH + FORM BELOW LIST)
========================================= */
.sidebar-area {
  width: 280px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Sticky container */
.sticky-sidebar {
  position: sticky;
  top: 110px; /* adjust to match navbar height */
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Sidebar Box */
.sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e4e9f2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Heading */
.sidebar h3 {
  color: #013c74;
  margin-bottom: 12px;
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid #d0e3f5;
  padding-bottom: 6px;
}

/* Sidebar Menu */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  background: #f3f9ff;
  color: #013c74;
  padding: 10px 12px;
  margin-bottom: 8px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sidebar li:hover,
.sidebar li.active {
  background: #013c74;
  color: #ffd700;
}

/* =========================================
   APPLY FORM (INSIDE SIDEBAR)
========================================= */
.apply-form {
  background: #ffffff;
  border: 1px solid #d0e3f5;
  padding: 18px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(172, 204, 233, 0.12);
  transition: all 0.3s ease;
}

.apply-form:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(1, 60, 116, 0.15);
}

.apply-form h4 {
  color: #013c74;
  text-align: center;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1em;
  border-bottom: 2px solid #d0e3f5;
  padding-bottom: 4px;
}

/* Input Fields */
.apply-form input,
.apply-form select,
.apply-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  background: #f9fbff;
  font-size: 0.9em;
  outline: none;
  transition: all 0.3s ease;
}

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  border-color: #013c74;
  box-shadow: 0 0 4px rgba(1, 60, 116, 0.25);
  background: #fff;
}

/* Submit Button */
.apply-form button {
  margin-top: 15px;
  width: 100%;
  background: #013c74;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.apply-form button:hover {
  background: #0254a2;
  transform: translateY(-2px);
}

/* =========================================
   MAIN CONTENT AREA
========================================= */
.main {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  overflow: visible;
  min-height: 600px;
}

.main section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.main section.active {
  display: block;
}

.main h2 {
  color: #013c74;
  margin-bottom: 10px;
  font-weight: 600;
}

.main p {
  color: #2e4a6b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* =========================================
   SERVICE GRID
========================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.service-box {
  background-size: cover;
  background-position: center;
  height: 180px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(1, 60, 116, 0.1);
  transition: all 0.4s ease;
}

.service-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(1,60,116,0.5));
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.service-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(1, 60, 116, 0.2);
}

.service-box h4 {
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: #fff;
  font-weight: 600;
  font-size: 1.05em;
  z-index: 2;
}

/* =========================================
   ANIMATION
========================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }

  .sidebar-area,
  .sticky-sidebar {
    width: 100%;
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .apply-form {
    order: 2;
  }
}

@media (max-width: 600px) {
  .main {
    padding: 20px;
  }

  .service-box {
    height: 160px;
  }

  .apply-form {
    padding: 15px;
  }
}
