/* ===================================================================
   Grid & Card Layout
   =================================================================== */

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}
@media (max-width: 960px) {
  .promo-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: 460px;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-content {
  padding: 15px;
  flex: 1;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.card-content h3 {
  width: 100%;
  margin: 0 0 8px;
  font-size: 1.2em;
  text-align: center;
  color: #333;
}

.description {
  width: 100%;
  font-size: 0.95em;
  line-height: 1.4;
  color: #333;
  text-align: left;
  margin-bottom: auto;
}

.btn-link {
  margin-top: auto;
  color: #007BFF;
  text-decoration: underline;
}

/* ===================================================================
   No-Image Cards (Instagram, Tunes, YouTube, Conditions)
   — reset to normal top-padding so all headings align
   =================================================================== */

.card.no-image .card-content {
  padding-top: 15px !important;
}

/* ===================================================================
   Instagram Embed + Caption + CTA
   =================================================================== */

.card.instagram iframe {
  width: 100% !important;
  height: 200px !important;
  border: none;
  margin-bottom: 8px;
}

/* caption pulled from HTML into .instagram-tag */
.instagram-tag {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  color: #333;
  margin-bottom: 8px;
}

/* call-to-action box under the caption */
.instagram-cta {
  width: 100%;
  background: #f9f9f9;
  border-top: 1px solid #eee;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.9em;
  color: #333;
  margin-top: 6px;
}
.instagram-cta p {
  margin: 4px 0;
  line-height: 1.3;
}
.instagram-cta strong {
  color: #007BFF;
}
.instagram-cta .hashtag {
  color: #e1306c;
  font-weight: 600;
}

/* ===================================================================
   Scuba Tunes Embed
   =================================================================== */

.card.tunes iframe {
  width: 100% !important;
  height: 400px !important;
  border: none;
}

/* ===================================================================
   YouTube Embed
   =================================================================== */

.card.youtube iframe {
  width: 100% !important;
  height: 200px !important;
  border: none;
}

/* ===================================================================
   Dive Conditions Table
   =================================================================== */

.card.conditions-box .card-content {
  display: block !important;
  text-align: center !important;
  padding: 15px !important;
}

.card.conditions-box h3 {
  margin: 0 0 12px !important;
}

.card.conditions-box table {
  margin: 0 auto !important;
  border-collapse: collapse;
  font-size: 0.9em;
}

.card.conditions-box th,
.card.conditions-box td {
  padding: 6px;
  border-bottom: 1px solid #ddd;
  color: #000;
  text-align: center;
}

/* ===================================================================
   Hero Section
   =================================================================== */

.hero {
  position: relative;
}

.hero-video {
  width: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
}

/* ===================================================================
   Header & Navigation
   =================================================================== */

header {
  background-color: #001f3f;
  padding: 10px 20px;
}

.header-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-left,
.logo-right {
  height: 70px;
}

nav {
  flex-grow: 1;
  text-align: center;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
  justify-content: center;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
}

/* ===================================================================
   Footer & Contact Form
   =================================================================== */

#contact {
  background: #001f3f;
  color: #fff;
  padding: 20px;
}

#contact h3 {
  margin: 0 0 10px;
}

#show-contact-btn {
  padding: 8px 16px;
  background: #007BFF;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#contact-form-wrapper {
  display: none;
  margin-top: 20px;
}

#contact-form-wrapper input,
#contact-form-wrapper textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#contact-form-wrapper button[type="submit"] {
  padding: 8px 16px;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.social-media {
  margin-top: 12px;
}

.social-media img {
  width: 32px;
  margin-right: 8px;
}

#contact .shop-info {
  margin-top: 20px;
  color: #ccc;
  font-size: 0.9em;
}

#contact p {
  margin-top: 12px;
  color: #ccc;
  font-size: 0.85rem;
}

/* ===================================================================
   Class Detail Page Overrides
   =================================================================== */

/* Container */
.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: #fff;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.header img {
  height: 60px;
}
.header-title {
  flex: 1;
  text-align: center;
  font-size: 2rem;
  color: #007BFF;
  margin: 0;
}
.header-logo {
  height: 50px;
}

/* Main Class Image */
.class-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* Sections */
.section {
  margin-bottom: 2rem;
}
.section h2 {
  font-size: 1.5rem;
  color: #007BFF;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Description */
.html-content {
  line-height: 1.6;
  color: #333;
}

/* Pricing Grid */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.price-box {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.price-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #333;
}
.price {
  font-size: 1.75rem;
  color: #28a745;
  margin: 0.5rem 0;
}
.enroll-button {
  background: #007BFF;
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  margin-top: auto;
}

/* Video Embed */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2rem;
}
.video-container iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: none;
}

/* Return Link */
.return-link {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.25rem;
  background: #6c757d;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

/* Admin Edit Button */
.edit-button {
  background: #17a2b8;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  margin-bottom: 1rem;
  display: inline-block;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .header-title {
    font-size: 1.5rem;
  }
  .pricing {
    grid-template-columns: 1fr;
  }
}