/* Capital City Group — custom listing pages */
.ccg-listing-page {
  --ccg-navy: #061c32;
  --ccg-gold: #d4af37;
  --ccg-text: #222;
  --ccg-muted: #5a6472;
  background: #f7f8fa;
  color: var(--ccg-text);
}

.ccg-listing-page .site-header {
  background-color: var(--ccg-navy);
}

/* Header layout matches main site (Genesis floats nav right at 980px+) */
@media only screen and (min-width: 980px) {
  .ccg-listing-page .site-header > .wrap::after {
    clear: both;
    content: "";
    display: table;
  }

  .ccg-listing-page .title-area {
    float: left;
    max-width: 300px;
    width: auto;
  }

  .ccg-listing-page .nav-primary {
    clear: none;
    float: right;
    padding-bottom: 0;
    padding-top: 0;
    width: auto;
  }

  .ccg-listing-page .nav-primary .genesis-nav-menu > .menu-item {
    display: inline-block;
  }
}

.ccg-listing-hero {
  background: linear-gradient(135deg, var(--ccg-navy) 0%, #0a2a4a 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
}

.ccg-listing-hero .wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ccg-listing-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  color: #fff;
}

.ccg-listing-hero .ccg-listing-subtitle {
  margin: 0;
  font-size: 1.125rem;
  opacity: 0.92;
}

.ccg-listing-hero .ccg-listing-meta {
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.ccg-listing-hero .ccg-listing-meta span {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.ccg-listing-featured {
  max-width: 1140px;
  margin: -0.5rem auto 0;
  padding: 0 1.25rem;
}

.ccg-listing-featured img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 24px rgba(6, 28, 50, 0.15);
}

.ccg-listing-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.ccg-listing-section {
  background: #fff;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(6, 28, 50, 0.06);
}

.ccg-listing-section h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--ccg-navy);
  border-bottom: 3px solid var(--ccg-gold);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.ccg-listing-section p {
  line-height: 1.65;
  margin: 0 0 1rem;
}

.ccg-listing-section p:last-child {
  margin-bottom: 0;
}

.ccg-listing-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #eef1f5;
}

.ccg-listing-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ccg-listing-embed.ccg-listing-embed--tall {
  padding-bottom: 65%;
}

.ccg-listing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.ccg-listing-placeholder {
  color: var(--ccg-muted);
  font-style: italic;
  margin: 0;
}

.ccg-listing-tour-launch {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(180deg, #f0f4f8 0%, #e8edf3 100%);
  border-radius: 6px;
}

.ccg-listing-tour-launch p {
  margin: 0 0 1rem;
  color: var(--ccg-muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.ccg-listing-tour-button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  text-decoration: none;
}

.ccg-gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #eef1f5;
}

.ccg-gallery-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s ease;
}

.ccg-gallery-thumb:hover img,
.ccg-gallery-thumb:focus img {
  opacity: 0.9;
}

.ccg-listing-featured-btn {
  width: 100%;
  border-radius: 8px;
}

.ccg-listing-featured-btn img {
  width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: cover;
}

.ccg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(6, 28, 50, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1rem;
}

.ccg-lightbox[hidden] {
  display: none !important;
}

body.ccg-lightbox-open {
  overflow: hidden;
}

.ccg-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  min-height: 0;
}

.ccg-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ccg-lightbox-counter {
  margin: 0.75rem 0 0;
  color: #fff;
  font-size: 0.95rem;
  opacity: 0.9;
}

.ccg-lightbox-close,
.ccg-lightbox-prev,
.ccg-lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  font-size: 1.75rem;
  padding: 0.35rem 0.65rem;
}

.ccg-lightbox-close:hover,
.ccg-lightbox-close:focus,
.ccg-lightbox-prev:hover,
.ccg-lightbox-prev:focus,
.ccg-lightbox-next:hover,
.ccg-lightbox-next:focus {
  background: rgba(212, 175, 55, 0.35);
}

.ccg-lightbox-close {
  top: 0.75rem;
  right: 0.75rem;
  font-size: 2rem;
  padding: 0.15rem 0.55rem;
}

.ccg-lightbox-prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  padding: 0.25rem 0.7rem;
}

.ccg-lightbox-next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  padding: 0.25rem 0.7rem;
}

@media (max-width: 600px) {
  .ccg-lightbox-prev {
    left: 0.25rem;
  }
  .ccg-lightbox-next {
    right: 0.25rem;
  }
}

.ccg-listing-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ccg-listing-downloads li {
  margin: 0 0 0.5rem;
}

.ccg-listing-downloads a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ccg-navy);
  font-weight: 600;
  text-decoration: none;
}

.ccg-listing-downloads a:hover,
.ccg-listing-downloads a:focus {
  color: var(--ccg-gold);
  text-decoration: underline;
}

.ccg-listing-cta {
  text-align: center;
  padding: 1.5rem;
}

.ccg-listing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 0 0 1rem;
}

.ccg-listing-cta-actions--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.ccg-listing-cta-actions--grid .ccg-btn {
  width: 100%;
  min-height: 3.25rem;
}

.ccg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ccg-btn-contact,
.ccg-btn-submit {
  background: #061c32;
  color: #fff;
  border-color: #061c32;
}

.ccg-btn-contact:hover,
.ccg-btn-contact:focus,
.ccg-btn-submit:hover,
.ccg-btn-submit:focus {
  background: #0a2a4a;
  border-color: #0a2a4a;
  color: #fff;
}

.ccg-btn-call {
  background: #fff;
  color: #061c32;
  border-color: #061c32;
}

.ccg-btn-call:hover,
.ccg-btn-call:focus {
  background: #f0f4f8;
  color: #061c32;
}

.ccg-btn-icon {
  flex-shrink: 0;
}

.ccg-listing-form {
  max-width: 520px;
  margin: 0 auto 1rem;
  text-align: left;
}

.ccg-form-field {
  margin-bottom: 1rem;
}

.ccg-form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--ccg-navy);
  font-size: 0.95rem;
}

.ccg-form-field input,
.ccg-form-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c5ccd6;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.ccg-form-field input:focus,
.ccg-form-field textarea:focus {
  outline: 2px solid var(--ccg-gold);
  outline-offset: 1px;
  border-color: var(--ccg-navy);
}

.ccg-listing-form .ccg-btn-submit {
  width: 100%;
  margin-top: 0.25rem;
}

.ccg-form-status {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ccg-form-status.is-success {
  background: #f0fdfa;
  border: 1px solid #0f766e;
  color: #134e4a;
}

.ccg-form-status.is-error {
  background: #fff4f4;
  border: 1px solid #b00020;
  color: #7f1d1d;
}

.ccg-inquiry-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ccg-inquiry-modal[hidden] {
  display: none !important;
}

body.ccg-inquiry-open {
  overflow: hidden;
}

.ccg-inquiry-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 28, 50, 0.72);
}

.ccg-inquiry-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 20px 50px rgba(6, 28, 50, 0.35);
}

.ccg-inquiry-dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--ccg-navy);
}

.ccg-inquiry-note {
  margin: 0 0 1rem;
  color: var(--ccg-muted);
  line-height: 1.5;
}

.ccg-inquiry-disclaimer {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  background: #f0f4f8;
  border-left: 4px solid var(--ccg-gold);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ccg-text);
}

.ccg-inquiry-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ccg-navy);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.ccg-inquiry-close:hover,
.ccg-inquiry-close:focus {
  background: #f0f4f8;
}

.ccg-listing-back {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--ccg-navy);
  font-weight: 600;
}

.ccg-listing-back:hover,
.ccg-listing-back:focus {
  color: var(--ccg-gold);
}

@media (max-width: 600px) {
  .ccg-listing-section {
    padding: 1.1rem;
  }
}
