/*
Theme Name: dering-os-full
Theme URI: https://dering.net
Author: Dmitriy
Description: Custom theme for De Ring Development — AI automation, web development, integrations.
Version: 10
Text Domain: dering
*/

:root{
  --ink:#111111;
  --yellow:#f2c200;
  --yellow-text:#8a6d00; /* тот же жёлтый, но затемнён для текста на светлом фоне — на фоне/кнопках яркий жёлтый не трогаем, там контраст с чёрным текстом и так в порядке */
  --muted:#5b6470;
  --bg:#ffffff;
  --dark:#0d0d0d;
  --line:#e6e6e6;
  --card-bg:#ffffff;
}

[data-theme="dark"]{
  --ink:#f2f2f2;
  --yellow-text:#f2c200; /* на тёмном фоне обычный яркий жёлтый уже даёт хороший контраст, затемнять не нужно */
  --muted:#9aa0a8;
  --bg:#111214;
  --dark:#0d0d0d;
  --line:#2a2c30;
  --card-bg:#1a1b1e;
}

body{transition:background-color .25s ease, color .25s ease;}
html, body{overflow-x:hidden; max-width:100%;}
.site-header, .card, .portfolio-item, .lang-menu, .main-nav.is-open{
  transition:background-color .25s ease, border-color .25s ease, color .25s ease;
}

*{box-sizing:border-box;}

body{
  margin:0;
  background:var(--bg);
  font-family:'Helvetica Neue', Arial, sans-serif;
  color:var(--ink);
}

img{max-width:100%; display:block;}
a{color:inherit;}

.wrap{
  max-width:none;
  margin:0 auto;
  padding:0 64px !important;
}

/* Header / nav */
.site-header{
  position:relative;
  border-bottom:1px solid var(--line);
  padding:20px 0;
}
.site-header .wrap{
  max-width:none;
  padding-left:40px !important;
  padding-right:40px !important;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  row-gap:12px;
  gap:16px;
}
.site-logo{
  font-weight:800;
  font-size:18px;
  text-transform:uppercase;
  letter-spacing:.5px;
  text-decoration:none;
}
.site-logo span{color:var(--yellow-text);}

.header-right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
  margin-left:auto;
}
.header-right .dering-live-search{margin-left:12px;}

.main-nav ul{
  list-style:none;
  display:flex;
  gap:28px;
  margin:0;
  padding:0;
}
.main-nav a{
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  color:var(--ink);
  border-bottom:2px solid transparent;
  padding-bottom:4px;
  transition:border-color .15s ease, color .15s ease;
}
.main-nav a:hover,
.main-nav a.current{
  border-color:var(--yellow);
}

.lang-dropdown{position:relative;}

.lang-switch{
  display:flex;
  align-items:center;
  gap:6px;
  background:none;
  border:none;
  cursor:pointer;
  color:var(--ink);
  font-size:13px;
  font-weight:700;
  letter-spacing:.5px;
  padding:4px 0;
  transition:color .15s ease;
}
.lang-switch:hover{color:var(--yellow);}
.lang-switch svg{flex-shrink:0;}

.lang-menu{
  display:none;
  position:absolute;
  top:calc(100% + 10px);
  left:50%;
  transform:translateX(-50%);
  flex-direction:row;
  gap:4px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
  z-index:30;
  white-space:nowrap;
}
.lang-menu.is-open{display:flex;}
.lang-menu-item{
  padding:6px 10px;
  border-radius:6px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.5px;
  text-decoration:none;
  color:var(--ink);
  transition:background .15s ease, color .15s ease;
}
.lang-menu-item:hover{background:#f7f2df; color:var(--yellow);}
.lang-menu-item.is-current{color:var(--yellow); background:#f7f2df;}

.nav-toggle{
  display:none;
  background:none;
  border:none;
  font-size:24px;
  cursor:pointer;
  color:var(--ink);
}
[data-theme="dark"] .nav-toggle{color:#ffffff;}

.theme-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  background:none;
  border:none;
  cursor:pointer;
  color:var(--ink);
  padding:4px;
  transition:color .15s ease;
}
.theme-toggle:hover{color:var(--yellow);}
.theme-toggle .icon-moon{display:none;}
[data-theme="dark"] .theme-toggle .icon-sun{display:none;}
[data-theme="dark"] .theme-toggle .icon-moon{display:block;}

/* Hero (front page) */
.hero .wrap{
  max-width:none;
  padding-left:64px !important;
  padding-right:64px !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  flex-wrap:wrap;
  padding-top:64px;
  padding-bottom:64px;
}
.hero-left{flex:1 1 480px; min-width:280px;}
.hero h1{
  font-size:64px;
  line-height:1.02;
  font-weight:800;
  letter-spacing:-1px;
  margin:0 0 24px 0;
  text-transform:uppercase;
}
.hero h1 .accent{color:var(--yellow-text);}

/* Казахские слова длиннее русских/английских — уменьшаем, чтобы не вылезали */
html[lang^="kk"] .hero h1,
html[lang^="kz"] .hero h1{
  font-size:48px;
  letter-spacing:-.5px;
}
@media (max-width:1250px){
  html[lang^="kk"] .hero h1,
  html[lang^="kz"] .hero h1{ font-size:40px; }
}
@media (max-width:700px){
  html[lang^="kk"] .hero h1,
  html[lang^="kz"] .hero h1{ font-size:30px; }
}

.hero .subtitle{
  color:var(--muted);
  font-size:17px;
  margin:0 0 20px 0;
}
.hero ul.features{list-style:none; padding:0; margin:0 0 40px 0;}
.hero ul.features li{
  position:relative;
  padding-left:20px;
  margin-bottom:8px;
  font-size:15px;
}
.hero ul.features li::before{
  content:"";
  position:absolute;
  left:0; top:7px;
  width:7px; height:7px;
  background:var(--yellow);
  border-radius:50%;
}
.hero-contact{
  display:flex;
  flex-direction:column;
  gap:10px;
  font-size:16px;
}
.hero-contact a{
  text-decoration:none;
  font-weight:600;
  border-bottom:2px solid transparent;
  transition:border-color .15s ease, color .15s ease;
}
.hero-contact a:hover{color:var(--yellow); border-bottom-color:var(--yellow);}
.hero-right{flex:0 0 auto; text-align:center;}
.hero-media-set{position:relative;}
.hero-media-item{display:none;}
.hero-media-item.is-active{display:block;}
.hero-right img,
.hero-right video{
  max-width:480px;
  width:100%;
  margin:0 auto;
  display:block;
  -webkit-mask-image:radial-gradient(ellipse 65% 65% at center, #000 35%, transparent 100%);
  mask-image:radial-gradient(ellipse 65% 65% at center, #000 35%, transparent 100%);
}
.ai-tag{
  margin-top:8px;
  font-size:12px;
  letter-spacing:2px;
  color:var(--muted);
  text-transform:uppercase;
}

/* Generic page sections */
.page-header{
  padding:56px 0 32px;
  border-bottom:1px solid var(--line);
}
.page-header h1{
  font-size:44px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:-1px;
  margin:0 0 12px 0;
}
.page-header .eyebrow{
  color:var(--yellow-text);
  font-weight:700;
  font-size:13px;
  letter-spacing:2px;
  text-transform:uppercase;
  margin:0 0 8px 0;
}
.section{padding-top:64px; padding-bottom:64px;}
.section-dark{background:var(--dark); color:#fff;}
.section-dark .muted{color:#9aa0a8;}

/* Cards grid (services / portfolio) */
.cards{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:28px;
  margin-top:32px;
}
.card{
  border:1px solid var(--line);
  padding:28px;
}
.card .num{
  color:var(--yellow-text);
  font-weight:800;
  font-size:13px;
  letter-spacing:2px;
  margin-bottom:12px;
  display:block;
}
.card h3{
  font-size:19px;
  margin:0 0 10px 0;
  text-transform:uppercase;
}
.card p{
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
  margin:0;
}

/* Portfolio grid */
.portfolio-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:24px;
}
.pf-filter{
  background:none;
  border:1px solid var(--line);
  border-radius:20px;
  padding:8px 18px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  color:var(--ink);
  transition:background .15s ease, border-color .15s ease, color .15s ease;
}
.pf-filter:hover{border-color:var(--yellow);}
.pf-filter.is-active{background:var(--yellow); border-color:var(--yellow); color:#111;}
.portfolio-item.is-hidden{display:none;}

.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:24px;
  margin-top:32px;
}
.portfolio-item{
  border:1px solid var(--line);
  overflow:hidden;
}
.portfolio-media{
  position:relative;
  background:var(--bg);
  padding:24px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.portfolio-media img,
.portfolio-media video{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
  -webkit-mask-image:radial-gradient(ellipse 70% 70% at center, #000 var(--portfolio-fade, 30%), transparent 100%);
  mask-image:radial-gradient(ellipse 70% 70% at center, #000 var(--portfolio-fade, 30%), transparent 100%);
}
body.fx-watermark .portfolio-media::after{
  content:"DE`RING DEVELOPMENT";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  transform:rotate(-25deg);
  font-size:14px;
  font-weight:800;
  letter-spacing:2px;
  color:rgba(120,120,120,.4);
  text-shadow:0 1px 2px rgba(255,255,255,.4);
  pointer-events:none;
  white-space:nowrap;
  z-index:2;
}
[data-theme="dark"] body.fx-watermark .portfolio-media::after{
  color:rgba(255,255,255,.35);
  text-shadow:0 1px 2px rgba(0,0,0,.5);
}
@media (max-width:600px){
  body.fx-watermark .portfolio-media::after{
    font-size:9px;
    letter-spacing:1px;
  }
}
.portfolio-link{
  display:inline-block;
  margin-top:8px;
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  color:var(--ink);
  border-bottom:2px solid var(--yellow);
}
.portfolio-link:hover{color:var(--yellow);}
.portfolio-item .caption{padding:18px;}
.portfolio-item h3{margin:0 0 6px 0; font-size:17px; text-transform:uppercase;}
.portfolio-item p{margin:0; color:var(--muted); font-size:14px;}

/* Contact page */
.contact-block{
  display:flex;
  gap:48px;
  flex-wrap:wrap;
  margin-top:24px;
}
.contact-info{flex:1 1 260px;}
.contact-info .row{margin-bottom:16px; font-size:16px;}
.contact-info .label{
  display:block;
  color:var(--muted);
  font-size:12px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  margin-bottom:4px;
}
.contact-info a{text-decoration:none; font-weight:600;}
.contact-info a:hover{color:var(--yellow);}

.contact-forms{
  display:flex;
  gap:40px;
  flex-wrap:wrap;
  margin-top:48px;
}
.form-block{flex:1 1 320px; min-width:280px; display:flex; flex-direction:column;}
.form-block h3{margin:0; font-size:18px; text-transform:uppercase;}
.form-block-head{
  height:66px;
  margin-bottom:16px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.booking-meta:empty{display:none;}
.booking-meta{margin-top:10px;}
.dering-form{display:flex; flex-direction:column; flex:1;}
.dering-form input,
.dering-form textarea{
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:4px;
  font-family:inherit;
  font-size:14px;
  background:var(--bg);
  color:var(--ink);
}
.dering-form textarea{flex:1; min-height:100px;}
.dering-form > *{margin-bottom:12px;}
.dering-form .form-row{display:flex; gap:12px;}
.dering-form .form-row input{flex:1;}
.field-label{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.5px;
}
.dering-form button{
  align-self:flex-start;
  margin-top:auto;
  background:var(--yellow);
  border:none;
  padding:12px 28px;
  font-weight:700;
  cursor:pointer;
  border-radius:4px;
  transition:opacity .15s ease;
}
.dering-form button:hover{opacity:.85;}
.dering-form button:disabled{opacity:.5; cursor:not-allowed;}
.form-status{font-size:13px; margin:0;}
.form-status.is-success{color:#2a8a4a;}
.form-status.is-error{color:#c0392b;}

/* Blog */
.post-date{
  font-size:12px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--muted);
  margin:0 0 8px 0;
}
.single-post .post-date{margin-top:5px;}
.post-category-link{color:var(--yellow, #f2c200); text-transform:none; letter-spacing:normal; text-decoration:none;}
.post-category-link:hover{text-decoration:underline;}
.blog-list{display:flex; flex-direction:column; gap:40px;}
.blog-list-item{
  display:flex;
  gap:28px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--line);
  padding-bottom:32px;
}
.blog-list-media{
  flex:0 0 280px;
  display:block;
  overflow:hidden;
  border:1px solid var(--line);
}
.blog-list-media img,
.blog-list-media video{width:100%; height:auto; display:block;}
.blog-list-body{flex:1 1 320px; min-width:260px;}
.blog-list-body h2{margin:0 0 10px 0; font-size:22px; text-transform:uppercase;}
.blog-list-body h2 a{text-decoration:none; color:inherit;}
.blog-list-body h2 a:hover{color:var(--yellow);}
.blog-list-body p{color:var(--muted); line-height:1.6;}
.blog-read-more{
  display:inline-block;
  margin-top:8px;
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  color:var(--ink);
  border-bottom:2px solid var(--yellow);
}
.blog-read-more:hover{color:var(--yellow);}

.single-post h1{
  font-size:38px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:-1px;
  margin:0 0 24px 0;
}
.post-media{
  margin-bottom:32px;
  max-width:560px;
  background:var(--bg);
  padding:20px;
}
.post-media img,
.post-media video{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
  -webkit-mask-image:radial-gradient(ellipse 70% 70% at center, #000 30%, transparent 100%);
  mask-image:radial-gradient(ellipse 70% 70% at center, #000 30%, transparent 100%);
}
.post-content{font-size:17px; line-height:1.7; max-width:720px;}
.post-author{
  margin-top:40px;
  padding-top:20px;
  border-top:1px solid var(--line);
  font-weight:700;
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--muted);
}

/* Footer */
.site-footer{
  border-top:1px solid var(--line);
  padding:32px 0;
  color:var(--muted);
  font-size:13px;
}
.site-footer .wrap{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
}
.site-footer a{text-decoration:none; color:var(--muted);}
.site-footer a:hover{color:var(--yellow);}

/* Responsive */
@media (max-width:1250px){
  .hero .wrap{padding-left:32px !important; padding-right:32px !important; gap:24px;}
  .hero-left{flex:1 1 380px; min-width:260px;}
  .hero h1{font-size:52px;}
  .hero-right img, .hero-right video{max-width:340px;}
}

@media (max-width:900px){
  .cards{grid-template-columns:repeat(2, 1fr);}
  .portfolio-grid{grid-template-columns:1fr;}
}

@media (max-width:700px){
  .wrap{padding-left:20px !important; padding-right:20px !important;}

  .site-header .wrap{padding-left:12px !important; padding-right:12px !important; gap:8px !important;}
  .site-logo{font-size:11px; letter-spacing:.1px; min-width:0; flex-shrink:1;}

  .header-right{justify-content:flex-end; gap:6px; min-width:0; flex-shrink:0;}
  .dering-live-search{margin-left:6px !important;}
  .dering-search-toggle svg{width:17px; height:17px;}
  .theme-toggle svg{width:16px; height:16px;}
  .lang-switch svg{width:16px; height:16px;}
  .lang-current{font-size:11px;}
  .theme-toggle, .lang-switch, .spotlight-toggle{padding:4px;}
  .nav-toggle{font-size:20px; padding:2px 4px;}
  .main-nav{
    display:none;
    order:3;
  }
  .main-nav.is-open{
    display:block;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:var(--bg);
    border-bottom:1px solid var(--line);
    padding:20px;
    box-shadow:0 8px 16px rgba(0,0,0,.06);
    z-index:20;
  }
  .main-nav ul{flex-direction:column; gap:14px;}
  .lang-dropdown{order:1;}
  .nav-toggle{display:block; order:2;}

  .hero .wrap{padding-top:40px; padding-bottom:40px; padding-left:20px !important; padding-right:20px !important; flex-direction:column; text-align:center;}
  .hero h1{font-size:38px;}
  .hero ul.features{display:inline-block; text-align:left;}
  .hero-contact{align-items:center;}
  .hero-right{order:-1; margin-bottom:12px;}
  .hero-right img, .hero-right video{max-width:260px;}

  .page-header h1{font-size:30px;}
  .cards{grid-template-columns:1fr;}
  .contact-block{flex-direction:column; gap:24px;}
}

@media (max-width:380px){
  .hero h1{font-size:30px;}
  .site-logo{font-size:12.5px;}
}

:focus-visible{
  outline:2px solid var(--yellow);
  outline-offset:2px;
}

/* Blog language notice modal */
.dering-lang-notice-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.dering-lang-notice-box{
  background:var(--bg,#fff);
  color:var(--ink,#111);
  border:1px solid var(--line,#e6e6e6);
  max-width:360px;
  width:100%;
  padding:28px;
  border-radius:8px;
  text-align:center;
  box-shadow:0 12px 32px rgba(0,0,0,.2);
}
.dering-lang-notice-box p{margin:0 0 20px 0; font-size:15px; line-height:1.5;}
.dering-lang-notice-actions{display:flex; gap:10px; justify-content:center; flex-wrap:wrap;}
.dering-lang-notice-link{
  display:inline-block;
  padding:10px 20px;
  font-weight:700;
  font-size:14px;
  border-radius:4px;
  text-decoration:none;
  border:1px solid var(--line,#e6e6e6);
  color:var(--ink,#111);
}
.dering-lang-notice-link:hover{border-color:var(--yellow); color:var(--yellow);}
.dering-lang-notice-box button{
  background:var(--yellow);
  border:none;
  padding:10px 28px;
  font-weight:700;
  border-radius:4px;
  cursor:pointer;
}
.dering-lang-notice-box button:hover{opacity:.85;}
@media (max-width:480px){
  .dering-lang-notice-box{padding:20px;}
  .dering-lang-notice-box p{font-size:14px;}
}

/* --- Breadcrumbs --- */
.dering-breadcrumbs{margin:20px 0 0;}
.dering-breadcrumbs ol{
  list-style:none; display:flex; flex-wrap:wrap; gap:0;
  margin:0; padding:0; font-size:13px; color:#888;
}
.dering-breadcrumbs li{display:flex; align-items:center;}
.dering-breadcrumbs li:not(:last-child)::after{
  content:"/"; margin:0 8px; color:#ccc;
}
.dering-breadcrumbs a{color:#888; text-decoration:none;}
.dering-breadcrumbs a:hover{color:#f2c200;}
.dering-breadcrumbs li[aria-current="page"]{color:#111; font-weight:500;}
