/*
Theme Name: SZF Official
Theme URI: https://example.com/szf-official
Description: Standalone theme for the SZF official website, including custom homepage, navigation, footer, About, News, Products, Contact, and post detail templates.
Author: OpenAI Codex
Version: 0.1.0
Text Domain: szf-official
*/

.szf-header-brand {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.szf-header-brand__link {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
}

.szf-header-brand__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

/* Navbar search should float above menu text when expanded. */
.header-search-upper,
.header-search-upper > .wp-block-group,
.header-search.wp-block-search {
  position: relative;
  overflow: visible;
}

.header-search.wp-block-search {
  left: 0;
  z-index: 20;
}

.header-search.wp-block-search .wp-block-search__inside-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}

.header-search.wp-block-search .wp-block-search__inside-wrapper .wp-block-search__button {
  position: relative;
  z-index: 3;
}

.header-search.wp-block-search:focus-within {
  z-index: 80;
}

.header-search.wp-block-search:focus-within .wp-block-search__inside-wrapper .wp-block-search__input {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: min(340px, 36vw);
  min-width: 220px;
  height: 52px;
  padding: 0 68px 0 18px;
  border: 1px solid rgba(16, 34, 45, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: #10222d;
  box-shadow: 0 16px 38px rgba(16, 34, 45, 0.16);
  z-index: 1;
}

.header-search.wp-block-search:focus-within .wp-block-search__inside-wrapper .wp-block-search__input:focus {
  outline: none;
  border-color: rgba(43, 119, 255, 0.45);
  box-shadow: 0 18px 42px rgba(16, 34, 45, 0.2);
}

/* -------------------------------------------------------- */
/* --- SZF News Single (custom, clean tech style)
-------------------------------------------------------- */
.szf-news-single {
  background: #f8fbfc;
  color: #10222d;
  font-family: "Sora", "PingFang SC", "Microsoft YaHei", sans-serif;
  --szf-news-header-safe: 120px;
}

.szf-news-single * {
  scroll-margin-top: var(--szf-news-header-safe);
}

.szf-news-hero {
  position: relative;
  padding-top: 112px;
  padding-bottom: 88px;
  background: radial-gradient(1200px 500px at 20% 10%, rgba(43, 119, 255, 0.22), transparent 60%),
    radial-gradient(900px 420px at 80% 0%, rgba(0, 167, 183, 0.22), transparent 58%),
    linear-gradient(135deg, rgba(10, 28, 38, 0.92) 0%, rgba(22, 54, 70, 0.88) 100%);
  overflow: hidden;
}

.szf-news-hero__inner {
  text-align: center;
}

.szf-news-hero__title.wp-block-post-title {
  color: #fff;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

.szf-news-hero__excerpt.wp-block-post-excerpt {
  margin-top: 18px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.85;
}

.szf-news-hero__excerpt .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.szf-news-hero__meta {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  gap: 10px;
}

.szf-news-shell {
  padding-top: 0;
  padding-bottom: 92px;
}

.szf-news-panel {
  margin-top: -54px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(12, 31, 43, 0.12);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(17, 47, 63, 0.12);
  padding: 34px 34px 8px;
}

.szf-news-panel > * {
  max-width: 100%;
}

.szf-news-article__meta {
  color: rgba(16, 34, 45, 0.7);
  font-size: 13px;
  gap: 10px;
}

.szf-news-article__cover img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(12, 31, 43, 0.12);
  box-shadow: 0 16px 40px rgba(16, 34, 45, 0.08);
}

.szf-news-article .wp-block-post-content {
  font-size: 16px;
  line-height: 1.9;
  color: rgba(16, 34, 45, 0.86);
}

.szf-news-article .wp-block-post-content h2,
.szf-news-article .wp-block-post-content h3 {
  color: #10222d;
  letter-spacing: -0.02em;
}

.szf-news-article__nav .wp-block-post-navigation-link {
  margin-top: 0;
}

.szf-news-article__nav a {
  text-decoration: none;
}

@media (max-width: 781px) {
  .szf-news-hero {
    padding-top: 96px;
    padding-bottom: 76px;
  }
  .szf-news-panel {
    margin-top: -42px;
    padding: 26px 18px 6px;
    border-radius: 22px;
  }
}

@media screen and (min-width: 782px) {
  /* Theme header (.lower-header) overlays the top area on desktop. */
  .szf-news-single {
    --szf-news-header-safe: 180px;
  }
  .szf-news-hero {
    padding-top: 176px;
  }
}

@media (max-width: 781px) {
  .szf-header-brand {
    justify-content: center;
    min-height: 52px;
  }

  .szf-header-brand__link {
    max-width: 180px;
  }

  .szf-header-brand__image {
    max-height: 44px;
  }

  .header-search.wp-block-search:focus-within .wp-block-search__inside-wrapper .wp-block-search__input {
    width: min(260px, calc(100vw - 32px));
    min-width: 0;
  }
}
