/* Global Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;

  flex-direction: row;
}

.mainBody {
  display: flex;
  flex-direction: column;
  margin-left: 17%;
  margin-top: 6rem;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  font-weight: bold;
  z-index: 999;
  display: none; /* Hidden by default */
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #bf0a0a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Header Styling */
.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 40px;
  background: #fff;
  border-bottom: 2px solid #ccc;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/*Logo*/
.logo-container {
  display: flex;
  align-items: center;
}
/*Logo*/
.logo-container img {
  height: 50px;
}
/*-------------------------*/
#filtericon {
  display: none; /* Hide by default */
}

#filtericon:hover svg {
  fill: white; /* Change icon color on hover */
}

/*-------------------------*/

/* Navigation Home, Packages, Compare 4*/
.navigation {
  display: flex;
  margin-left: 9%;
  gap: 60px;
}

.nav-link {
  text-decoration: none;
  color: #585a5a;
  font-size: 18px;
}

.nav-link:hover {
  color: #bf0a0a;
}
/*-------------------------*/

/* Sidebar */
.sidebar {
  width: 15%;
  padding: 20px;
  background: #f8f8f8;
  border-right: 1px solid #ddd;
  position: fixed;
  top: 100px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
/*-------------------------*/

/* Main Content */
.main-content {
  flex: 1;
  padding: 10px 20px 20px 20px;
  margin-left: 1%;
  overflow-x: auto;
  /* max-width: 83vw; */
}

.tab {
  flex: 1;
  padding: 10px 20px 0px 20px;
  margin-left: 1%;

  gap: 10px;
  overflow: hidden;
  border-bottom: 1px solid #ccc;
  background-color: #ffffff;
  color: black;
}

/* Style the buttons inside the tab */
.tabbtn {
  padding: 10px 20px 5px 20px;
  border: none;
  background-color: #ccc8c8;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 10px 10px 0 0; /* Curved top edges, flat bottom edges */
}

.tabbtn.active {
  background-color: #bf0a0a;
  color: white; /* White text for active button */
}

.tabbtn:hover {
  background-color: #bf0a0a;
  color: white;
}

/* Style the tab content */
.tabcontent {
  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
}

/* Package Box */
.pakage-box {
  display: flex;
  gap: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  margin-bottom: 20px;
}

.pakage-box img {
  width: 100%;
  max-width: 150px;
  max-height: 130px;
  object-fit: contain;
  border-radius: 8px;
}

/* Package Details */
.pakage-details {
  flex: 1;
}

.pakage-details h3 {
  margin: 0;
  font-size: 18px;
}

.pakage-details p {
  margin: 5px 0;
  color: #555;
}

.pakage-details .price {
  font-weight: bold;
  color: #333;
  text-align: right;
}

.pakage-details .meta {
  font-size: 12px;
  color: grey;
}

/* Package Image */

.pakage-image-container {
  display: flex;
  flex-direction: column;
}

.pakage-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.view-website {
  display: inline-block;
  background-color: #007bff; /* Blue color */
  color: #fff; /* White text */
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  text-align: center;
  border: none;
  cursor: pointer;
}

.view-website:hover {
  background-color: #0056b3; /* Darker blue on hover */
}
/*-----------------------------------------------------------------------------------------------------------------------------*/

/* Dropdown Default */
.default_option {
  color: grey;
}

/* Comparison View */
.comparison-view .pakage-box {
  display: none;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  width: 100%;
  max-width: calc(100vw - 18%);
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 16px -1px 16px 16px;
  margin-top: 20px;
}

/* Comparison Table Base */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-top: 0;
}

/* Table Cells Base Styling */
.comparison-table th,
.comparison-table td {
  padding: 8px 16px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.5;
}

/* Group Header Styling */
.group-header {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

.group-header td {
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #bf0a0a;
  letter-spacing: 0.05em;
}

/* Sticky Group Header */
.comparison-table tr:nth-child(1),
.comparison-table tr:nth-child(2),
.comparison-table tr:nth-child(3) {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 101;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Group Items Styling */
.group-item td {
  padding: 8px 16px 12px 32px;
  background-color: #ffffff;
}

.group-item:hover {
  background-color: #f7fafc;
}

/* Sticky First Column Enhancement */
.comparison-table th:first-child,
.comparison-table td:first-child {
  position: sticky;
  left: 0;
  background-color: white;
  z-index: 2;
  width: 275px; /* Change min-width and max-width to fixed width */
  text-align: left;
  font-weight: 500;
  border-right: 2px solid #edf2f7;
  box-shadow: 4px 0 6px -2px rgba(0, 0, 0, 0.05);
  white-space: normal; /* Allow text wrapping inside */
  word-wrap: break-word;
}

/* Group Header First Column Enhancement */
.comparison-table .group-header td:first-child {
  position: sticky;
  left: 0;
  background: #f8fafc;
  font-weight: 600;
  z-index: 4;
  border-right: 2px solid #edf2f7;
  box-shadow: 4px 0 6px -2px rgba(0, 0, 0, 0.05);
}

/* Package Logo Enhancement */
.package-logo {
  width: 120px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  padding: 8px;
}

/* Checkmark Styling */
.comparison-table span[style*="color: green"] {
  color: #059669 !important;
  font-size: 18px;
}

.comparison-table span[style*="color: black"] {
  color: #6b7280 !important;
  font-size: 18px;
}

/* Price Cell Styling */
.comparison-table td[data-type="price"] {
  font-weight: 600;
  color: #2d3748;
  font-size: 16px;
}

/* Compare Button */
.compare-button {
  padding: 8px 16px;
  border: 2px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s ease;
  margin-top: 10px;
}

.compare-button:hover {
  background: #007bff;
  color: white;
}

.compare-button.added {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.compare-button.added:hover {
  background: #218838;
  border-color: #218838;
}

/* Remove Compare Button Enhancement */
.remove-compare {
  background: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.remove-compare:hover {
  background: #dc2626;
}

/* Back to Packages Button */
.back-to-packages {
  margin-top: 20px;
  padding: 10px 20px;
  background: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

.back-to-packages:hover {
  background: #388e3c;
}

/* Scrollbar Enhancement */
.comparison-table-wrapper::-webkit-scrollbar {
  height: 10px;
}

.comparison-table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 5px;
}

.comparison-table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
  border: 2px solid #f1f5f9;
}

.comparison-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Alternating Row Colors Within Groups */
.group-item:nth-child(even) {
  background-color: #fafafa;
}

/* First Row (Institute Details) Enhancement */
.comparison-table tr:first-child td {
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

/* Value Highlighting */
.comparison-table td:not(:first-child):not([data-type="button"]) {
  position: relative;
}

.comparison-table td:not(:first-child):not([data-type="button"]):hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(59, 130, 246, 0.05);
  pointer-events: none;
}

/*-----------------------------------------------------------------------------*/

/* For mobile phones */
@media screen and (max-width: 768px) {
  .hero {
    padding: 80px 0px 0px 0px;
    height: 50vh; /* Adjust height for better mobile viewing */
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    align-items: center; /* Center align horizontally */
    text-align: center; /* Ensures text elements are centered */
  }

  .search-bar {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 10px; /* Space between input and button */
    width: 100%; /* Optional: Adjust width */
    max-width: 85%; /* Adjust as needed */
  }

  .search-bar input {
    flex: 1;
    padding: 10px;

    border-radius: 5px;
    font-size: 14px;
  }

  .search-bar button {
    padding: 10px 15px;
    border: none;
  }

  .header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 0px;
    background-color: white;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);

    right: 0;
    width: 100%;
    z-index: 1000;
  }
  .header .login-buttons {
    margin-right: 15px;
  }
  .header .login-buttons a {
    padding: 8px 15px;
    font-size: 8px;
  }

  .logo {
    height: 40px;
    margin-left: 15px;
  }

  .logo-container img {
    height: 40px;
  }

  .navigation {
    display: flex;
    margin-right: 9%;
    gap: 10%;
  }

  .nav-link {
    font-size: 12px;
  }

  .tab {
    padding: 2.5% 5% 0% 20%;
  }

  .mainBody {
    margin-left: 0;
  }

  #filtericon {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 40px;
    height: 40px;
    display: flex; /* Show on mobile by default */
    align-items: center;
    justify-content: center;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 99999;
  }

  #filtericon:hover {
    transform: scale(1.1);
  }

  #filtericon svg {
    width: 24px;
    height: 24px;
    fill: #333; /* Default icon color */
    transition: fill 0.3s ease;
  }
  .sidebar {
    width: 100%;
    top: 15.5%;
    padding: 0% 20px 0% 20px;
    /* display: none;  */
  }
  .view-website {
    font-size: 7px;
  }
  .compare-button {
    font-size: 7px;
  }

  .pakage-box {
    margin-bottom: 10px;
  }

  .pakage-box img {
    width: 100%;
    max-width: 100px;
    object-fit: contain;
    border-radius: 8px;
  }
  .pakage-details h3 {
    font-size: 13px;
  }
  .pakage-details p {
    font-size: 10px;
  }

  .main-content {
    padding: 10px 20px 20px 20px;
  }

  .package-logo {
    width: 85px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding: 0px;
  }

  .comparison-table th,
  .comparison-table td {
    font-size: 10px;
    padding: 5px;
  }

  /* First row */
  .comparison-table tr:first-child td {
    padding-top: 0px;
    padding-bottom: 0px;
    padding-right: 10px;
    border-bottom: 2px solid #e2e8f0;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child {
    position: sticky;
    padding-right: 10px;
  }
}
