/*
Theme Name:   Termohex Child
Theme URI:    https://termohex.az
Description:  Termohex.az üçün Astra child theme
Author:       Termohex
Author URI:   https://termohex.az
Template:     astra
Version:      1.0.0
Text Domain:  termohex-child
*/

/* ============================================
   BRAND COLORS  (logo: flame orange + ice blue)
   Orange:  #e8720a
   Blue:    #4bbfd4
   Dark:    #0f1923
   ============================================ */

:root {
  --thx-primary:     #0f1923;
  --thx-primary-dk:  #070d12;
  --thx-accent:      #e8720a;
  --thx-accent-lt:   #ff9030;
  --thx-blue:        #4bbfd4;
  --thx-blue-lt:     #72d4e8;
  --thx-light:       #f5f7f9;
  --thx-border:      #e0e6ed;
  --thx-text:        #1a2433;
  --thx-text-muted:  #5e7082;
  --thx-white:       #ffffff;
  --thx-radius:      6px;
  --thx-shadow:      0 4px 20px rgba(15,25,35,0.12);
}

/* ---- Typography ---- */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--thx-text);
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--thx-primary-dk);
  font-weight: 700;
  line-height: 1.3;
}

/* ---- Header ---- */
.site-header,
#masthead,
.ast-header-break-point .site-header,
.ast-desktop .ast-primary-header-bar,
.ast-primary-header-bar,
.ast-header-wrap,
header.site-header {
  background-color: #0f1923 !important;
  background: #0f1923 !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.45) !important;
}

/* Astra builder header rows */
.ast-builder-grid-row-container,
.ast-builder-grid-row-container-inner,
.ast-hb-row-full-width,
.ast-primary-header-bar .ast-builder-grid-row,
[data-section="section-header-builder"] {
  background-color: #0f1923 !important;
  background: #0f1923 !important;
}

/* Logo image in header */
.site-header .custom-logo,
.ast-site-identity img {
  max-height: 56px !important;
  width: auto !important;
}

.site-header .site-title a,
.site-header .ast-site-title a {
  color: #ffffff !important;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Main navigation */
.main-navigation a,
.ast-main-navigation .menu > li > a,
.ast-nav-menu > li > a,
#ast-mobile-header .main-navigation a,
.ast-primary-header-bar .ast-nav-menu > li > a {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 8px 14px;
  transition: color 0.2s;
}

.main-navigation a:hover,
.ast-main-navigation .menu > li > a:hover,
.ast-nav-menu > li > a:hover,
.ast-main-navigation .menu > li.current-menu-item > a,
.ast-nav-menu > li.current-menu-item > a {
  color: #e8720a !important;
}

/* Dropdown */
.main-navigation .sub-menu,
.ast-nav-menu .sub-menu {
  background: #070d12 !important;
  border-top: 3px solid #e8720a !important;
}

.main-navigation .sub-menu a,
.ast-nav-menu .sub-menu a {
  color: rgba(255,255,255,0.80) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}

.main-navigation .sub-menu a:hover,
.ast-nav-menu .sub-menu a:hover {
  color: #e8720a !important;
  background: rgba(255,255,255,0.04) !important;
}

/* ---- Language switcher (injected into header) ---- */
#thx-lang-float {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
}

.thx-lsi-btn {
  display: inline-block;
  color: var(--thx-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid rgba(75,191,212,0.4);
  border-radius: 4px;
  user-select: none;
  transition: background 0.2s;
}

.thx-lsi-btn:hover,
#thx-lang-float.open .thx-lsi-btn {
  background: rgba(75,191,212,0.12);
}

.thx-lsi-drop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #070d12;
  border: 1px solid rgba(75,191,212,0.2);
  border-radius: 6px;
  min-width: 80px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}

#thx-lang-float.open .thx-lsi-drop {
  display: block;
}

.thx-lsi {
  display: block;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.75) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s;
}

.thx-lsi:last-child { border-bottom: none; }

.thx-lsi:hover { background: rgba(75,191,212,0.1); color: var(--thx-blue) !important; }

.thx-lsi.thx-lang-on { color: var(--thx-blue) !important; }

/* Polylang fallback */
.pll-parent-menu-item a {
  font-weight: 700 !important;
  color: var(--thx-blue) !important;
  letter-spacing: 1px !important;
}

/* ---- Top bar (phone/email) ---- */
.ast-top-bar-wrap {
  background: var(--thx-primary-dk) !important;
  border-bottom: 1px solid rgba(75,191,212,0.15);
  font-size: 13px;
  padding: 5px 0;
}

.ast-top-bar-wrap,
.ast-top-bar-wrap a {
  color: rgba(255,255,255,0.65) !important;
}

.ast-top-bar-wrap a:hover {
  color: var(--thx-accent) !important;
}

/* ---- Buttons ---- */
.ast-button,
.wp-block-button__link,
.button,
button[type="submit"],
input[type="submit"],
.ast-custom-button {
  background-color: var(--thx-accent) !important;
  color: var(--thx-white) !important;
  border: none !important;
  border-radius: var(--thx-radius) !important;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px !important;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none !important;
}

.ast-button:hover,
.wp-block-button__link:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background-color: var(--thx-accent-lt) !important;
  transform: translateY(-1px);
}

/* ---- Hero Banner ---- */
.thx-hero {
  background: linear-gradient(135deg, var(--thx-primary-dk) 0%, var(--thx-primary) 55%, #0d2233 100%);
  color: var(--thx-white);
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}

/* ---- Hero Slideshow ---- */
.thx-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.thx-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.thx-slide.active {
  opacity: 1;
}

.thx-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(7,13,18,0.82) 0%,
    rgba(15,25,35,0.70) 50%,
    rgba(13,34,51,0.65) 100%
  );
  /* Also add the orange/blue glow on top of image */
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(232,114,10,0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 50%, rgba(75,191,212,0.16) 0%, transparent 50%),
    linear-gradient(135deg, rgba(7,13,18,0.82) 0%, rgba(15,25,35,0.70) 50%, rgba(13,34,51,0.65) 100%);
}

/* Slide indicator dots */
.thx-slide-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.thx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.thx-dot.active {
  background: var(--thx-accent);
  transform: scale(1.3);
}

.thx-hero::before {
  display: none; /* replaced by .thx-hero-overlay */
}

.thx-hero h1 {
  color: var(--thx-white);
  font-size: clamp(28px, 4vw, 52px);
  margin-bottom: 20px;
}

.thx-hero p {
  color: rgba(255,255,255,0.82);
  font-size: 18px;
  margin-bottom: 34px;
  max-width: 560px;
}

.thx-hero .thx-badge {
  display: inline-block;
  background: var(--thx-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 18px;
}

/* ---- Stats bar ---- */
.thx-stats {
  background: linear-gradient(90deg, var(--thx-accent) 0%, #c45e00 50%, var(--thx-accent) 100%);
  padding: 24px 0;
  color: white;
}

.thx-stats-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  text-align: center;
}

.thx-stat-item .thx-stat-number {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  display: block;
}

.thx-stat-item .thx-stat-label {
  font-size: 13px;
  opacity: 0.88;
  margin-top: 4px;
}

/* ---- Section titles ---- */
.thx-section-title {
  text-align: center;
  margin-bottom: 50px;
}

.thx-section-title h2 {
  font-size: clamp(24px, 3vw, 40px);
  color: var(--thx-primary-dk);
  margin-bottom: 14px;
}

.thx-section-title p {
  color: var(--thx-text-muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}

.thx-section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--thx-accent);
  border-radius: 2px;
  margin: 18px auto 0;
}

/* ---- Product Cards ---- */
.thx-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  padding: 0;
}

.thx-product-card {
  background: var(--thx-white);
  border: 1px solid var(--thx-border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none !important;
  color: inherit;
}

.thx-product-card:hover {
  box-shadow: var(--thx-shadow);
  transform: translateY(-4px);
}

.thx-product-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--thx-light);
}

.thx-product-card-body {
  padding: 20px;
}

.thx-product-card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--thx-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.thx-product-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--thx-primary-dk);
  margin-bottom: 10px;
  line-height: 1.3;
}

.thx-product-card-excerpt {
  font-size: 14px;
  color: var(--thx-text-muted);
  margin-bottom: 16px;
}

/* ---- Why Us / Features ---- */
.thx-features {
  background: var(--thx-light);
  padding: 70px 0;
}

.thx-feature-item {
  text-align: center;
  padding: 30px 20px;
}

.thx-feature-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--thx-accent) 0%, var(--thx-blue) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
  color: white;
  box-shadow: 0 4px 16px rgba(232,114,10,0.25);
}

.thx-feature-item h3 {
  font-size: 18px;
  color: var(--thx-primary-dk);
  margin-bottom: 10px;
}

.thx-feature-item p {
  color: var(--thx-text-muted);
  font-size: 14px;
}

/* ---- Contact section ---- */
.thx-contact-bar {
  background: linear-gradient(135deg, var(--thx-primary-dk) 0%, var(--thx-primary) 100%);
  border-top: 3px solid var(--thx-accent);
  color: white;
  padding: 50px 0;
  text-align: center;
}

.thx-contact-bar h2 {
  color: white;
  margin-bottom: 14px;
}

.thx-contact-bar p {
  opacity: 0.82;
  margin-bottom: 28px;
}

.thx-contact-bar a.thx-phone {
  color: var(--thx-accent);
  font-size: 28px;
  font-weight: 800;
  text-decoration: none;
  display: block;
  margin-bottom: 20px;
}

/* ---- Footer ---- */
.site-footer,
#colophon {
  background: var(--thx-primary-dk) !important;
  color: rgba(255,255,255,0.7) !important;
}

.site-footer a,
#colophon a {
  color: rgba(255,255,255,0.75) !important;
  transition: color 0.2s;
}

.site-footer a:hover,
#colophon a:hover {
  color: var(--thx-accent) !important;
}

.site-footer .widget-title,
#colophon .widget-title {
  color: var(--thx-white) !important;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--thx-accent);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

/* ---- Forms ---- */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  border: 1px solid var(--thx-border) !important;
  border-radius: var(--thx-radius) !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--thx-primary) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(26,60,94,0.12);
}

/* ---- Custom home page wrapper ---- */
#thx-page {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
}

#thx-page > *,
#thx-page > section,
#thx-page > div {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  float: none !important;
  clear: both;
}

/* Restore proper container width inside sections */
#thx-page .ast-container {
  display: block !important;
  max-width: 1200px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* All direct children of ast-container must stack vertically */
#thx-page .ast-container > * {
  display: block !important;
  width: 100% !important;
  float: none !important;
  clear: both;
}

/* Restore grid/flex for layout elements */
#thx-page .ast-container > .thx-cat-grid     { display: grid !important; }
#thx-page .ast-container > .thx-product-grid { display: grid !important; }
#thx-page .ast-container > .thx-brands-row   { display: flex !important; }
#thx-page .ast-container > .thx-stats-inner  { display: flex !important; }
#thx-page .ast-container > [style*="display:grid"]  { display: grid !important; }
#thx-page .ast-container > [style*="display:flex"]  { display: flex !important; }

/* ---- Full-width layout override ---- */
body.home .ast-article-post,
body.home #primary,
body.home .content-area,
body.home .site-content > .ast-container,
body.home .entry-content,
body.home .post-entry,
body.home article {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.home #secondary,
body.home .widget-area,
body.home .ast-sidebar-wrap {
  display: none !important;
}

/* Remove Astra entry padding on home */
body.home .ast-article-post .entry-header,
body.home .ast-article-post .entry-content {
  padding: 0 !important;
}

body.home .entry-content > * {
  max-width: 100% !important;
}

/* Sections must be full-width blocks */
.thx-hero,
.thx-stats,
.thx-features,
.thx-contact-bar,
body.home section,
body.home .thx-hero,
body.home .thx-stats {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
  float: none !important;
  clear: both;
}

/* ---- Logo background (logo has black bg, header is also dark — seamless) ---- */
.ast-site-identity .custom-logo-link img,
.site-branding img.custom-logo {
  border-radius: 4px;
}

/* Blue accent highlights */
.thx-section-title::after {
  background: linear-gradient(90deg, var(--thx-accent), var(--thx-blue));
}

a {
  color: var(--thx-accent);
}

a:hover {
  color: var(--thx-blue);
}

/* ---- Category Grid ---- */
.thx-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.thx-cat-card {
  background: var(--thx-white);
  border: 1px solid var(--thx-border);
  border-radius: 12px;
  padding: 32px 20px 24px;
  text-align: center;
  text-decoration: none !important;
  color: var(--thx-text) !important;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.thx-cat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--thx-accent), var(--thx-blue));
  transform: scaleX(0);
  transition: transform 0.25s;
}

.thx-cat-card:hover {
  box-shadow: var(--thx-shadow);
  transform: translateY(-5px);
  border-color: transparent;
}

.thx-cat-card:hover::before {
  transform: scaleX(1);
}

.thx-cat-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 14px;
}

.thx-cat-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--thx-primary-dk);
  margin-bottom: 6px;
  line-height: 1.3;
}

.thx-cat-count {
  font-size: 12px;
  color: var(--thx-text-muted);
  display: block;
  margin-bottom: 12px;
}

.thx-cat-arrow {
  color: var(--thx-accent);
  font-size: 18px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
}

.thx-cat-card:hover .thx-cat-arrow {
  opacity: 1;
}

/* ---- Product tags ---- */
.thx-tag {
  display: inline-block;
  background: rgba(232,114,10,0.10);
  color: var(--thx-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.thx-tag-blue {
  background: rgba(75,191,212,0.12);
  color: var(--thx-blue);
}

.thx-btn-sm {
  font-size: 13px;
  font-weight: 600;
  color: var(--thx-accent);
  display: inline-block;
}

/* ---- Product placeholder icon ---- */
.thx-product-placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: var(--thx-light) !important;
}

/* ---- Brands row ---- */
.thx-brands-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.thx-brand-pill {
  background: var(--thx-light);
  border: 1px solid var(--thx-border);
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--thx-primary-dk);
  transition: all 0.2s;
}

.thx-brand-pill:hover {
  background: var(--thx-primary);
  color: #fff;
  border-color: var(--thx-primary);
}

/* ---- Hero inner max width ---- */
.thx-hero-inner {
  max-width: 660px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .thx-stats-inner { flex-direction: column; gap: 12px; }
  .thx-hero { padding: 60px 0 40px; }
  .thx-product-grid { grid-template-columns: 1fr 1fr; }
  .thx-cat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .thx-product-grid { grid-template-columns: 1fr; }
  .thx-cat-grid { grid-template-columns: 1fr 1fr; }
}
