/* Gia Sư SV homepage mobile-first refinements — 2026-10-06 */
body.home{--gssv-home-safe-bottom:env(safe-area-inset-bottom,0px)}

/* Học & Thi widget: make the plugin block look native to the homepage. */
body.home .gsv-home-widget{
  width:min(1160px,calc(100% - 64px));
  margin:36px auto;
  padding:26px 30px;
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:26px;
  align-items:center;
  background:linear-gradient(135deg,#eef6fd 0%,#fff 72%);
  border:1px solid #d7e5f0;
  border-radius:22px;
  box-shadow:0 10px 28px rgba(23,74,115,.07);
  color:#173f66;
}
body.home .gsv-home-widget>img{
  display:block;
  width:112px!important;
  height:112px!important;
  object-fit:contain;
  margin:auto;
}
body.home .gsv-home-widget>div{min-width:0}
body.home .gsv-home-widget>div>p:first-child{
  margin:0 0 5px;
  font-size:11px;
  line-height:1.4;
  font-weight:800;
  letter-spacing:.12em;
  color:#0b6fc2;
}
body.home .gsv-home-widget h2{
  margin:0 0 7px;
  font-size:28px;
  line-height:1.18;
  color:#173f66;
}
body.home .gsv-home-widget>div>p:not(:first-child){
  margin:0 0 14px;
  color:#526b7e;
  font-size:14px;
  line-height:1.55;
}
body.home .gsv-home-widget form{
  display:grid;
  grid-template-columns:minmax(180px,230px) auto repeat(4,minmax(0,1fr));
  gap:8px;
  align-items:stretch;
}
body.home .gsv-home-widget form label{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  font-size:13px;
  font-weight:700;
  color:#173f66;
}
body.home .gsv-home-widget form select{
  width:100%;
  min-width:0;
  min-height:42px;
  border:1px solid #bfd3e4;
  border-radius:10px;
  background:#fff;
  color:#173f66;
  padding:8px 10px;
  font:inherit;
}
body.home .gsv-home-widget form button,
body.home .gsv-home-widget form a{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid #bfd3e4;
  background:#fff;
  color:#174a73;
  text-decoration:none;
  text-align:center;
  font-size:12px;
  line-height:1.3;
  font-weight:750;
}
body.home .gsv-home-widget form button{
  border-color:#0b6fc2;
  background:#0b6fc2;
  color:#fff;
  cursor:pointer;
}
body.home .gsv-home-widget form a:hover{background:#eef6fd;border-color:#0b6fc2}

/* Mobile header + first-screen density */
@media(max-width:699px){
  body.home .gsp-wrap{width:calc(100% - 24px)}
  body.home .gsp-mainbar{
    min-height:60px;
    padding-top:max(0px,env(safe-area-inset-top));
    gap:8px;
  }
  body.home .gsp-brand{gap:7px;min-width:0}
  body.home .gsp-brand img{width:36px;height:36px}
  body.home .gsp-brand-text strong{font-size:19px}
  body.home .gsp-mobile-actions{gap:6px}
  body.home .gsp-mobile-call,
  body.home .gsp-menu-button{
    min-width:40px!important;
    min-height:40px!important;
    border-radius:10px!important;
    padding:6px 8px!important;
  }
  body.home .gsp-menu-button{min-width:52px!important}
}

@media(max-width:575px){
  body.home{padding-bottom:calc(74px + var(--gssv-home-safe-bottom))!important}

  /* Hero: keep the first screen focused on decision + CTA. */
  body.home .sv-home .sv-wrap{width:calc(100% - 28px)}
  body.home .sv-home .sv-hero{padding:18px 0 14px!important}
  body.home .sv-home .sv-hero-grid{gap:16px!important}
  body.home .sv-home .sv-eyebrow{
    margin-bottom:8px;
    font-size:10px;
    line-height:1.45;
    letter-spacing:1.1px;
  }
  body.home .sv-home h1{
    margin-bottom:9px!important;
    font-size:30px!important;
    line-height:1.08!important;
    letter-spacing:-.55px!important;
  }
  body.home .sv-home h1 span{margin-top:2px!important}
  body.home .sv-home .sv-hero .sv-lead{
    margin-bottom:10px!important;
    font-size:14px!important;
    line-height:1.5!important;
  }
  body.home .sv-home .sv-hero .sv-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin:12px 0 10px!important;
  }
  body.home .sv-home .sv-hero .sv-actions a.sv-btn{
    width:100%;
    min-height:44px;
    padding:8px 9px;
    font-size:13px;
    line-height:1.25;
  }
  body.home .sv-home .sv-hero-assurances{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px 12px;
    margin-top:10px;
    font-size:12px;
    line-height:1.45;
  }
  body.home .sv-home .sv-hero-assurances li:last-child{grid-column:1/-1}
  body.home .sv-home .sv-hero-visual{
    display:block!important;
    width:100%;
    max-width:252px;
    margin:2px auto 0!important;
  }
  body.home .sv-home .sv-home-cover{border-radius:14px!important}
  body.home .sv-home .sv-home-cover .sv-hero-photo{
    width:100%!important;
    height:auto!important;
    aspect-ratio:4/3!important;
    object-fit:cover!important;
    object-position:center 42%!important;
  }
  body.home .sv-home .sv-hero-foot{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    margin-top:12px!important;
  }
  body.home .sv-home .sv-hero-foot a{
    min-height:44px!important;
    padding:8px 6px!important;
    justify-content:center;
    text-align:center;
    border-radius:11px;
  }
  body.home .sv-home .sv-hero-foot b{
    font-size:11.5px!important;
    line-height:1.3!important;
  }
  body.home .sv-home .sv-audience-link{
    margin:5px 0 0!important;
    text-align:center!important;
    font-size:11px!important;
  }
  body.home .sv-home .sv-audience-link a{min-height:34px!important}

  /* Học & Thi: on mobile, direct choices are better than a crowded select row. */
  body.home .gsv-home-widget{
    position:relative;
    display:block!important;
    width:calc(100% - 28px);
    margin:20px auto 26px;
    padding:16px;
    border-radius:18px;
  }
  body.home .gsv-home-widget>img{
    position:absolute;
    top:14px;
    right:14px;
    width:62px!important;
    height:62px!important;
    margin:0!important;
  }
  body.home .gsv-home-widget>div{display:block!important;min-width:0}
  body.home .gsv-home-widget h2{
    max-width:calc(100% - 72px);
    padding-right:0;
    font-size:22px;
    line-height:1.18;
    margin-bottom:5px;
  }
  body.home .gsv-home-widget>div>p:first-child{
    max-width:calc(100% - 72px);
    font-size:9px;
    margin-bottom:4px;
  }
  body.home .gsv-home-widget>div>p:not(:first-child){
    padding-right:66px;
    font-size:12.5px;
    line-height:1.45;
    margin-bottom:12px;
  }
  body.home .gsv-home-widget form{
    display:grid!important;
    width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin-top:2px!important;
  }
  body.home .gsv-home-widget form label,
  body.home .gsv-home-widget form>button{
    display:none!important;
  }
  body.home .gsv-home-widget form a{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    padding:8px!important;
    border-radius:11px!important;
    font-size:12px!important;
    line-height:1.3!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }
  body.home .gsv-home-widget form a:nth-of-type(2){
    border-color:#0b6fc2;
    background:#0b6fc2;
    color:#fff;
  }

  /* Parent corner: reduce dead space and keep one clear action. */
  body.home .sv-home .sv-parent-corner{padding:28px 0!important}
  body.home .sv-home .sv-corner-head{margin-bottom:18px!important}
  body.home .sv-home .sv-corner-head h2{
    font-size:28px!important;
    line-height:1.18!important;
    margin-bottom:10px!important;
  }
  body.home .sv-home .sv-corner-head .sv-lead{
    font-size:14px!important;
    line-height:1.55!important;
    margin-bottom:10px!important;
  }
  body.home .sv-home .sv-corner-head>a{
    width:100%;
    min-height:44px;
    margin-top:8px!important;
  }

  /* Bottom CTA: compact and reserve enough page space. */
  body.home .sv-mobile-actions{
    z-index:1002;
    gap:8px!important;
    padding:8px 12px calc(8px + var(--gssv-home-safe-bottom))!important;
    box-shadow:0 -5px 18px rgba(23,63,102,.10);
  }
  body.home .sv-mobile-actions a{
    min-height:44px!important;
    padding:8px 6px!important;
    border-radius:10px!important;
    font-size:13px!important;
    line-height:1.25!important;
  }
  body.home .sv-mobile-actions svg{width:18px;height:18px;flex-basis:18px}
}

@media(max-width:359px){
  body.home .sv-home h1{font-size:28px!important}
  body.home .sv-home .sv-hero .sv-actions{grid-template-columns:1fr}
  body.home .gsv-home-widget{padding:14px}
  body.home .gsv-home-widget>img{top:12px;right:12px;width:52px!important;height:52px!important}
  body.home .gsv-home-widget h2,
  body.home .gsv-home-widget>div>p:first-child{max-width:calc(100% - 60px)}
  body.home .gsv-home-widget>div>p:not(:first-child){padding-right:56px}
  body.home .gsv-home-widget form{grid-template-columns:1fr!important}
}

/* Theme-owned Học & Thi block: reliable fallback even if the plugin home widget is unavailable. */
body.home .gsv-home-widget{display:none!important}
body.home .sv-home-study{padding:30px 0 34px;background:#fff}
body.home .sv-home-study-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) 150px;
  gap:24px;
  align-items:center;
  padding:26px 28px;
  border:1px solid #d7e5f0;
  border-radius:22px;
  background:linear-gradient(135deg,#eef6fd 0%,#fff 78%);
  box-shadow:0 10px 28px rgba(23,74,115,.07);
}
body.home .sv-home-study-copy{min-width:0}
body.home .sv-home-study .sv-eyebrow{margin-bottom:6px;color:#0b6fc2!important}
body.home .sv-home-study h2{margin:0 0 8px;font-size:30px;line-height:1.18;color:#173f66}
body.home .sv-home-study .sv-lead{margin-bottom:18px;font-size:14px;line-height:1.55;color:#526b7e}
body.home .sv-home-study-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body.home .sv-home-study-links a{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:90px;
  padding:13px 14px;
  border:1px solid #bfd3e4;
  border-radius:13px;
  background:#fff;
  color:#174a73;
  text-decoration:none;
  box-shadow:0 3px 0 #e6eef5;
}
body.home .sv-home-study-links a:hover{border-color:#0b6fc2;background:#f5f9fd}
body.home .sv-home-study-links a.is-featured{background:#0b6fc2;border-color:#0b6fc2;color:#fff;box-shadow:0 3px 0 #c6dceb}
body.home .sv-home-study-links strong{font-size:14px;line-height:1.3}
body.home .sv-home-study-links small{display:block;margin-top:6px;font-size:11px;line-height:1.4;color:#63788b}
body.home .sv-home-study-links a.is-featured small{color:#eaf4fb}
body.home .sv-home-study-mascot{display:flex;align-items:center;justify-content:center}
body.home .sv-home-study-mascot img{display:block;width:128px;height:128px;object-fit:contain}

@media(max-width:900px){
  body.home .sv-home-study-card{grid-template-columns:minmax(0,1fr) 110px}
  body.home .sv-home-study-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.home .sv-home-study-mascot img{width:96px;height:96px}
}

@media(max-width:575px){
  body.home .sv-home-study{padding:20px 0 24px}
  body.home .sv-home-study .sv-wrap{width:calc(100% - 28px)}
  body.home .sv-home-study-card{
    position:relative;
    display:block;
    padding:16px;
    border-radius:18px;
  }
  body.home .sv-home-study-copy{padding-right:58px}
  body.home .sv-home-study .sv-eyebrow{font-size:9px;margin-bottom:4px}
  body.home .sv-home-study h2{font-size:22px;line-height:1.18;margin-bottom:6px}
  body.home .sv-home-study .sv-lead{font-size:12.5px;line-height:1.45;margin-bottom:12px}
  body.home .sv-home-study-mascot{
    position:absolute;
    top:12px;
    right:12px;
    width:54px;
    height:54px;
  }
  body.home .sv-home-study-mascot img{width:54px;height:54px}
  body.home .sv-home-study-links{
    margin-right:-58px;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  body.home .sv-home-study-links a{
    min-height:72px;
    padding:10px;
    border-radius:11px;
  }
  body.home .sv-home-study-links strong{font-size:12px}
  body.home .sv-home-study-links small{font-size:10px;line-height:1.35;margin-top:4px}
}

@media(max-width:359px){
  body.home .sv-home-study-copy{padding-right:48px}
  body.home .sv-home-study-links{margin-right:-48px;grid-template-columns:1fr}
}

