/**
 * TrialAndMember Connect - Public Styles
 */

/* Schedule Wrapper */
.tam-schedule-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Filter Buttons */
.tam-schedule-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
}

.tam-filter-btn {
  padding: 12px 30px;
  border: 2px solid #8b0000;
  background: white;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.tam-filter-btn.active,
.tam-filter-btn:hover {
  background: #8b0000;
  color: white;
}

/* Day Section Headers */
.tam-day-header,
.tam-lesson-header,
.tam-area-title,
.tam-type-title,
.tam-trainer-title {
  background: #8b0000;
  color: white;
  padding: 12px 20px;
  margin: 20px 0 15px 0;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Schedule by Day */
.tam-schedule-by-day {
  display: grid;
  gap: 20px;
}

.tam-day-section {
  margin-bottom: 20px;
}

.tam-day-classes {
  padding: 15px;
  background: #f9f9f9;
}

/* Schedule by Lesson Type */
.tam-schedule-by-lesson {
  display: grid;
  gap: 30px;
}

.tam-lesson-section {
  margin-bottom: 30px;
}

.tam-lesson-day {
  margin: 15px 0;
  padding-left: 20px;
}

.tam-lesson-day-name {
  font-size: 16px;
  font-weight: bold;
  margin: 10px 0;
  color: #333;
}

/* Schedule by Area */
.tam-schedule-by-area .tam-area-title {
  font-size: 24px;
  margin-bottom: 20px;
}

/* Schedule by Type */
.tam-schedule-by-type .tam-type-title {
  font-size: 22px;
  margin-bottom: 20px;
  background: #333;
}

.tam-type-day {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
}

.tam-type-day-name {
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: #333;
  padding: 8px 15px;
  margin: 0 0 15px 0;
}

/* Schedule by Trainer */
.tam-schedule-by-trainer .tam-trainer-title {
  font-size: 22px;
  margin-bottom: 20px;
  background: #333;
}

.tam-trainer-day {
  margin: 20px 0;
  padding: 15px;
  background: #333;
  color: white;
}

.tam-trainer-day-name {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 15px 0;
}

/* Class Items */
.tam-class-item {
  padding: 10px 0;
  line-height: 1.6;
  border-bottom: 1px solid #e0e0e0;
}

.tam-class-item:last-child {
  border-bottom: none;
}

.tam-trainer-day .tam-class-item,
.tam-type-day .tam-class-item {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.tam-class-time {
  font-weight: bold;
  color: #8b0000;
}

.tam-trainer-day .tam-class-time,
.tam-type-day .tam-class-time {
  color: white;
}

.tam-class-name {
  font-weight: 600;
  color: #333;
}

.tam-trainer-day .tam-class-name,
.tam-type-day .tam-class-name {
  color: white;
}

.tam-class-category {
  font-style: italic;
  color: #666;
  margin-left: 5px;
}

.tam-trainer-day .tam-class-category,
.tam-type-day .tam-class-category {
  color: rgba(255, 255, 255, 0.8);
}

.tam-class-area,
.tam-class-trainer {
  color: #666;
}

.tam-trainer-day .tam-class-area,
.tam-type-day .tam-class-area {
  color: rgba(255, 255, 255, 0.9);
}

.tam-class-separator {
  color: #999;
  margin: 0 5px;
}

.tam-trainer-day .tam-class-separator,
.tam-type-day .tam-class-separator {
  color: rgba(255, 255, 255, 0.5);
}

/* No Classes Message */
.tam-no-classes {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tam-schedule-wrapper {
    padding: 10px;
  }

  .tam-filter-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .tam-day-header,
  .tam-lesson-header,
  .tam-area-title,
  .tam-type-title,
  .tam-trainer-title {
    font-size: 16px;
    padding: 10px 15px;
  }

  .tam-class-item {
    font-size: 14px;
    line-height: 1.8;
  }
}

/* Trial Forms */
.tam-trial-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tam-form-group {
  margin-bottom: 20px;
}

.tam-form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.tam-form-input,
.tam-form-select,
.tam-form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.tam-form-textarea {
  min-height: 100px;
  resize: vertical;
}

.tam-form-submit {
  background: #8b0000;
  color: white;
  padding: 14px 40px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.tam-form-submit:hover {
  background: #660000;
}

/* Archive Pages */
.tam-trainers-archive,
.tam-locations-archive {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.archive-header {
  margin-bottom: 40px;
  text-align: center;
}

.archive-header h1 {
  font-size: 42px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.tam-filters {
  margin-bottom: 50px;
  padding: 25px 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.tam-search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.tam-search-form input[type="text"] {
  flex: 1;
  min-width: 250px;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.tam-search-form input[type="text"]:focus {
  outline: none;
  border-color: #8b0000;
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.tam-search-form button {
  padding: 14px 32px;
  background: linear-gradient(135deg, #8b0000 0%, #a00000 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}

.tam-search-form button:hover {
  background: linear-gradient(135deg, #660000 0%, #8b0000 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.tam-search-form button:active {
  transform: translateY(0);
}

.tam-search-form a {
  color: #8b0000;
  text-decoration: none;
  padding: 14px 18px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.tam-search-form a:hover {
  background: #f8f9fa;
  text-decoration: underline;
}

/* Archive Grids */
.tam-trainers-grid,
.tam-locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.tam-trainer-item,
.tam-location-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tam-trainer-item:hover,
.tam-location-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #8b0000;
}

.tam-trainer-item a,
.tam-location-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tam-trainer-thumbnail,
.tam-location-thumbnail {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  position: relative;
  flex-shrink: 0;
}

.tam-trainer-thumbnail::before,
.tam-location-thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}

.tam-trainer-thumbnail img,
.tam-location-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tam-trainer-item:hover .tam-trainer-thumbnail img,
.tam-location-item:hover .tam-location-thumbnail img {
  transform: scale(1.05);
}

.tam-trainer-title,
.tam-location-title {
  padding: 20px 24px 12px;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.tam-trainer-excerpt,
.tam-location-excerpt {
  padding: 0 24px 20px;
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
}

.tam-location-city {
  padding: 0 24px 8px;
  color: #8b0000;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tam-location-city::before {
  content: '📍';
  font-size: 14px;
}

.tam-location-address {
  padding: 0 24px 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* Pagination */
.tam-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e9ecef;
}

.tam-pagination .page-numbers {
  padding: 12px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 44px;
  text-align: center;
  background: white;
}

.tam-pagination .page-numbers:hover {
  background: #f8f9fa;
  border-color: #8b0000;
  color: #8b0000;
  transform: translateY(-2px);
}

.tam-pagination .page-numbers.current {
  background: linear-gradient(135deg, #8b0000 0%, #a00000 100%);
  color: white;
  border-color: #8b0000;
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}

.tam-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

.tam-pagination .page-numbers.dots:hover {
  transform: none;
  background: transparent;
  border: none;
}

/* Single Post Pages */
.tam-trainer-single,
.tam-location-single {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.trainer-header,
.location-header {
  margin-bottom: 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #8b0000;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.back-link:hover {
  color: #660000;
  background: #f8f9fa;
  text-decoration: none;
}

.back-link::before {
  content: '←';
  font-size: 18px;
}

.trainer-header h1,
.location-header h1 {
  font-size: 48px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.trainer-content,
.location-content {
  display: grid;
  gap: 40px;
}

.trainer-image,
.location-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.trainer-image img,
.location-image img {
  width: 100%;
  height: auto;
  display: block;
}

.trainer-description,
.location-description {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  max-width: 800px;
}

.trainer-contact,
.location-contact {
  padding: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  margin-top: 30px;
}

.trainer-contact h2,
.location-contact h2 {
  margin-top: 0;
  margin-bottom: 24px;
  color: #8b0000;
  font-size: 28px;
  font-weight: 600;
  border-bottom: 2px solid #8b0000;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.trainer-contact h2::before,
.location-contact h2::before {
  content: '📧';
  font-size: 24px;
}

.trainer-contact p,
.location-contact p {
  margin: 18px 0;
  line-height: 1.8;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #8b0000;
  transition: all 0.3s ease;
}

.trainer-contact p:hover,
.location-contact p:hover {
  background: #f8f9fa;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.trainer-contact p strong,
.location-contact p strong {
  min-width: 100px;
  color: #333;
  font-weight: 600;
}

.trainer-contact a,
.location-contact a {
  color: #8b0000;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trainer-contact a:hover,
.location-contact a:hover {
  color: #660000;
  text-decoration: underline;
}

.trainer-contact a::after,
.location-contact a[href^="mailto:"]::after {
  content: '→';
  font-size: 14px;
  transition: transform 0.3s ease;
}

.trainer-contact a[href^="tel:"]::after {
  content: '📞';
  font-size: 14px;
}

.trainer-contact a[href^="mailto:"]::after {
  content: '✉️';
  font-size: 14px;
}

.trainer-contact a:hover::after,
.location-contact a:hover::after {
  transform: translateX(4px);
}

.trainer-cta,
.location-cta {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #e9ecef;
}

.trainer-cta .button,
.location-cta .button {
  display: inline-block;
  padding: 16px 48px;
  background: linear-gradient(135deg, #8b0000 0%, #a00000 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.trainer-cta .button:hover,
.location-cta .button:hover {
  background: linear-gradient(135deg, #660000 0%, #8b0000 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.trainer-cta .button:active,
.location-cta .button:active {
  transform: translateY(0);
}

.location-owner-contact {
  padding: 30px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #ffe0e0;
  margin-top: 30px;
}

.location-owner-contact h2 {
  margin-top: 0;
  margin-bottom: 24px;
  color: #8b0000;
  font-size: 28px;
  font-weight: 600;
  border-bottom: 2px solid #8b0000;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-owner-contact h2::before {
  content: '👤';
  font-size: 24px;
}

.location-owner-contact p {
  margin: 18px 0;
  line-height: 1.8;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #8b0000;
  transition: all 0.3s ease;
}

.location-owner-contact p:hover {
  background: #fff5f5;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.location-owner-contact p strong {
  min-width: 100px;
  color: #333;
  font-weight: 600;
}

.location-owner-contact a {
  color: #8b0000;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.location-owner-contact a:hover {
  color: #660000;
  text-decoration: underline;
}

/* Empty State */
.tam-trainers-archive > p,
.tam-locations-archive > p {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 18px;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 40px 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .tam-trainers-grid,
  .tam-locations-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .tam-trainers-archive,
  .tam-locations-archive {
    padding: 30px 15px;
  }

  .archive-header h1 {
    font-size: 32px;
  }

  .tam-filters {
    padding: 20px;
  }

  .tam-trainers-grid,
  .tam-locations-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tam-search-form {
    flex-direction: column;
  }

  .tam-search-form input[type="text"],
  .tam-search-form button {
    width: 100%;
  }

  .tam-trainer-thumbnail,
  .tam-location-thumbnail {
    height: 200px;
  }

  .trainer-header h1,
  .location-header h1 {
    font-size: 28px;
  }

  .tam-pagination {
    flex-wrap: wrap;
  }

  .tam-pagination .page-numbers {
    padding: 10px 14px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .archive-header h1 {
    font-size: 28px;
  }

  .tam-trainer-title,
  .tam-location-title {
    font-size: 20px;
    padding: 16px 20px 10px;
  }
}