/* =============================
   ETG Global CSS
============================= */

:root {
  --etg-blue: #4A77BC;
  --etg-light: #E6E7EA;
  --etg-muted: #CDD0D5;
  --etg-radius: 15px;
}

/* Typography & spacing */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin-top: 1.5rem !important;
}

.entry-content h1 + p,
.entry-content h2 + p,
.entry-content h3 + p,
.entry-content h4 + p,
.entry-content h5 + p,
.entry-content h6 + p {
  margin-top: 0.4rem !important;
}

.entry-content p {
  margin-top: 1rem !important;
  margin-bottom: 0.3rem !important;
}

.entry-content p + ul,
.entry-content p + .wp-block-list,
.entry-content h1 + ul,
.entry-content h2 + ul,
.entry-content h3 + ul,
.entry-content h4 + ul,
.entry-content h5 + ul,
.entry-content h6 + ul {
  margin-top: 0.6rem !important;
}

.entry-content ul,
.entry-content .wp-block-list {
  margin-bottom: 0.3rem !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.entry-content li {
  margin: 0 !important;
  padding: 0 !important;
}

.single-post .entry-content a {
  font-weight: 700;
}

.single-post .entry-content p:first-of-type {
  padding-top: 17px;
}

/* Tables */
.entry-content table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 2px solid var(--etg-blue) !important;
  border-radius: 10px;
  overflow: hidden;
}

.entry-content th,
.entry-content td {
  padding: 8px;
  border-right: 2px solid var(--etg-blue) !important;
  border-bottom: 2px solid var(--etg-blue) !important;
  text-align: center;
  vertical-align: middle;
}

.entry-content th:last-child,
.entry-content td:last-child {
  border-right: none !important;
}

.entry-content tr:last-child td {
  border-bottom: none !important;
}

.entry-content th {
  background-color: rgba(74, 119, 188, 0.3);
  font-weight: 700;
}

/* Post grid hover */
.wp-block-post {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.wp-block-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Forms */
:is(
  .wp-block-jetpack-contact-form input[type="email"],
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select
) {
  border: 2px solid var(--etg-muted) !important;
  border-radius: var(--etg-radius) !important;
  padding: 12px 16px;
  background: transparent;
  box-sizing: border-box;
}

:is(input, textarea, select):focus {
  border-color: #fff !important;
  outline: none;
}

/* Forminator */
.forminator-ui .forminator-label {
  font-family: "Nunito", sans-serif !important;
  font-size: 1.7rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  color: var(--etg-light) !important;
  margin: 0 0 12px 0 !important;
}

.forminator-ui .forminator-description,
.forminator-ui .forminator-radio-label {
  font-family: "Nunito", sans-serif !important;
  font-size: 17px !important;
  line-height: 1.27 !important;
  letter-spacing: 0.03em !important;
  color: var(--etg-light) !important;
}

.forminator-ui .forminator-description {
  font-weight: 400 !important;
  margin: 6px 0 10px;
}

.forminator-ui .forminator-radio-label {
  font-weight: 800 !important;
}

.forminator-ui .forminator-radio {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forminator-ui .forminator-button-submit {
  font-family: "Nunito", sans-serif !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  background: var(--etg-blue) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 20px !important;
  width: 100%;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.forminator-ui .forminator-button-submit:hover {
  background: #3a5fa0 !important;
  transform: translateY(-1px);
}

/* Normal content media */
.wp-block-embed.is-provider-youtube,
body:not(.home) .entry-content .ct-media-container,
body:not(.home) .entry-content .ct-media-container img {
  border-radius: var(--etg-radius) !important;
  overflow: hidden;
}

/* TITLE BLOCK ONLY: square top, rounded bottom */
body:not(.home) #main > .hero-section[data-type="type-2"],
body:not(.home) #main > .hero-section[data-type="type-2"] > figure,
body:not(.home) #main > .hero-section[data-type="type-2"] > figure .ct-media-container,
body:not(.home) #main > .hero-section[data-type="type-2"] > figure img {
  border-radius: 0 0 var(--etg-radius) var(--etg-radius) !important;
  overflow: hidden !important;
}

/* Archive spacing */
.post-type-archive-videos .entries,
.post-type-archive-deal .entries {
  margin-top: 30px;
}

/* Accessibility helper */
.etg-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.rounded-block {
    border-radius: 12px;
    overflow: hidden;
}