/*
Theme Name: LEDAZ
Theme URI: https://ledaz.com.hk
Author: LEDAZ Migration
Author URI: https://ledaz.com.hk
Description: Bilingual WordPress theme for LEDAZ, covering the About, service, project archive/detail, and contact templates migrated from the legacy PHP site.
Version: 1.1.6
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ledaz-theme
*/

:root {
  --ledaz-ink: #17242c;
  --ledaz-accent: #0b7b79;
  --ledaz-pink: #ea4498;
  --ledaz-line: #d8e0e0;
  --ledaz-page: #ffffff;
  --ledaz-field-bg: #646464;
  --ledaz-grey-btn: #cbcbcb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: #dcdcdc;
  background: #000;
  font-family: "Trebuchet MS", Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.ledaz-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------
   Header / banner / primary nav (V-03, V-04, V-05, V-06)
   -------------------------------------------------------------------- */
.ledaz-header {
  position: relative;
  background: #000;
  border-bottom: 1px solid #242424;
}

.ledaz-header__inner {
  display: flex;
  align-items: center;
    height: 100px;
    padding: 0;
    gap: 0;
}

.ledaz-brand {
  display: block;
  flex: 0 0 auto;
    padding: 0;
}

/* Legacy banner is 567x48; scale up to its native max-width instead of
   clamping it to a fraction of that size (was max-width:248px). */
.ledaz-brand img {
  display: block;
    width: 567px;
    max-width: 100%;
  height: auto;
  max-height: none;
}

.ledaz-nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid #4a4a4a;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
}

.ledaz-nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #dcdcdc;
}

.ledaz-nav {
  margin-left: auto;
    align-self: flex-start;
    margin-top: 54px;
}

.ledaz-nav > ul {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ledaz-nav > ul > li {
  position: relative;
  border-left: 1px solid #a8a8a8;
}

.ledaz-nav > ul > li:first-child {
  border-left: 0;
}

.ledaz-nav a {
  display: inline-block;
  padding: 0 12px;
  color: #a8a8a8;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.3s linear;
}

.ledaz-nav a:hover,
.ledaz-nav a:focus,
.ledaz-nav a.current {
  color: #fff;
}

/* "Our Products" dropdown (V-04) */
.ledaz-nav .menu-item-has-children {
  position: relative;
}

.ledaz-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 12px;
  z-index: 50;
  display: none;
  min-width: 210px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: rgba(120, 120, 120, 0.92);
  text-align: left;
}

.ledaz-nav .menu-item-has-children:hover .sub-menu,
.ledaz-nav .menu-item-has-children.is-open .sub-menu {
  display: block;
}

.ledaz-nav .sub-menu li {
  border-left: 0;
  position: relative;
}

.ledaz-nav .sub-menu a {
  display: block;
  width: 100%;
  padding: 6px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  color: #ccc;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.ledaz-nav .sub-menu a:hover,
.ledaz-nav .sub-menu a.current {
  color: #fff;
  box-shadow: inset 5px 0 0 var(--ledaz-pink);
}

/* Single opposite-language toggle instead of a bulleted language list (V-05) */
.ledaz-language-nav {
  margin-left: 4px;
  align-self: flex-start;
  margin-top: 54px;
  padding-left: 12px;
  border-left: 1px solid #a8a8a8;
}

.ledaz-language-nav a {
  color: #a8a8a8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.ledaz-language-nav a:hover {
  color: #fff;
}

@media (max-width: 780px) {
  .ledaz-nav-toggle { display: block; }

  .ledaz-header__inner {
    height: auto;
    min-height: 78px;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .ledaz-brand img {
    width: min(567px, calc(100vw - 150px));
  }

  .ledaz-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 0;
    display: none;
  }

  .ledaz-nav.is-open { display: block; }

  .ledaz-nav > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .ledaz-nav > ul > li {
    border-top: 1px solid #2a2a2a;
  }

  .ledaz-nav .sub-menu {
    position: static;
    display: none;
    background: rgba(0, 0, 0, 0.3);
  }

  .ledaz-nav .menu-item-has-children.is-open .sub-menu {
    display: block;
  }

  .ledaz-language-nav {
    margin-left: auto;
    margin-top: 0;
    border-left: 0;
  }
}

/* --------------------------------------------------------------------
   Body / page shell
   -------------------------------------------------------------------- */
main.ledaz-container {
  min-height: 610px;
  padding-top: 42px;
  padding-bottom: 42px;
  background: #141414 url('assets/page-side-bg.jpg') repeat-x top center;
}

.ledaz-page {
  max-width: 920px;
  min-height: 520px;
  margin: 0 auto;
  padding: 38px 50px;
  color: #c8c8c8;
  font-size: 16px;
  text-align: justify;
}

.ledaz-page h1 {
  margin-top: 0;
  color: var(--ledaz-pink);
  font-size: 40px;
  line-height: 1.15;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------
   Service pages: two-column layout with hero image (V-18, V-19)
   -------------------------------------------------------------------- */
.ledaz-page--service {
  max-width: 1140px;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  background: url('assets/share-bg.jpg') repeat-x;
}

.ledaz-page--service .ledaz-service-copy {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  padding: 50px;
  color: #c8c8c8;
  font-size: 16px;
  line-height: 1.3;
  text-align: justify;
}

.ledaz-page--service .ledaz-service-copy h1 {
  margin-top: 0;
}

.ledaz-page--service .ledaz-service-hero {
  flex: 0 0 66.6667%;
  max-width: 66.6667%;
}

.ledaz-page--service .ledaz-service-hero img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 780px) {
  .ledaz-page--service .ledaz-service-copy,
  .ledaz-page--service .ledaz-service-hero {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------
   Contact page: two-column layout (V-39)
   -------------------------------------------------------------------- */
.ledaz-page--contact,
.ledaz-page--contact-tc {
  max-width: 1140px;
  min-height: 600px;
  padding: 0;
  background: url('assets/contact-bg.jpg') repeat-x #141414;
}

.ledaz-contact-columns {
  display: flex;
  flex-wrap: wrap;
  min-height: 600px;
}

.ledaz-contact-columns .ledaz-contact-address,
.ledaz-contact-columns .ledaz-contact-form-col {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 70px 52px 30px;
}

.ledaz-contact-form-col {
  background: url('assets/contact-divider.png') no-repeat left top;
}

.ledaz-contact-address {
  color: #828282;
  font-size: 13px;
  line-height: 20px;
}

.ledaz-contact-address strong {
  display: inline-block;
  padding-bottom: 10px;
  font-size: 15px;
}

.ledaz-contact-address a {
  color: var(--ledaz-pink);
  text-decoration: underline;
}

@media (max-width: 780px) {
  .ledaz-page--contact,
  .ledaz-page--contact-tc,
  .ledaz-contact-columns {
    min-height: 0;
  }

  .ledaz-contact-columns .ledaz-contact-address,
  .ledaz-contact-columns .ledaz-contact-form-col {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 36px 24px;
    background: none;
  }
}

/* --------------------------------------------------------------------
   Home / About page (V-14, V-15, V-16, V-17)
   -------------------------------------------------------------------- */
.home main.ledaz-container {
  position: relative;
  min-height: 650px;
  padding-top: 0;
  padding-bottom: 0;
  background: #000 url('assets/aboutus-bg.jpg') no-repeat top center;
  background-size: auto 100%;
}

.home article {
  width: 42%;
  min-height: 430px;
  margin-left: auto;
  padding: 62px 38px 12px;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  text-align: justify;
}

.home article strong.ledaz-heading,
.home article h2 {
  display: block;
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  text-decoration: underline;
}

.home article p {
  margin: 0 0 8px;
}

.ledaz-services {
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  width: 58%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0 38px 34px;
}

.ledaz-services a {
  display: block;
  border: 0;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.ledaz-services img {
  display: block;
  width: 100%;
  height: auto;
}

.ledaz-services img.img-hover { display: none; }
.ledaz-services a:hover img.img-default { display: none; }
.ledaz-services a:hover img.img-hover { display: block; }

.ledaz-services span {
  display: block;
  padding: 8px 6px 0;
}

/* The desktop home scene is widescreen. Keep the stage at 16:9 instead of
   inheriting the old 650px fixed height, which becomes a 4:3-looking crop
   whenever the browser is narrower than the full 1200px legacy canvas. */
@media (min-width: 781px) {
  .home main.ledaz-container {
    min-height: 0;
    aspect-ratio: 16 / 9;
    background-size: cover;
  }
}

/* At compact desktop widths the original 1200px background used to be
   cropped while the 58% tile area reduced the four product buttons below
   their usable legacy size. Scale the scene to the stage width and reserve
   more space for the product strip; full desktop keeps the 8/4 layout. */
@media (max-width: 1000px) and (min-width: 781px) {
  .home main.ledaz-container {
    min-height: 0;
    background-size: cover;
  }

  .home article {
    width: 35%;
    min-height: 0;
    padding: clamp(20px, 3.4vw, 40px) clamp(16px, 2.4vw, 28px) 8px;
    font-size: clamp(9px, 1vw, 11px);
    line-height: 1.2;
  }

  .home article strong.ledaz-heading,
  .home article h2 {
    font-size: clamp(11px, 1.15vw, 13px);
  }

  .home article p {
    margin-bottom: clamp(6px, 1vw, 10px);
  }

  .ledaz-services {
    width: 65%;
    gap: clamp(10px, 1.7vw, 16px);
    padding: 0 clamp(22px, 3.2vw, 38px) clamp(22px, 2.8vw, 34px);
  }

  .ledaz-services img {
    max-width: 171px;
    margin: 0 auto;
  }

  .ledaz-services span {
    font-size: clamp(11px, 1.25vw, 14px);
  }
}

@media (max-width: 780px) {
  .home main.ledaz-container { background-size: cover; }

  .home article,
  .ledaz-services {
    position: static;
    width: 100%;
  }

  .home article {
    min-height: 0;
    padding: 36px 24px 24px;
    background: rgba(0, 0, 0, 0.55);
  }

  .ledaz-services {
    padding: 0 24px 28px;
    background: rgba(0, 0, 0, 0.55);
  }
}

/* --------------------------------------------------------------------
   Project archive (V-22, V-24, V-25)
   -------------------------------------------------------------------- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ledaz-project-archive {
  margin: -42px -20px;
  padding: 4%;
  background: #323232;
}

.ledaz-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 3%;
  row-gap: 5%;
  margin: 0;
}

.ledaz-project-card {
  display: block;
  color: #fff;
  text-decoration: none;
  text-align: center;
}

.ledaz-project-card .thumb-crop {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.6557;
  overflow: hidden;
  margin: 12px auto;
  border: 1px solid #fff;
}

.ledaz-project-card .thumb-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ledaz-project-card .name {
  margin: 0;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ledaz-project-card .cat {
  min-height: 38px;
  margin-top: 2px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ledaz-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: 4% 0 0;
  font-size: 18px;
  color: #141414;
}

.ledaz-pagination .page-numbers {
  display: inline-block;
  padding: 0 4px;
  color: #fff;
  text-decoration: none;
}

.ledaz-pagination .page-numbers.current {
  color: var(--ledaz-pink);
  text-decoration: underline;
}

@media (max-width: 780px) {
  .ledaz-project-archive {
    margin: 0 -20px;
  }

  .ledaz-project-grid {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 4%;
  }
}

/* --------------------------------------------------------------------
   Project detail (V-27, V-29, V-31)
   -------------------------------------------------------------------- */
.ledaz-detail-stage {
  background: #000;
  width: 100%;
}

.single-project main.ledaz-container {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  background: #000;
}

.ledaz-detail-stage .ledaz-container {
  max-width: 100%;
  padding: 0;
}

.btn-back {
  display: inline-block;
  padding: 2% 15px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}

.btn-back:before {
  content: "\2039 Back";
}

.btn-back.is-tc:before {
  content: "\2039 \8fd4\56de";
}

.ledaz-detail-media {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 300px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ledaz-detail-media img,
.ledaz-detail-media video {
  display: block;
  height: 100%;
  margin: 0 auto;
}

.ledaz-detail-media img {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: initial;
}

.ledaz-detail-media video {
  width: 100%;
  object-fit: contain;
}

.ledaz-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  border: 0;
  cursor: pointer;
}

.ledaz-play-overlay img { width: 72px; height: 72px; }

.ledaz-play-overlay.is-hidden { display: none; }

.ledaz-detail-heading {
  width: 100%;
  padding: 10px 15px;
  color: var(--ledaz-pink);
  background: #000;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.ledaz-detail-heading .cat {
  margin-left: 2px;
  color: var(--ledaz-pink);
  font-size: 14px;
}

.ledaz-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 0 20px;
}

.ledaz-carousel-track {
  display: grid;
  grid-auto-columns: calc((100% - 15%) / 4);
  grid-auto-flow: column;
  gap: 5%;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}

.ledaz-carousel-track::-webkit-scrollbar { display: none; }

.ledaz-carousel-track img {
  width: 100%;
  aspect-ratio: 1 / 0.67;
  height: auto;
  object-fit: cover;
  opacity: 0.6;
  cursor: pointer;
}

.ledaz-carousel-track img.is-active,
.ledaz-carousel-track img:hover {
  opacity: 1;
}

.ledaz-carousel-arrow {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  width: 15px;
  height: 26px;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
}

.ledaz-carousel-arrow.prev { left: -30px; background-image: url('assets/arrow-left.png'); }
.ledaz-carousel-arrow.next { right: -30px; background-image: url('assets/arrow-right.png'); }
.ledaz-carousel-arrow[hidden] { display: none; }

@media (max-width: 860px) {
  .ledaz-carousel {
    margin-right: 30px;
    margin-left: 30px;
  }
}

/* --------------------------------------------------------------------
   Footer (V-08, V-09)
   -------------------------------------------------------------------- */
.ledaz-footer {
  position: relative;
  margin-top: 0;
  padding: 24px 0;
  border-top: 1px solid #242424;
  color: #9a9a9a;
  background: #000;
  font-size: 13px;
}

#ledaz-to-top {
  display: none;
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 0;
  background: url('assets/to-top.png') no-repeat center/cover;
  cursor: pointer;
  z-index: 30;
}

/* --------------------------------------------------------------------
   Contact form (V-34, V-36, V-38)
   -------------------------------------------------------------------- */
.ledaz-contact-form {
  display: block;
  max-width: 100%;
}

.ledaz-contact-form > p {
  margin: 0 0 8px;
}

.ledaz-contact-form label {
  display: grid;
  grid-template-columns: 5fr 7fr;
  column-gap: 8px;
  align-items: start;
  font-size: 13px;
}

.ledaz-contact-form__label {
  grid-column: 1;
}

.ledaz-contact-form .required .ledaz-contact-form__label:after {
  content: ' *';
  color: var(--ledaz-pink);
  white-space: nowrap;
}

.ledaz-contact-form input,
.ledaz-contact-form select,
.ledaz-contact-form textarea {
  width: 100%;
  margin: 0;
  border: 1px solid #ccc;
  background: var(--ledaz-field-bg);
  color: #fff;
  padding: 2px 4px;
  font: inherit;
  line-height: 18px;
}

.ledaz-contact-form textarea { height: 72px; }

.ledaz-contact-form .ledaz-consent {
  display: flex;
  grid-template-columns: none;
  font-size: 12px;
  gap: 6px;
  align-items: flex-start;
}

.ledaz-contact-form .ledaz-consent input { width: auto; margin-top: 3px; }

.ledaz-contact-form .ledaz-alt-contact {
  margin-top: 18px;
  font-size: 13px;
  color: #c8c8c8;
}

.ledaz-contact-form .ledaz-alt-contact a {
  color: var(--ledaz-pink);
  text-decoration: underline;
}

.ledaz-contact-form .ledaz-form-actions {
  margin-top: 14px;
  text-align: right;
}

.ledaz-contact-form button,
.ledaz-contact-form .ledaz-btn-reset {
  display: inline-block;
  margin-left: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: var(--ledaz-grey-btn);
  color: #323232;
  font-size: 12px;
  line-height: 26px;
  cursor: pointer;
  box-shadow: -1px -2px 5px #333 inset;
}

.ledaz-contact-form button:hover,
.ledaz-contact-form .ledaz-btn-reset:hover {
  box-shadow: 1px 2px 5px #333 inset;
  color: #666;
}

.ledaz-contact-form__notice {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 4px solid;
  font-size: 13px;
}

.ledaz-contact-form__notice--success {
  background: #e8f7ef;
  border-color: #2f855a;
  color: #17242c;
}

.ledaz-contact-form__notice--error {
  background: #fde8e8;
  border-color: #c53030;
  color: #17242c;
}

.ledaz-contact-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 780px) {
  .ledaz-contact-form label {
    display: block;
  }

  .ledaz-contact-form input,
  .ledaz-contact-form select,
  .ledaz-contact-form textarea {
    margin-top: 4px;
  }
}

/* --------------------------------------------------------------------
   Gallery (single-project fallback grid; kept for non-carousel contexts)
   -------------------------------------------------------------------- */
.ledaz-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.ledaz-gallery img { width: 100%; height: auto; display: block; }

@media (max-width: 780px) {
  .ledaz-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile About-page readability and header fit. */
@media (max-width: 780px) {
  .ledaz-container { padding-left: 14px; padding-right: 14px; }

  .ledaz-header__inner { padding: 12px 0; }

  .ledaz-brand img { width: min(567px, calc(100vw - 112px)); }

  .ledaz-language-nav {
    order: 4;
    width: 100%;
    margin: 10px 0 0;
    border-left: 0;
    text-align: right;
  }

  .home article {
    padding: 28px 20px 20px;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
  }

  .home .ledaz-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 4px 20px 28px;
  }

  .home .ledaz-services span { font-size: 12px; }
}
