/* ============================================================
   BLOCKS RENDERER — base layout styles
   Loaded globally via BaseLayout.astro for all templates.
   These are structural (display, flex, padding) — visual
   overrides (colors, fonts) live in each template's CSS.
   ============================================================ */

/* ---------- PRICELIST ---------- */
.cp-pricelist {
  padding: 16px 0;
}
.cp-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 24px;
}
.cp-price-name {
  font-weight: 500;
  white-space: nowrap;
}
.cp-price-dots {
  flex: 1;
  border-bottom: 2px dotted currentColor;
  min-width: 40px;
  margin-bottom: 4px;
  opacity: 0.4;
}
.cp-price-val {
  font-weight: 700;
  white-space: nowrap;
  font-size: 17px;
}

/* ---------- PRICING TABLE ---------- */
.cp-pricing-table {
  padding: 32px 28px;
  text-align: center;
}
.cp-pt-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.cp-pt-price {
  margin-bottom: 24px;
}
.cp-pt-price span {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.7;
}
.cp-pt-items {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
}
.cp-pt-items li {
  padding: 10px 0;
  border-bottom: 1px solid;
}

/* ---------- VIDEO EMBED ---------- */
.cp-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 32px 0;
  border-radius: 16px;
  width: 100%;
}
.cp-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- QUOTE ---------- */
.cp-article blockquote {
  margin: 32px 0;
  padding: 24px 32px;
  border-left: 4px solid currentColor;
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
  opacity: 0.9;
}

/* ---------- ACCORDION ---------- */
.cp-accordion {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cp-ac-item {
  border: 1px solid;
  border-radius: 12px;
  overflow: hidden;
}
.cp-ac-summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cp-ac-summary::-webkit-details-marker { display: none; }
.cp-ac-summary::after {
  content: "+";
  font-size: 24px;
  line-height: 1;
  transition: transform 0.2s;
}
.cp-ac-item[open] .cp-ac-summary::after {
  transform: rotate(45deg);
}
.cp-ac-content {
  padding: 0 24px 20px;
  line-height: 1.6;
}

/* ---------- TABS ---------- */
.cp-tabs {
  margin: 32px 0;
}
.cp-tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cp-tab-nav button {
  padding: 12px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: inherit;
  opacity: 0.6;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: opacity 0.2s;
}
.cp-tab-nav button:hover {
  opacity: 0.9;
}
.cp-tab-nav button.active {
  opacity: 1;
  border-bottom-color: currentColor;
}
.cp-tab-panel {
  display: none;
  line-height: 1.6;
}
.cp-tab-panel.active {
  display: block;
}

/* ---------- ICON BOX ---------- */
.cp-iconbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.cp-ib-item {
  padding: 28px 24px;
  border: 1px solid;
  border-radius: 16px;
  text-align: center;
}
.cp-ib-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 12px;
  border: 1px solid;
}
.cp-ib-icon svg {
  width: 28px;
  height: 28px;
}
.cp-ib-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.cp-ib-text {
  margin: 0;
  line-height: 1.5;
  opacity: 0.8;
}

/* ---------- FLIP BOX ---------- */
.cp-flipbox {
  margin: 32px 0;
  perspective: 1000px;
  min-height: 280px;
}
.cp-flip-inner {
  position: relative;
  width: 100%;
  min-height: 280px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}
.cp-flipbox:hover .cp-flip-inner {
  transform: rotateY(180deg);
}
.cp-flip-front,
.cp-flip-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  backface-visibility: hidden;
  padding: 32px;
  border: 1px solid;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.cp-flip-back {
  transform: rotateY(180deg);
}
.cp-flip-front h3,
.cp-flip-back h3 {
  margin: 0 0 12px;
  font-size: 20px;
}
.cp-flip-front p,
.cp-flip-back p {
  margin: 0;
  line-height: 1.5;
}

/* ---------- COLUMNS ---------- */
.cp-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 32px 0;
}
@media (max-width: 768px) {
  .cp-columns { grid-template-columns: 1fr; }
}
.cp-col {
  line-height: 1.6;
}

/* ---------- HERO SLIDER ---------- */
.cp-hero-slider {
  position: relative;
  margin: 32px 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.cp-hs-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.cp-hs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s;
}
.cp-hs-slide:first-child {
  opacity: 1;
}
.cp-hs-video,
.cp-hs-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.cp-hs-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.cp-hs-placeholder {
  background: linear-gradient(135deg, rgba(128,128,128,0.2), rgba(128,128,128,0.05));
}
.cp-hs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6));
}
.cp-hs-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
  color: #fff;
  z-index: 2;
}
.cp-hs-content h2 {
  font-size: clamp(24px, 4vw, 48px);
  margin: 0 0 12px;
  color: #fff;
}
.cp-hs-content p {
  font-size: 17px;
  margin: 0 0 20px;
  opacity: 0.9;
}
.cp-hs-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #fff;
  color: #000;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
}
.cp-hs-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.cp-hs-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}
.cp-hs-dots button.active {
  background: #fff;
}

/* ---------- INSTAGRAM ---------- */
.cp-instagram {
  margin: 32px 0;
  display: flex;
  justify-content: center;
}
.cp-insta-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 40px;
  border: 1px solid;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.cp-insta-link:hover {
  opacity: 0.7;
}
.cp-insta-link svg {
  width: 32px;
  height: 32px;
}
.cp-insta-link span {
  font-weight: 700;
  font-size: 18px;
}
.cp-insta-link small {
  opacity: 0.6;
  font-size: 13px;
}

/* ---------- LATEST POSTS ---------- */
.cp-latestposts {
  margin: 32px 0;
}
.cp-lp-title {
  font-size: 28px;
  margin: 0 0 24px;
}
.cp-lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.cp-lp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cp-lp-card {
  display: flex;
  flex-direction: column;
  border: 1px solid;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.cp-lp-card:hover {
  transform: translateY(-4px);
}
.cp-lp-image {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}
.cp-lp-image-placeholder {
  background: linear-gradient(135deg, rgba(128,128,128,0.2), rgba(128,128,128,0.05));
}
.cp-lp-body {
  padding: 20px;
}
.cp-lp-date {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 8px;
}
.cp-lp-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}
.cp-lp-excerpt {
  margin: 0 0 12px;
  line-height: 1.5;
  opacity: 0.8;
}
.cp-lp-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}
.cp-lp-readmore svg {
  width: 14px;
  height: 14px;
}
.cp-lp-empty {
  text-align: center;
  padding: 40px;
  opacity: 0.6;
}

/* ---------- TESTIMONIALS SLIDER ---------- */
.cp-slider {
  position: relative;
  margin: 32px 0;
  padding: 40px 0;
}
.cp-slider-track {
  position: relative;
  min-height: 180px;
}
.cp-slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  text-align: center;
  padding: 0 40px;
}
.cp-slider-slide:first-child {
  opacity: 1;
}
.cp-tq {
  font-size: 20px;
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 20px;
}
.cp-tauthor {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cp-tauthor strong {
  font-size: 16px;
}
.cp-tauthor span {
  font-size: 13px;
  opacity: 0.6;
}
.cp-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.cp-slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  border: none;
  cursor: pointer;
  padding: 0;
}
.cp-slider-dots button.active {
  opacity: 1;
}
