/* Dalil IMEX theme — header, footer, layout. Directory components live in the plugin (dalil.css). */
:root{--dl-red:#E60000;--dl-red-dark:#B80000;--dl-black:#0F0F10;--dl-line:#E7E7EA;--dl-muted:#6B6B72}
html{scroll-behavior:smooth}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.wp-site-blocks{padding:0!important}
.wp-site-blocks>*{margin-block-start:0!important}
.dl-container{max-width:1240px;margin-inline:auto;padding-inline:clamp(16px,3vw,32px);box-sizing:border-box}
.dl-main-wrap{padding-block:24px 48px}
.dl-main-wrap>*{max-width:1240px!important;margin-inline:auto!important}
.dl-home-body{padding-block:8px 48px}
.dl-home-body>*{margin-block:40px 0}
.dl-home-body>.dalil-ad:first-child{margin-top:28px}
.dl-page-title{margin:0 0 16px!important}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--dl-red);outline-offset:2px}

/* top bar */
.dl-topbar{background:var(--dl-black);color:#C9C9CF;font-size:.82rem}
.dl-topbar .dl-container{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:36px}
.dl-topbar-links{display:flex;gap:18px;align-items:center}
.dl-topbar a{color:#fff;text-decoration:none}
.dl-topbar a:hover{color:#FF6B6B}
.dl-lang{border:1px solid rgba(255,255,255,.3);padding:1px 10px;border-radius:999px}
@media (max-width:640px){.dl-topbar-tag{display:none}.dl-topbar .dl-container{justify-content:center}}

/* header */
.dl-header{background:#fff;border-bottom:1px solid var(--dl-line);position:sticky;top:0;z-index:50;box-shadow:0 2px 12px rgba(0,0,0,.04)}
.admin-bar .dl-header{top:32px}
@media (max-width:782px){.admin-bar .dl-header{top:0}}
.dl-header-row{display:flex;align-items:center;gap:20px;min-height:72px}
.dl-logo{display:flex;align-items:center;flex:none;text-decoration:none}
.dl-logo-img{height:52px;width:auto;display:block}
.dl-logo-text{gap:8px;color:var(--dl-red)}
.dl-logo-text .dl-logo-d{display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;background:var(--dl-red);color:#fff;font-weight:900;font-size:1.6rem;border-radius:6px 22px 22px 6px}
.dl-logo-text b{display:block;line-height:1.1;font-weight:900}
.dl-nav{flex:1}
.dl-nav>ul{list-style:none;margin:0;padding:0;display:flex;gap:4px;align-items:center}
.dl-nav li{position:relative}
.dl-nav>ul>li>a{display:block;padding:24px 12px;color:var(--dl-black);text-decoration:none;font-weight:700;font-size:.98rem;border-bottom:3px solid transparent}
.dl-nav>ul>li>a:hover,.dl-nav>ul>li:focus-within>a{color:var(--dl-red);border-bottom-color:var(--dl-red)}
.dl-sub-toggle{display:none}
.dl-sub{list-style:none;margin:0;padding:10px;position:absolute;inset-inline-start:0;top:100%;min-width:260px;background:#fff;border:1px solid var(--dl-line);border-top:3px solid var(--dl-red);border-radius:0 0 12px 12px;box-shadow:0 16px 40px rgba(0,0,0,.12);display:none;columns:1}
.dl-has-sub:hover>.dl-sub,.dl-has-sub:focus-within>.dl-sub{display:block}
.dl-sub a{display:block;padding:8px 12px;border-radius:8px;color:#222;text-decoration:none;font-size:.93rem}
.dl-sub a:hover{background:#FFF1F0;color:var(--dl-red)}
.dl-sub-all a{color:var(--dl-red);font-weight:700}
.dl-header-actions{display:flex;align-items:center;gap:8px;flex:none}
.dl-icon-btn{display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;border-radius:10px;color:var(--dl-black);border:1px solid var(--dl-line)}
.dl-icon-btn:hover{color:var(--dl-red);border-color:var(--dl-red)}
.dl-menu-toggle{display:none;background:none;border:0;width:44px;height:44px;padding:10px;cursor:pointer;flex-direction:column;justify-content:space-between}
.dl-menu-toggle span:not(.screen-reader-text){display:block;height:3px;background:var(--dl-black);border-radius:2px}
.dl-header-ad{margin-top:12px}
.dl-header-ad .dalil-ad{margin:0 auto}

@media (max-width:1024px){
  .dl-header-row{flex-wrap:wrap;gap:10px;min-height:64px}
  .dl-logo-img{height:42px}
  .dl-menu-toggle{display:flex;order:3}
  .dl-header-actions{margin-inline-start:auto}
  .dl-add-btn{padding:9px 12px;font-size:.88rem}
  .dl-nav{order:4;flex-basis:100%;display:none;max-height:70vh;overflow:auto;padding-bottom:12px}
  .dl-nav.is-open{display:block}
  .dl-nav>ul{flex-direction:column;align-items:stretch;gap:0}
  .dl-nav>ul>li{display:flex;flex-wrap:wrap;border-top:1px solid var(--dl-line)}
  .dl-nav>ul>li>a{flex:1;padding:14px 4px;border:0}
  .dl-sub-toggle{display:block;background:none;border:0;font-size:1.1rem;padding:0 14px;cursor:pointer}
  .dl-sub{position:static;display:none!important;box-shadow:none;border:0;flex-basis:100%;padding:0 0 8px;columns:2}
  .dl-has-sub.is-open>.dl-sub{display:block!important}
}
.dl-add-short{display:none}
@media (max-width:420px){.dl-add-full{display:none}.dl-add-short{display:inline}.dl-add-btn{padding:9px 12px}}

/* footer */
.dl-footer-sponsors{padding-block:32px 8px}
.dl-footer{background:var(--dl-black);color:#BDBDC4;margin-top:32px;padding-block:48px 20px;position:relative;overflow:hidden}
.dl-footer::before{content:"";position:absolute;top:0;inset-inline:0;height:4px;background:var(--dl-red)}
.dl-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px}
@media (max-width:900px){.dl-footer-grid{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.dl-footer-grid{grid-template-columns:1fr}}
.dl-footer h3{color:#fff;font-size:1rem;margin:0 0 12px}
.dl-footer ul{list-style:none;margin:0;padding:0}
.dl-footer li{margin:6px 0}
.dl-footer a{color:#E2E2E6;text-decoration:none}
.dl-footer a:hover{color:#FF6B6B}
.dl-footer-about p{max-width:42ch;font-size:.92rem}
.dl-logo-footer{background:#fff;padding:8px 12px;border-radius:10px;display:inline-flex;margin-bottom:12px}
.dl-logo-footer .dl-logo-img{height:44px}
.dl-copy{border-top:1px solid #2A2A2E;margin:32px 0 0;padding-top:16px;font-size:.82rem;text-align:center}

/* blog cards (non-directory pages) */
.dl-post-card{background:#fff;border:1px solid var(--dl-line);border-radius:14px;padding:12px;height:100%}
.dl-post-card .wp-block-post-title a{color:var(--dl-black);text-decoration:none}

/* --- fixes v1.0.1 --- */
*,*::before,*::after{box-sizing:border-box}
html,body{overflow-x:clip}
.dl-nav>ul>li>a{white-space:nowrap;padding-inline:10px}
@media (min-width:1025px) and (max-width:1240px){.dl-nav>ul>li>a{font-size:.9rem;padding-inline:7px}.dl-topbar-tag{display:none}}

.dl-topbar-wa{display:inline-flex;align-items:center;gap:4px}
.dl-topbar-wa svg{width:14px;height:14px;fill:#25D366}

/* --- mobile pass 1.0.5 --- */
.dl-topbar-links a{white-space:nowrap}
@media (max-width:640px){
  .dl-topbar{font-size:.78rem}
  .dl-topbar .dl-container{justify-content:center;min-height:34px}
  .dl-topbar-links{gap:14px}
  .dl-topbar-mail{display:none}
  .dl-topbar-wa svg{width:14px;height:14px;vertical-align:-2px}
}
@media (max-width:520px){
  .dl-footer{padding-block:36px 84px}
  .dl-footer-grid{grid-template-columns:1fr 1fr;gap:24px 16px}
  .dl-footer-grid>*:first-child,.dl-footer-grid>*:last-child{grid-column:1/-1}
}

/* --- 1.0.6: topbar buttons, mobile header on one line --- */
.dl-topbar .dl-topbar-btn,.dl-topbar .dl-lang{background:var(--dl-red);color:#fff;border:0;padding:3px 14px;border-radius:999px;font-weight:700;line-height:1.6}
.dl-topbar .dl-topbar-btn:hover,.dl-topbar .dl-lang:hover{background:#fff;color:var(--dl-red)}
@media (max-width:1024px){
  .dl-header-row{flex-wrap:wrap;column-gap:8px;row-gap:0}
  .dl-logo{flex:0 1 auto;min-width:0}
  .dl-logo-img{height:40px;max-width:100%}
  .dl-header-actions{margin-inline-start:auto;gap:6px}
  .dl-menu-toggle{order:3;width:40px;height:40px;padding:9px 8px;flex:none}
}
@media (max-width:420px){
  .dl-logo-img{height:34px}
  .dl-icon-btn{width:38px;height:38px}
  .dl-add-btn{padding:8px 10px;font-size:.85rem}
  .dl-header-row{min-height:58px;column-gap:6px}
}
