/*
Theme Name: Dominic Thiem Custom
Theme URI: https://dominicthiem.com/
Author: Custom
Author URI: https://dominicthiem.com/
Description: Custom WordPress theme for the Dominic Thiem website.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: dominic-thiem-custom
*/

/* Theme base */
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --dt-font-primary: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --dt-weight-primary: 500;
  --dt-weight-text: 400;
  --dt-weight-accent: 500;
  --dt-accent: #00f3ff;
  --dt-secondary: #ffffff;
  --dt-bg: #171717;
}

html {
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--dt-font-primary);
  font-weight: var(--dt-weight-text);
  background: var(--dt-bg);
  color: var(--dt-secondary);
}

/* Prevent third-party embeds from forcing page-wide horizontal scroll */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
}

.instagram-media,
.wp-block-embed-instagram,
.wp-block-embed-instagram iframe,
iframe[src*="instagram.com"],
iframe[src*="instagram"],
.elfsight-app,
[class*="eapps-instagram-feed"],
[class*="instagram-feed"] {
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 980px) {
  html,
  body {
    overflow-x: hidden !important;
  }
}

p {
  font-family: var(--dt-font-primary);
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--dt-weight-primary);
}

.dt-page {
  background: var(--dt-bg) !important;
  color: rgba(255, 255, 255, 0.9);
}

/* Keep social carousel swipeable on mobile without clipping other sections */
.dt-social__fan {
  touch-action: pan-x !important;
  -webkit-overflow-scrolling: touch;
}

.dt-nav__dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.dt-contact,
.dt-imprint,
.dt-policy {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 150px 0 70px;
  color: rgba(255, 255, 255, 0.88);
}

.dt-imprint__title,
.dt-policy__title,
.dt-contact__title {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.92);
}

.dt-imprint__title,
.dt-policy__title {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
}

.dt-contact__title {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
}

.dt-imprint,
.dt-policy {
  display: grid;
  gap: 14px;
}

.dt-imprint__title,
.dt-policy__title {
  margin-bottom: 8px;
}

.dt-imprint__section,
.dt-policy__section {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  padding: 18px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dt-imprint__label {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dt-imprint__text,
.dt-policy__text,
.dt-policy__intro {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

.dt-policy__intro {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  padding: 16px 20px;
  margin: 0;
}

.dt-policy__num {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.25;
}

.dt-policy__list {
  margin: 0 0 14px 20px;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
}

.dt-policy__list li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.dt-imprint__text:last-child,
.dt-policy__text:last-child,
.dt-policy__list:last-child {
  margin-bottom: 0;
}

.dt-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #171717;
  padding: 26px 0;
}

.dt-footer__wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dt-footer__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.dt-footer__logo img {
  width: 76px;
  height: auto;
  display: block;
  border-radius: 0 !important;
}

.dt-footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.dt-footer__links a {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.dt-footer__social {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dt-footer__social a {
  color: rgba(255, 255, 255, 0.92) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dt-footer__social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

@media (max-width: 960px) {
  .dt-imprint,
  .dt-policy,
  .dt-contact {
    width: min(1120px, calc(100% - 30px));
    padding-top: 136px;
  }

  .dt-footer__wrap {
    width: min(1120px, calc(100% - 30px));
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* Global navigation (single source of truth) */
.dt-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10000;
  background: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.dt-nav.is-scrolled {
  background: #171717;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dt-nav__wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 26px;
  position: relative;
}

.dt-nav__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding-bottom: 3px;
}

.dt-nav__logo img {
  width: 70px !important;
  height: auto !important;
  display: block;
  border-radius: 0 !important;
}

.dt-nav__menu {
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 34px;
}

.dt-nav__menu > li {
  position: relative;
}

.dt-nav__toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dt-nav__link,
.dt-nav__trigger,
.dt-nav__lang {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.dt-nav__link:hover,
.dt-nav__trigger:hover,
.dt-nav__lang:hover,
.dt-nav__link.is-active,
.dt-nav__trigger.is-active {
  color: rgba(255, 255, 255, 1);
}

.dt-nav__link.is-active,
.dt-nav__trigger.is-active {
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.dt-nav__lang.is-active {
  color: rgba(255, 255, 255, 0.48) !important;
  pointer-events: none;
}

.dt-nav__arrow {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.dt-nav__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 260px;
  background: rgba(23, 23, 23, 0.985);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.45);
  z-index: 10010;
}

.dt-nav__dropdown a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 16px !important;
  line-height: 1.3;
  padding: 10px 10px;
  border-radius: 10px;
}

.dt-nav__item--projects:hover .dt-nav__dropdown,
.dt-nav__item--projects:focus-within .dt-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dt-nav__burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  z-index: 10050;
  position: relative;
  pointer-events: auto !important;
}

.dt-nav__burgerLine {
  display: block;
  width: 21px;
  height: 2px;
  background: currentColor;
}

@media (max-width: 980px) {
  .dt-nav__wrap {
    width: min(1120px, calc(100% - 30px));
    min-height: 78px;
  }

  .dt-nav__menu {
    display: none !important;
  }
}

/* Mobile menu from scratch */
.dtm-burger {
  display: none;
  position: fixed;
  top: 20px;
  right: 14px;
  z-index: 2147483646;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  cursor: pointer;
}

.dtm-burger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
}

.dtm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2147483644;
}

.dtm-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  background: #171717;
  border-left: 0;
  padding: 86px 24px 24px;
  display: grid;
  align-content: start;
  gap: 6px;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform 0.22s ease;
  z-index: 2147483645;
  overflow-y: auto;
}

.dtm-link,
.dtm-panel a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  padding: 9px 0;
}

.dtm-link.is-active {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

.dtm-link--has-sub {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dtm-link--has-sub .dtm-arrow {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(255, 255, 255, 0.96);
  border-bottom: 2px solid rgba(255, 255, 255, 0.96);
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.98;
  margin-left: 6px;
}

.dtm-group {
  display: grid;
  gap: 2px;
  margin: 2px 0 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.dtm-sublink {
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  padding: 9px 0 9px 12px;
  position: relative;
}

.dtm-sublink::before {
  content: none;
}

.dtm-sublink.is-active {
  color: rgba(255, 255, 255, 0.95);
}

.dtm-langRow {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dtm-lang {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  padding: 6px 0;
}

.dtm-lang.is-active {
  color: rgba(255, 255, 255, 0.48);
  pointer-events: none;
}

@media (max-width: 980px) {
  .dtm-burger {
    display: block;
  }

  .dt-nav {
    background: transparent;
  }

  .dt-nav.is-scrolled {
    background: #171717;
  }

  html.dtm-open .dtm-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.dtm-open .dtm-panel {
    transform: translateX(0);
    pointer-events: auto;
  }
}

/* Mobile fix: Focus Areas bubbles keep proper geometry */
@media (max-width: 920px) {
  .dt-portfolio__bubbles {
    width: 380px !important;
    height: 380px !important;
    margin: 0 auto;
  }

  .dt-portfolio__bubble {
    width: 104px !important;
    height: 104px !important;
  }

  .dt-portfolio__bubble--large {
    width: 176px !important;
    height: 176px !important;
  }

  .dt-portfolio__bubble--center { top: 102px !important; left: 102px !important; }
  .dt-portfolio__bubble--top-left { top: 10px !important; left: 18px !important; }
  .dt-portfolio__bubble--top-right { top: 10px !important; right: 18px !important; }
  .dt-portfolio__bubble--bottom-left { bottom: 10px !important; left: 18px !important; }
  .dt-portfolio__bubble--bottom-right { bottom: 10px !important; right: 18px !important; }
}

@media (max-width: 520px) {
  .dt-portfolio__bubbles {
    width: 308px !important;
    height: 308px !important;
  }

  .dt-portfolio__bubble {
    width: 96px !important;
    height: 96px !important;
  }

  .dt-portfolio__bubble--large {
    width: 136px !important;
    height: 136px !important;
  }

  .dt-portfolio__bubbleLabel {
    font-size: 10.5px !important;
    letter-spacing: 0.06em !important;
    padding: 0 10px !important;
  }

  .dt-portfolio__bubble--center { top: 86px !important; left: 86px !important; }
  .dt-portfolio__bubble--top-left { top: 6px !important; left: 10px !important; }
  .dt-portfolio__bubble--top-right { top: 6px !important; right: 10px !important; }
  .dt-portfolio__bubble--bottom-left { bottom: 6px !important; left: 10px !important; }
  .dt-portfolio__bubble--bottom-right { bottom: 6px !important; right: 10px !important; }
}

/* Contact hard override (ensures WPForms output is consistent) */
.dt-contact {
  width: min(1120px, calc(100% - 48px)) !important;
  margin: 0 auto !important;
  padding: 150px 0 70px !important;
}

.dt-contact__title {
  margin: 0 0 12px !important;
  font-size: clamp(28px, 3vw, 44px) !important;
  line-height: 1.1 !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.dt-contact__sub {
  margin: 0 !important;
  font-size: clamp(15px, 1.15vw, 18px) !important;
  line-height: 1.7 !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.68) !important;
}

.dt-contact__formWrap {
  margin-top: 22px !important;
}

.dt-contact__formEmbed .wpforms-container,
.dt-contact__formEmbed .wpforms-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.dt-contact__formEmbed .wpforms-field-container {
  width: 100% !important;
  max-width: none !important;
}

.dt-contact__formEmbed .wpforms-field-row {
  display: flex !important;
  gap: 16px !important;
  margin: 0 0 16px !important;
}

.dt-contact__formEmbed .wpforms-field-row-block {
  flex: 1 1 0 !important;
  width: auto !important;
  margin: 0 !important;
  max-width: none !important;
}

.dt-contact__formEmbed .wpforms-field {
  margin: 0 0 16px !important;
  width: 100% !important;
  max-width: none !important;
}

.dt-contact__formEmbed .wpforms-field label {
  display: none !important;
}

.dt-contact__formEmbed .wpforms-field input,
.dt-contact__formEmbed .wpforms-field textarea {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  background: rgba(0, 0, 0, 0.16) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
}

.dt-contact__formEmbed .wpforms-field input {
  height: 56px !important;
  padding: 0 16px !important;
}

.dt-contact__formEmbed .wpforms-field textarea {
  min-height: 180px !important;
  padding: 14px 16px !important;
  resize: vertical !important;
}

.dt-contact__formEmbed .wpforms-field input::placeholder,
.dt-contact__formEmbed .wpforms-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.58) !important;
  opacity: 1 !important;
}

.dt-contact__formEmbed .wpforms-submit-container {
  margin-top: 2px !important;
  padding: 0 !important;
}

.dt-contact__formEmbed button.wpforms-submit,
.dt-contact__formEmbed .wpforms-submit {
  height: 44px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: rgba(0, 0, 0, 0.92) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.dt-contact__formEmbed button.wpforms-submit:hover,
.dt-contact__formEmbed .wpforms-submit:hover {
  transform: translateY(-1px) !important;
  opacity: 0.96 !important;
}

@media (max-width: 960px) {
  .dt-contact {
    width: min(1120px, calc(100% - 30px)) !important;
    padding-top: 136px !important;
  }

  .dt-contact__formEmbed .wpforms-field-row {
    display: block !important;
    margin: 0 !important;
  }

  .dt-contact__formEmbed .wpforms-field-row-block {
    width: 100% !important;
    margin: 0 0 16px !important;
  }
}
