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

:root {
  --etg-blue: #4a77bc;
  --etg-light: #e6e7ea;
  --etg-muted: #cdd0d5;
  --etg-radius: 15px;
  --etg-border: 2px solid var(--etg-blue);
}

/* =============================
   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: var(--etg-border) !important;
  border-radius: 10px;
  overflow: hidden;
}

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

.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
) {
  box-sizing: border-box;
  padding: 12px 16px;
  background: transparent;
  border: 2px solid var(--etg-muted) !important;
  border-radius: var(--etg-radius) !important;
}

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

/* =============================
   Forminator
============================= */

.forminator-ui :is(
  .forminator-label,
  .forminator-description,
  .forminator-radio-label
) {
  color: var(--etg-light) !important;
  font-family: "Nunito", sans-serif !important;
}

.forminator-ui .forminator-label {
  margin: 0 0 12px !important;
  font-size: 1.7rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.forminator-ui :is(
  .forminator-description,
  .forminator-radio-label
) {
  font-size: 17px !important;
  line-height: 1.27 !important;
  letter-spacing: 0.03em !important;
}

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

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

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

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

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

.forminator-ui .forminator-button-submit:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

/* =============================
   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 Hero Image
   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;
}

/* =============================
   Utility Classes
============================= */

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

/* Keep the Gutenberg responsive editor canvas aligned with the site background. */
html {
  background-color: #081a36 !important;
}
