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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Header styles */
header {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
header h1 {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Filter section */
.filters {
  background-color: white;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.filters h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.filter-controls select, 
.filter-controls button {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 1rem;
}
.filter-controls label {
    display: block;
    margin-bottom: 4px; /* space between label and input */
    font-weight: bold;
}

.filter-controls .filter-group {
    margin-bottom: 16px; /* space between filter groups */
}

.filter-controls button {
  background-color: #2575fc;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}
.filter-group button {
  width: auto;
  margin-top: 33px;
  align-self: flex-end; /* aligns button to the left, not stretching */
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 4px;
}
.filter-controls button:hover {
  background-color: #1a5dc8;
}
/* Side-by-side layout inside the bordered filter-controls box */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 30px 20px 20px 20px;
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 6px;
}

/* Individual filter items */
.filter-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px; /* flexible width, min 200px */
}

/* Label spacing */
.filter-controls label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}

/* Ensure select and input take full width */
.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

/* Optional: adjust spacing below section */
.filters {
  margin-bottom: 2rem;
}

/* Agency card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}


.agency-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.agency-card.promoted {
  grid-column: span 2;
  background-color: #fffbea; /* light yellow background to highlight */
  position: relative; /* needed for promoted badge positioning */
  align-self: start;   /* ensures it doesn’t stretch down the grid */
}

.agency-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
  width: 100%;
  height: 180px; /* adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  padding: 8px;
  box-sizing: border-box;
}

.card-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}


.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #222;
}

.card-info {
  margin-bottom: 1rem;
  color: #666;
}

.card-info p {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
}

.card-info .label {
  font-weight: bold;
  margin-right: 0.5rem;
  min-width: 80px;
}

.rating {
  color: #ffc107;
  margin-bottom: 0.5rem;
}

.price {
  color: #28a745;
  font-weight: bold;
  margin-bottom: 1rem;
}

.card-button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: #6a11cb;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.consult-button-card {
  background-color: #777777;
  margin-bottom: 0.5rem;
}

.consult-button-card:hover {
  background-color: #218838;
}

.consult-button-filter {
  background-color: #7d7d7d;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  width: auto;
  height: 35px;
  line-height: 1;
  margin-top: 33px; /* aligns with Reset button */
  align-self: flex-end;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.consult-button-filter:hover {
  background-color: #0056b3;
}


/* Footer */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Promoted Section Styles */
.promoted-section {
    margin-bottom: 3rem;
}

.promoted-title {
    color: #ff6b35;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.promoted-title i {
    color: #ffd700;
    margin-right: 0.5rem;
}

.regular-title {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
    border-top: 2px solid #e0e0e0;
    padding-top: 2rem;
}

/* Promoted Card Styles */

.promoted-card .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #ffd700, #ff6b35);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Promoted Badge */
.card {
  position: relative;
}

.promoted-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: gold;
  color: #000;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 1;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.promoted-badge i {
  animation: pulse 2s infinite;
  color: #b8860b; /* darker gold for the crown */
}

/* Pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Enhanced promoted card content */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-button {
  padding: 8px 16px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
  border-radius: 4px;
}
.tab-button.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.tabs {
  display: flex;
  justify-content: center; /* 👈 This centers the tabs */
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
/* The container for tabs + card box */
.tabbed-box {
  position: relative;
  margin-top: 40px;
}

/* Tabs styled like folder tabs */
.tabs {
  position: absolute;
  top: -36px;
  left: 20px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

/* Tab buttons */
.tab-button {
  background: white;
  border: 2px solid #ccc;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tab-button.active {
  background-color: #0602e5;
  border-color: #aaa;
  border-bottom: 2px solid #f9f9f9;
}

.tab-button:hover {
  background-color: #eee;
}

.floating-footer-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 250px;
  background-color: #2574fc8c;
  color: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 0.95rem;
}

.floating-footer-widget p {
  margin: 0;
  line-height: 1.4;
}

.footer-callout-link {
  display: inline-block;
  margin-top: 0.5rem;
  background-color: #5f28a7;
  color: #fff;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.footer-callout-link:hover {
  background-color: #1e7e34;
}

/* The card container with background */
.card-box {
  background-color: #f9f9f9;
  border: 2px solid #ccc;
  border-radius: 6px;
  padding: 30px 20px 20px 20px;
}

.card-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 4px;
}

.card-field .label {
  font-weight: bold;
  white-space: nowrap;
}

.card-field .value {
  flex: 1;
  text-align: right;
  word-break: break-word;
  max-width: 105%; /* You can adjust this depending on layout */
}
button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* General form field styling */
.consultation-form-section form .form-group {
  margin-bottom: 1.5rem;
}

.consultation-form-section form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #444;
}

.consultation-form-section form input,
.consultation-form-section form textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
}
.consultation-form-section form button[type="submit"] {
  background-color: #6a11cb;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  width: 100%;
}

.consultation-form-section form button[type="submit"]:hover {
  background-color: #5a0cb0;
}
.thank-you-section {
  background-color: #fff;
  padding: 3rem 2rem;
  margin: 4rem auto;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 1.2rem;
  color: #333;
}

.thank-you-section .consult-submit-button {
  margin-top: 2rem;
  text-decoration: none;
  display: inline-block;
  background-color: #6a11cb;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

.thank-you-section .consult-submit-button:hover {
  background-color: #5a0cb0;
}


/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Container adjustments */
  .container {
    width: 95%;
    padding: 0 0.75rem;
  }

  /* Header adjustments */
  header h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  /* Filter controls - mobile friendly layout */
  .filter-controls {
    flex-direction: column;
    gap: 15px;
    padding: 20px 15px;
  }

  .filter-group {
    flex: 1 1 100%;
    margin-bottom: 0;
  }

  .filter-group button {
    margin-top: 10px;
    width: 100%;
  }

  .filter-controls select,
  .filter-controls input,
  .filter-controls button {
    width: 100%;
    margin-bottom: 0;
  }

  /* Card grid - single column on mobile */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Promoted cards - remove span behavior on mobile */
  .agency-card.promoted {
    grid-column: span 1;
  }

  /* Tab system adjustments */
  .tabbed-box {
    margin-top: 50px;
  }

  .tabs {
    position: static;
    justify-content: flex-start;
    margin-bottom: 0;
    padding: 0 20px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .tab-button {
    flex-shrink: 0;
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .card-box {
    border-radius: 0 6px 6px 6px;
    padding: 20px 15px;
  }

  /* Card content adjustments */
  .card-content {
    padding: 1rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-field .value {
    max-width: 100%;
  }

  /* Promoted section titles */
  .promoted-title {
    font-size: 1.4rem;
  }

  .regular-title {
    font-size: 1.2rem;
  }

  /* Promoted badge adjustment */
  .promoted-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    top: 8px;
    right: 8px;
  }

  /* Footer adjustments */
  footer {
    font-size: 0.875rem;
    text-align: center;
    padding: 1.5rem 0;
  }

  /* Card image height adjustment for mobile */
  .card-image {
    height: 100px;
  }

  /* Search input full width */
  #search-input {
    width: 100%;
    margin-bottom: 1rem;
  }
}
@media (max-width: 600px) {
  .floating-footer-widget {
    width: 200px;
    font-size: 0.85rem;
    bottom: 15px;
    right: 15px;
  }

  .footer-callout-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
}