/* --- Shortcode: Continent Accordion --- */

.sm-accordion-item {
  border: 1px solid #ddd;
  margin-bottom: 5px;
  border-radius: 4px;
  overflow: hidden;
}

.sm-accordion-header {
  width: 100%;
  text-align: left;
  padding: 10px;
  background: #202020;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  line-height: 16px;
}

.sm-accordion-header.active {
  background: #d72924;
}

.sm-accordion-content {
  padding: 10px;
  background: #fff;
  display: none; /* Hidden by default */
}

.sm-country-list {
  list-style: none !important;
  padding: 0;
  margin: 0 !important;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  justify-items: center;
}

.sm-country-item {
  margin: 0;
}

.sm-country-item img {
  width: 60px;
  height: 60px;
  display: block;
}


/* --- Template: Taxonomy Country --- */

.sm-country-archive-wrapper {
  margin: 0 auto;
  padding: 50px 0px;
  text-align: center;
}

.sm-page-title {
  font-size: 2.8em;
  margin-bottom: 30px;
  font-weight: 700;
  text-transform: uppercase;
}

.sm-stadium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.sm-stadium-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sm-stadium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.sm-stadium-thumbnail {
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 3px solid #f1f1f1;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.sm-stadium-thumbnail.placeholder {
  background-image: url('/wp-content/plugins/stadium-manager/assets/images/placeholder.png');
}

.sm-stadium-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sm-stadium-link:hover h2 {
  color: #d72924 !important;
}

.sm-stadium-title {
  font-size: 1.2em;
  margin: 15px 0;
  font-weight: 600;
}

.sm-pagination {
  margin-top: 30px;
}

.sm-pagination a,
.sm-pagination span {
  padding: 12px 18px;
  border: 1px solid #ddd;
  margin: 0 5px;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
}

.sm-pagination a:hover {
  background: #f5f5f5;
}

.sm-pagination .nav-links {
  display: flex;
}

/* --- Shortcode: Live Search --- */

.sm-live-search-wrapper {
  position: relative;
  margin: 20px auto;
}

#sm-live-search-input {
  width: 100%;
  padding: 18px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.sm-search-spinner {
  position: absolute;
  top: 50%;
  right: 15px;
  margin-top: -8px;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #d72924;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#sm-live-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

#sm-live-search-results ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sm-live-search-results li a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

#sm-live-search-results li:last-child a {
  border-bottom: none;
}

#sm-live-search-results li a:hover {
  background-color: #f5f5f5;
}

.sm-result-title {
  font-weight: bold;
  display: block;
}

.sm-result-details {
  font-size: 0.9em;
  color: #777;
  display: block;
  margin-top: 2px;
}

.sm-no-results {
  padding: 15px;
  text-align: center;
  color: #777;
}

.sm-result-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.sm-result-text {
  display: flex;
  flex-direction: column;
}


/* --- Template: Single Stadium --- */

/* Hide Theme Elements */
body.single-stadium .top-header,

body.single-stadium  .aft-main-breadcrumb-wrapper.container-wrapper {
  display: none !important;
}

/* General Styles */
.sm-single-stadium {
  margin: 0 auto;
  padding: 50px 0px;
  font-family: 'Arial', sans-serif;
}

.sm-stadium-content {
  line-height: 1.7;
  font-size: 1.1rem;
  margin-top: 0px;
  background: white;
  padding: 20px;
  border-radius: 4px;
}

/* Banner */
.sm-stadium-banner {
  min-height: 400px;
  width: 100%;
  position: relative;
  background-size: cover;
  background-position: center center;
}

.sm-stadium-banner .sm-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.sm-banner-content {
  display: none;
}

/* Stacked Layout */
.sm-stadium-title-column {
  margin-bottom: 40px;
}

.sm-content-title {
  font-size: 2.8em;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

/* Details & Map Section */
.sm-details-and-map-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.sm-details-column {
  flex: 0 0 65%;
}

.sm-map-column {
  flex: 1;
  /* min-height: 400px; */
}

.sm-map-column iframe {
  border-radius: 8px;
}

/* Meta Grid */
.sm-stadium-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.sm-meta-item {
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  border: 1px solid #e1e5ea;
  transition: all 0.3s ease;
}

.sm-meta-item:hover {
  background: #f1f3f5;
}

.sm-meta-item i {
  font-size: 1.4rem;
  color: #2c7be5;
}

/* --- Add this new rule to your CSS file --- */

/* Title for the main content section */
.sm-section-title {
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  color: #222;
}

/* --- Responsive Styles --- */

@media (max-width: 992px) {
  /* Details & Map: Stack map under details */
  .sm-details-and-map-wrapper {
    flex-direction: column;
    gap: 40px;
  }

  .sm-details-column {
    width: 100%;
  }

  /* Meta Grid: 2 columns on tablets */
  .sm-stadium-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .sm-content-title {
    font-size: 2em; /* Smaller title on mobile */
  }

  .sm-stadium-banner {
    min-height: 250px;
  }
}

@media (max-width: 576px) {
  /* Meta Grid: 1 column on phones */
  .sm-stadium-meta-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}