/*
 * GiaiDeThi site-wide UI fixes.
 * Loaded by the child theme after the parent theme stylesheet.
 */

/* Desktop dropdown navigation. */
@media (min-width:981px){
  .primary-nav li{position:relative}
  .primary-nav .menu-item-has-children>a{display:inline-flex;align-items:center;gap:6px}
  .primary-nav>ul>li.menu-item-has-children>a::after{content:"▾";font-size:11px;line-height:1;transition:transform .2s ease}
  .primary-nav>ul>li.menu-item-has-children:hover>a::after,
  .primary-nav>ul>li.menu-item-has-children:focus-within>a::after{transform:rotate(180deg)}
  .primary-nav .sub-menu{position:absolute;z-index:1000;top:100%;left:-14px;min-width:240px;display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:10px;background:#fff;border:1px solid var(--gdl-border);border-radius:12px;box-shadow:0 16px 40px rgba(18,70,43,.16);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(10px);transition:opacity .18s ease,transform .18s ease,visibility .18s ease}
  .primary-nav .sub-menu::before{content:"";position:absolute;left:0;right:0;top:-12px;height:12px}
  .primary-nav li:hover>.sub-menu,
  .primary-nav li:focus-within>.sub-menu{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
  .primary-nav .sub-menu li{width:100%;margin:0}
  .primary-nav .sub-menu a{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 12px;border-radius:8px;white-space:nowrap;font-size:14px;font-weight:600;color:var(--gdl-ink)}
  .primary-nav .sub-menu a:hover,
  .primary-nav .sub-menu a:focus{background:var(--gdl-lime);color:var(--gdl-green-dark);outline:none}
  .primary-nav .sub-menu .menu-item-has-children>a::after{content:"›";font-size:18px;line-height:1;margin-left:16px}
  .primary-nav .sub-menu .sub-menu{top:-10px;left:100%;margin-left:8px;transform:translateX(10px)}
  .primary-nav .sub-menu li:hover>.sub-menu,
  .primary-nav .sub-menu li:focus-within>.sub-menu{transform:translateX(0)}
  .primary-nav>ul>li:last-child>.sub-menu{left:auto;right:0}
}

/* Typography cap: the public theme never renders a weight above 600. */
html body h1,html body h2,html body h3,html body h4,html body h5,html body h6,
html body b,html body strong,html body button,html body input[type="button"],html body input[type="submit"],
html body .button,html body .wp-element-button,html body .site-title,html body .primary-nav a,
html body .menu-toggle,html body .eyebrow,html body .hero-search button,html body .search-form button,
html body .button-primary,html body .button-secondary,html body .hero-visual span,html body .gdl-badge,
html body .resource-link>span,html body .quiz-question legend,html body .option-label,
html body .quiz-actions output{font-weight:600!important}

/* Header search + expanded company footer. */
.header-inner{position:relative}
.header-search{flex:1 1 260px;max-width:330px;min-width:210px}
.header-search__form{display:flex;align-items:center;width:100%;min-height:44px;background:#fff;border:1px solid var(--gdl-border);border-radius:12px;padding:4px;transition:border-color .2s ease,box-shadow .2s ease}
.header-search__form:focus-within{border-color:#9fc9ab;box-shadow:0 0 0 3px rgba(18,100,60,.08)}
.header-search__icon{display:grid;place-items:center;flex:0 0 38px;color:var(--gdl-muted)}
.header-search__icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.header-search__form input[type="search"]{min-width:0;flex:1;width:100%;border:0;outline:0;background:transparent;padding:8px 4px;color:var(--gdl-ink);font:inherit;font-size:14px}
.header-search__form input[type="search"]::-webkit-search-cancel-button{cursor:pointer}
.header-search__form button{flex:0 0 auto;border:0;border-radius:9px;background:var(--gdl-green);color:#fff;padding:9px 13px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.header-search__form button:hover{background:var(--gdl-green-dark)}
.footer-grid--company{grid-template-columns:1.05fr 1fr 1.05fr;gap:46px}
.footer-column{min-width:0}
.footer-title{margin:0 0 16px;color:#fff;font-size:18px;line-height:1.35}
.footer-description{margin:0;color:#d8e8de}
.footer-managed{margin:18px 0 0;color:#fff;line-height:1.55}
.footer-info-list,.footer-policy-list{display:grid;gap:14px!important}
.footer-info-list li{display:grid;gap:3px;line-height:1.55}
.footer-info-label{color:#fff;font-weight:600}
.footer-policy-list li{padding-bottom:13px;border-bottom:1px solid rgba(255,255,255,.12)}
.footer-policy-list li:last-child{padding-bottom:0;border-bottom:0}
.footer-policy-list a{display:inline-block;font-weight:600;line-height:1.4}
.footer-policy-list p{margin:5px 0 0;color:#bcd0c3;font-size:13px;line-height:1.55}
.footer-menu{margin-top:20px;padding-top:18px;border-top:1px solid rgba(255,255,255,.12)}
.footer-menu ul{display:flex;flex-wrap:wrap;gap:8px 16px}
.footer-menu a{font-size:13px}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.legal-page-wrap{max-width:920px}
.legal-page{padding:clamp(24px,4vw,46px)}
.legal-page__header{padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid var(--gdl-border)}
.legal-page__header h1{margin:4px 0 14px;font-size:clamp(32px,5vw,50px);line-height:1.12;letter-spacing:-.035em;color:var(--gdl-green-dark)}
.legal-page__lead{max-width:720px;margin:0;color:var(--gdl-muted);font-size:17px}
.legal-page__content h2{font-size:24px;margin-top:1.7em;margin-bottom:.55em}
.legal-page__content p{margin:0 0 1em}
@media (min-width:981px) and (max-width:1180px){.header-inner{gap:14px}.header-search{max-width:260px;min-width:180px}.primary-nav ul{gap:14px}.primary-nav a{font-size:14px}}
@media (max-width:980px){.header-inner{flex-wrap:wrap;gap:10px 14px;padding-block:10px}.site-branding{flex:1 1 auto}.header-search{order:3;flex:1 0 100%;max-width:none;min-width:0}.primary-nav{top:100%;left:0;right:0}.footer-grid--company{grid-template-columns:1fr 1fr}.footer-policies{grid-column:1/-1}}
@media (max-width:640px){.custom-logo{max-width:230px}.header-search__form button{padding-inline:12px}.footer-grid--company{grid-template-columns:1fr;gap:32px}.footer-policies{grid-column:auto}.footer-bottom{align-items:flex-start;flex-direction:column}.legal-page{padding:22px}.legal-page__header h1{font-size:32px}}

/* Footer brand logo replaces the text title in the first footer column. */
.footer-about-logo{display:inline-flex;align-items:center;max-width:min(420px,90vw);margin:0 0 18px;line-height:0;transition:opacity .2s ease,transform .2s ease}
.footer-about-logo:hover{opacity:.84;transform:translateY(-1px)}
.footer-about-logo__image{display:block;width:auto!important;height:auto!important;max-width:min(400px,88vw)!important;max-height:92px!important;object-fit:contain;filter:brightness(0) invert(1);opacity:.98}
@media (max-width:640px){.footer-about-logo{margin-bottom:16px}.footer-about-logo__image{max-width:min(300px,82vw)!important;max-height:72px!important}}

/* Native WordPress blog single page. */
.tdq-blog-single-wrap{max-width:1180px}
.tdq-blog-header h1{max-width:900px}
.tdq-blog-meta{align-items:center}
.tdq-blog-featured img{display:block;max-height:640px;object-fit:cover}
.tdq-blog-content{overflow-wrap:anywhere}
.tdq-blog-content> :first-child{margin-top:0}
.tdq-blog-content> :last-child{margin-bottom:0}
.tdq-blog-content img{border-radius:12px}
.tdq-blog-tags{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:18px;padding-block:16px}
.tdq-blog-page-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:28px;padding-top:20px;border-top:1px solid var(--gdl-border)}
.tdq-blog-page-links a,.tdq-blog-page-links>span:not(:first-child){display:inline-flex;min-width:36px;height:36px;align-items:center;justify-content:center;padding:0 10px;border:1px solid var(--gdl-border);border-radius:9px}
.tdq-blog-post-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}
.tdq-blog-post-nav>div{min-width:0;padding:18px;border:1px solid var(--gdl-border);border-radius:var(--gdl-radius);background:#fff}
.tdq-blog-post-nav span{display:block;margin-bottom:5px;color:var(--gdl-muted);font-size:13px}
.tdq-blog-post-nav a{display:block;color:var(--gdl-ink);font-weight:600;line-height:1.4}
.tdq-blog-post-nav__next{text-align:right}
.tdq-blog-recent-list{list-style:none;margin:0;padding:0}
.tdq-blog-recent-list li{padding:12px 0;border-bottom:1px solid var(--gdl-border)}
.tdq-blog-recent-list li:first-child{padding-top:0}
.tdq-blog-recent-list li:last-child{padding-bottom:0;border-bottom:0}
.tdq-blog-recent-list a{display:block;color:var(--gdl-ink);font-weight:600;line-height:1.4}
.tdq-blog-recent-list small{display:block;margin-top:4px;color:var(--gdl-muted)}
.tdq-blog-all-link{margin:20px 0 0}
@media (max-width:640px){.tdq-blog-post-nav{grid-template-columns:1fr}.tdq-blog-post-nav__next{text-align:left}.tdq-blog-tags{align-items:flex-start;flex-direction:column}}

/* Modern WordPress comments UI for native blog posts. */
.tdq-comments{margin-top:30px;scroll-margin-top:110px}
.tdq-comments-list-card,.tdq-comment-form-card{background:#fff;border:1px solid var(--gdl-border);border-radius:22px;box-shadow:0 16px 44px rgba(18,70,43,.07)}
.tdq-comments-list-card{margin-bottom:24px;padding:26px}
.tdq-comments-list-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid #edf1ee}
.tdq-comments-eyebrow{display:block;margin-bottom:3px;color:var(--gdl-green);font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase}
.tdq-comments-title{margin:0;color:var(--gdl-ink);font-size:25px;line-height:1.25;letter-spacing:-.02em}
.tdq-comments-count{display:grid;place-items:center;min-width:42px;height:42px;padding:0 10px;border-radius:13px;background:var(--gdl-lime);color:var(--gdl-green-dark);font-size:15px;font-weight:600}
.tdq-comment-list,.tdq-comment-list .children{list-style:none;margin:0;padding:0}
.tdq-comment-list>li+li{margin-top:18px}
.tdq-comment-list .children{margin:16px 0 0 34px;padding-left:18px;border-left:2px solid #e8efe9}
.tdq-comment-list .children>li+li{margin-top:14px}
.tdq-comment-list .comment-body{position:relative;padding:18px;border:1px solid #e5ebe6;border-radius:16px;background:#fcfdfc}
.tdq-comment-list .comment-meta{margin-bottom:10px}
.tdq-comment-list .comment-author{display:flex;align-items:center;gap:11px;color:var(--gdl-ink)}
.tdq-comment-list .comment-author .avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 3px #edf7ef}
.tdq-comment-list .comment-author .fn{font-style:normal;font-weight:600}
.tdq-comment-list .comment-author .says{color:var(--gdl-muted);font-size:13px}
.tdq-comment-list .comment-metadata{margin:-7px 0 0 55px;font-size:12px;color:var(--gdl-muted)}
.tdq-comment-list .comment-metadata a{color:var(--gdl-muted)}
.tdq-comment-list .comment-content{padding-left:55px;color:#3e4941;overflow-wrap:anywhere}
.tdq-comment-list .comment-content p{margin:.6em 0}
.tdq-comment-list .reply{margin:10px 0 0 55px}
.tdq-comment-list .reply a{display:inline-flex;align-items:center;padding:6px 10px;border-radius:8px;background:#eef7f0;color:var(--gdl-green-dark);font-size:12px;font-weight:600}
.tdq-comment-list .reply a:hover{background:var(--gdl-lime)}
.tdq-comment-list .comment-awaiting-moderation{display:inline-block;margin:8px 0 0 55px;padding:6px 9px;border-radius:8px;background:#fff8dd;color:#725e15;font-size:12px}
.tdq-comment-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px;padding-top:18px;border-top:1px solid #edf1ee;font-size:14px;font-weight:600}
.tdq-comments-closed{margin:20px 0;padding:14px 16px;border:1px solid #f0dfb1;border-radius:12px;background:#fff9e8;color:#6e5b20}

.tdq-comment-form-card{padding:clamp(22px,3vw,34px)}
.tdq-comment-form-head{display:flex;align-items:flex-start;gap:16px}
.tdq-comment-form-avatar{display:grid;place-items:center;flex:0 0 58px;width:58px;height:58px;border-radius:50%;background:linear-gradient(145deg,#eff9f1,#dff5d8);color:var(--gdl-green);box-shadow:inset 0 0 0 1px rgba(18,100,60,.06)}
.tdq-comment-form-avatar svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tdq-comment-current-avatar{display:block;width:54px!important;height:54px!important;border-radius:50%;object-fit:cover}
.tdq-comment-form-heading-copy{min-width:0;padding-top:2px}
.tdq-comment-form-heading-copy h2{margin:0;color:#153321;font-size:clamp(25px,3vw,32px);line-height:1.2;letter-spacing:-.025em}
.tdq-comment-login-note{margin:8px 0 0;color:var(--gdl-muted);font-size:14px;line-height:1.65}
.tdq-comment-login-note a{font-weight:600}
.tdq-comment-login-note strong{color:var(--gdl-ink)}
.tdq-comment-form-divider{height:1px;margin:24px 0;background:#e9eeea}
.tdq-comment-form-card .comment-respond{margin:0}
.tdq-comment-form-card .comment-reply-title{margin:0}
.tdq-comment-form-card .comment-reply-title:empty{display:none}
.tdq-comment-form-card #cancel-comment-reply-link{display:inline-flex;margin:0 0 14px;padding:7px 10px;border-radius:8px;background:#fff1ef;color:#a33b30;font-size:12px;font-weight:600}
.tdq-comment-form-card .comment-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.tdq-comment-form-card .comment-form>p{margin:0}
.tdq-comment-form-card .comment-notes,.tdq-comment-form-card .logged-in-as,.tdq-comment-form-card .must-log-in,.tdq-comment-form-card .comment-form-comment,.tdq-comment-form-card .comment-form-url,.tdq-comment-form-card .comment-form-cookies-consent,.tdq-comment-submit-wrap{grid-column:1/-1}
.tdq-comment-form-card .tdq-comment-notes{margin:-3px 0 0!important;color:var(--gdl-muted);font-size:13px}
.tdq-comment-field label{display:block;margin:0 0 8px;color:var(--gdl-ink);font-size:14px;font-weight:600}
.tdq-comment-field .required,.tdq-comment-login-note .required{color:#d9362b}
.tdq-comment-field input,.tdq-comment-field textarea{display:block;width:100%;border:1.5px solid #ccd9cf;border-radius:13px;background:#fff;color:var(--gdl-ink);font:inherit;font-size:15px;outline:0;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.tdq-comment-field input{min-height:48px;padding:10px 13px}
.tdq-comment-field textarea{min-height:190px;padding:14px 15px;line-height:1.6;resize:vertical}
.tdq-comment-field input::placeholder,.tdq-comment-field textarea::placeholder{color:#98a39b}
.tdq-comment-field input:hover,.tdq-comment-field textarea:hover{border-color:#a9c4af}
.tdq-comment-field input:focus,.tdq-comment-field textarea:focus{border-color:#68a77a;background:#fff;box-shadow:0 0 0 4px rgba(18,100,60,.09)}
.tdq-comment-form-card .comment-form-cookies-consent{display:flex;align-items:flex-start;gap:9px;padding:2px 0;color:var(--gdl-muted);font-size:13px}
.tdq-comment-form-card .comment-form-cookies-consent input{flex:0 0 auto;width:16px;height:16px;margin-top:4px;accent-color:var(--gdl-green)}
.tdq-comment-form-card .comment-form-cookies-consent label{margin:0}
.tdq-comment-submit-wrap{display:flex;align-items:center;margin-top:2px!important}
.tdq-comment-submit{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;border:0;border-radius:12px;padding:12px 20px;background:linear-gradient(135deg,var(--gdl-green),#0b5430);box-shadow:0 9px 20px rgba(18,100,60,.18);color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.tdq-comment-submit svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tdq-comment-submit:hover{transform:translateY(-1px);background:linear-gradient(135deg,#0e5936,var(--gdl-green-dark));box-shadow:0 12px 24px rgba(18,100,60,.23)}
.tdq-comment-submit:active{transform:translateY(0)}
.tdq-comment-submit:focus-visible{outline:3px solid rgba(18,100,60,.2);outline-offset:3px}
.tdq-comment-form-card .must-log-in{padding:13px 15px;border-radius:11px;background:#f5faf6;color:var(--gdl-muted)}

@media (max-width:640px){
  .tdq-comments{margin-top:24px}
  .tdq-comments-list-card,.tdq-comment-form-card{border-radius:17px}
  .tdq-comments-list-card{padding:18px}
  .tdq-comment-form-card{padding:20px 17px}
  .tdq-comment-form-head{gap:12px}
  .tdq-comment-form-avatar{flex-basis:48px;width:48px;height:48px}
  .tdq-comment-current-avatar{width:44px!important;height:44px!important}
  .tdq-comment-form-avatar svg{width:25px;height:25px}
  .tdq-comment-form-heading-copy h2{font-size:24px}
  .tdq-comment-login-note{font-size:13px}
  .tdq-comment-form-divider{margin:19px 0}
  .tdq-comment-form-card .comment-form{grid-template-columns:1fr;gap:15px}
  .tdq-comment-form-card .comment-form>p{grid-column:1}
  .tdq-comment-field textarea{min-height:160px}
  .tdq-comment-submit{width:100%}
  .tdq-comment-list .children{margin-left:12px;padding-left:11px}
  .tdq-comment-list .comment-body{padding:14px}
  .tdq-comment-list .comment-metadata,.tdq-comment-list .comment-content,.tdq-comment-list .reply,.tdq-comment-list .comment-awaiting-moderation{margin-left:0;padding-left:0}
  .tdq-comment-list .comment-metadata{margin-top:5px}
  .tdq-comment-list .comment-content{margin-top:12px}
}
