/* ==========================================================================
   TopNews 24 (topnews-24.com) — crvs refresh
   Scoped overrides for the "elements-hash" theme. Theme CSS is NOT edited.

   Theme rules this file has to beat (all in public/style.css + css/responsive.css):
     style.css:226-333   .main_nav_box ul li  -> inline-block, icon background-images,
                         coloured border-top, a{margin-left:20px;padding:18px 37px 18px 54px}
     style.css:256-282   .main_nav_box ul li.nav_*:hover{background:#c66196 url(..) !important}
                         specificity (0,3,2) -> beaten below by li[class]:hover (0,4,2)
     style.css:294       .main_nav_box ul li.nav_news a::after -> stray 54px rule at left:-22px
     responsive.css:238  .container{width:320px} @<=767  -> 320px island on a 390-430px phone
     responsive.css:557  .main_nav_box{display:none} @<=767 -> theme hands off to #cssmenu,
                         which this template does not ship. Replaced by the burger below.
   The section menu uses a CSS-only toggle and does not clone the header,
   so the checkbox+label id "top24-nav-toggle" stays unique. No JS is relied on.
   ========================================================================== */


/* ============================================================== 1. MASTHEAD */

.header_area{position:relative;}
.header_logo_area .logo{margin-top:28px;}
/* logo.png is 356x275; the markup asked for 120x120 and squashed it */
.header_logo_area .logo img{width:120px;height:auto;}

/* Nav toggle: visually hidden but still focusable (never display:none). */
.top24-navcheck{position:absolute;top:0;left:0;width:1px;height:1px;
  margin:0;padding:0;border:0;opacity:0;pointer-events:none;}

/* Burger is mobile-only. Kill any label ::before/::after the theme or
   bootstrap might paint as a faux checkbox; our bars live on an inner span. */
.top24-burger{display:none;}
.top24-burger::before,.top24-burger::after{content:none!important;display:none!important;}


/* ========================================================= 2. SECTION NAV */
/* Desktop + tablet: one wrapping flex row, no horizontal scrolling.
   The theme's coloured border-top per li is the site's signature -> kept. */

.crvs-topnav .main_nav_box{display:block;}
.crvs-topnav .main_nav_box ul{display:flex;flex-wrap:wrap;margin:0;padding:0;list-style:none;}
.crvs-topnav .main_nav_box ul li{flex:1 1 auto;margin:0;padding:0;position:relative;}

/* [class] raises specificity over .main_nav_box ul li.nav_*{background:url(..)} */
.crvs-topnav .main_nav_box ul li[class]{background:transparent none!important;}
.crvs-topnav .main_nav_box ul li[class] a::before,
.crvs-topnav .main_nav_box ul li[class] a::after{content:none!important;}

.crvs-topnav .main_nav_box ul li a{display:block;margin:0;padding:16px 10px;
  border-right:1px solid #ececec;color:#3a3a3f;
  font:700 12px/1 Lato,Arial,sans-serif;letter-spacing:.1em;
  text-transform:uppercase;text-align:center;}
.crvs-topnav .main_nav_box ul li:first-child a{border-left:1px solid #ececec;}

.crvs-topnav .main_nav_box ul li[class]:hover{background:#1b1b1f none!important;}
.crvs-topnav .main_nav_box ul li:hover a{border-right-color:#1b1b1f;color:#fff;}
.crvs-topnav .main_nav_box ul li:first-child:hover a{border-left-color:#1b1b1f;}


/* ======================================================= 3. CATEGORY PAGE */

.top24-category{padding:42px 0 48px;background:#f7f7f7;}
.top24-category__head{display:flex;align-items:flex-end;justify-content:space-between;
  gap:16px;margin-bottom:22px;border-bottom:1px solid #ddd;}
.top24-category__head span{padding-bottom:11px;font-size:11px;font-weight:700;
  letter-spacing:.16em;text-transform:uppercase;color:#c66196;}
.top24-category__head h2{margin:0;padding:0 0 10px;font:700 28px/1.2 Lato,sans-serif;color:#222;}
.top24-category__lead{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);
  margin-bottom:28px;background:#fff;border-top:4px solid #c66196;}
.top24-category__lead>a{display:block;width:100%;height:380px;overflow:hidden;}
.top24-category__lead>a img{display:block;width:100%;height:100%;object-fit:cover;}
.top24-category__lead>div{display:flex;flex-direction:column;justify-content:center;padding:34px;}
.top24-category time{font-size:11px;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:#999;}
.top24-category__lead h3{margin:10px 0 12px;font-size:28px;line-height:1.25;}
.top24-category h3 a{color:#222;}
.top24-category__lead p{font-size:14px;line-height:1.65;color:#666;}
.top24-category__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;}
.top24-category__card{min-width:0;background:#fff;border-bottom:3px solid #b4bd00;}
.top24-category__card:nth-child(3n+2){border-color:#42a9f1;}
.top24-category__card:nth-child(3n+3){border-color:#f4655f;}
.top24-category__card>a,.top24-category__card img{display:block;width:100%;}
.top24-category__card img{height:165px;object-fit:cover;}
.top24-category__card>div{padding:16px 18px 20px;}
.top24-category__card h3{min-height:44px;margin:7px 0 8px;font-size:16px;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.top24-category__card p{margin:0;font-size:12px;line-height:1.55;color:#777;}


/* ================================================================ 4. FOOTER */

.top24-footer{background:#17171a;color:#b9b9c0;}

/* --- story rail (coloured left borders: this site's signature) --- */
.top24-footer__rail{padding:34px 0;background:#202024;}
.top24-footer__rail-head{display:flex;align-items:center;justify-content:space-between;
  gap:14px;margin-bottom:16px;}
.top24-footer__rail-head strong{font-size:12px;letter-spacing:.18em;
  text-transform:uppercase;color:#fff;}
.top24-footer__rail-head a{flex:0 0 auto;color:#c66196;font-size:12px;}
.top24-footer__stories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 24px;}
.top24-footer__story{display:block;min-width:0;padding:2px 0 2px 14px;
  border-left:3px solid #c66196;color:#fff;}
.top24-footer__story:nth-child(2){border-left-color:#b4bd00;}
.top24-footer__story:nth-child(3){border-left-color:#42a9f1;}
.top24-footer__story:nth-child(4){border-left-color:#f4655f;}
.top24-footer__story:hover{color:#c66196;text-decoration:none;}
.top24-footer__story time{display:block;margin-bottom:7px;color:#999;font-size:10px;
  letter-spacing:.1em;text-transform:uppercase;}
.top24-footer__story span{display:-webkit-box;overflow:hidden;font-size:13px;line-height:1.45;
  -webkit-line-clamp:2;-webkit-box-orient:vertical;}

/* --- base row: explicit areas so no child is ever auto-placed into a hole --- */
.top24-footer__base{padding:30px 0 20px;}
.top24-footer__base-inner{display:grid;align-items:center;gap:26px 28px;
  grid-template-columns:90px minmax(180px,1.2fr) minmax(240px,1.3fr);
  grid-template-areas:"logo tag topics";}
.top24-footer__logo{grid-area:logo;display:block;}
.top24-footer__logo img{display:block;width:72px;height:auto;}
.top24-footer__base p{grid-area:tag;margin:0;font-size:12px;line-height:1.6;color:#9d9da5;}
.top24-footer__topics{grid-area:topics;display:flex;flex-wrap:wrap;gap:10px 18px;}
.top24-footer__topics a{color:#fff;font-size:11px;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;}
.top24-footer__topics a:hover{color:#c66196;text-decoration:none;}
.top24-footer__social{grid-area:social;display:flex;gap:8px;}
.top24-footer__social a{display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:50%;
  /* a #3d3d43 hairline on the #17171a footer sits at ~1.6:1 and reads as a smudge.
     Raised disc + a ~3.2:1 ring so the button has an actual resting shape. */
  background:#26262c;border:1px solid #6b6570;color:#f0f0f4;font-size:15px;line-height:1;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease;}
.top24-footer__social a:hover{background:#c66196;border-color:#c66196;color:#fff;
  text-decoration:none;}
.top24-footer__copy{margin-top:22px;padding-top:17px;border-top:1px solid #2e2e33;
  font-size:11px;color:#787880;}


/* ====================================================== 5. TABLET 768-991 */

@media only screen and (min-width:768px) and (max-width:991px){
  /* 6 uppercase items still fit one row inside the theme's 750px container */
  .crvs-topnav .main_nav_box ul li a{padding:14px 6px;font-size:11px;letter-spacing:.06em;}

  .top24-category__grid{grid-template-columns:repeat(2,minmax(0,1fr));}

  .top24-footer__stories{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;}
  .top24-footer__base-inner{gap:22px 22px;
    grid-template-columns:72px minmax(0,1fr);
    grid-template-areas:
      "logo tag"
      "topics topics";}
}


/* ==================================================== 6. MOBILE <=767 */

@media only screen and (max-width:767px){

  /* The theme pins .container to a fixed 320px, which leaves a narrow island
     inside the full-bleed masthead and footer bands on a 390-430px phone.
     Make the bands this site owns fluid. width:auto keeps them overflow-safe;
     16px padding still clears bootstrap's -15px .row margin. */
  .header_logo_area .container,
  .main_news_wrapper > .container,
  .top24-footer .container{width:auto;max-width:100%;padding-left:16px;padding-right:16px;}
  .crvs-topnav .container{width:auto;max-width:100%;padding-left:0;padding-right:0;}

  /* ---------------- masthead: small logo left, burger right ---------------- */
  .header_logo_area{padding:14px 0;}
  .top24-masthead{float:none;display:flex;align-items:center;justify-content:space-between;gap:12px;}
  .header_logo_area .logo{margin:0;text-align:left;}
  .header_logo_area .logo img{width:84px;}

  .top24-burger{display:inline-flex;align-items:center;gap:9px;
    flex:0 0 auto;margin:0;padding:9px 12px;
    border:1px solid #dcdce1;background:#fff;cursor:pointer;
    font:700 10px/1 Lato,Arial,sans-serif;letter-spacing:.16em;
    text-transform:uppercase;color:#3a3a3f;
    -webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;}
  .top24-burger__bars{position:relative;display:block;width:17px;height:2px;background:#1b1b1f;}
  .top24-burger__bars::before,.top24-burger__bars::after{content:"";position:absolute;left:0;
    width:17px;height:2px;background:#1b1b1f;}
  .top24-burger__bars::before{top:-5px;}
  .top24-burger__bars::after{top:5px;}

  /* open state -> burger becomes a filled X chip */
  .top24-navcheck:checked ~ .header_logo_area .top24-burger{
    background:#1b1b1f;border-color:#1b1b1f;color:#fff;}
  .top24-navcheck:checked ~ .header_logo_area .top24-burger__bars{background:transparent;}
  .top24-navcheck:checked ~ .header_logo_area .top24-burger__bars::before{
    top:0;background:#fff;transform:rotate(45deg);}
  .top24-navcheck:checked ~ .header_logo_area .top24-burger__bars::after{
    top:0;background:#fff;transform:rotate(-45deg);}

  /* ---------------- section nav: full-bleed dropdown list ---------------- */
  .crvs-topnav{box-shadow:none;border-top:1px solid #e8e8ed;}
  .crvs-topnav .main_nav_box{display:none;}
  /* (0,4,0) beats both .crvs-topnav .main_nav_box and responsive.css .main_nav_box */
  .top24-navcheck:checked ~ .mainnav .main_nav_box{display:block;}

  .crvs-topnav .main_nav_box ul{display:block;}
  .crvs-topnav .main_nav_box ul li[class]{display:block;flex:none;
    border-top:0;border-right:0;border-bottom:1px solid #ededf0;
    border-left:3px solid #c66196;}
  /* reuse the theme's own tab palette as the left accent (echoes the footer rail) */
  .crvs-topnav .main_nav_box ul li.nav_fashion{border-left-color:#b4bd00;}
  .crvs-topnav .main_nav_box ul li.nav_gadgets{border-left-color:#f4655f;}
  .crvs-topnav .main_nav_box ul li.nav_lifestyle{border-left-color:#56bae7;}
  .crvs-topnav .main_nav_box ul li.nav_video{border-left-color:#ffa431;}
  .crvs-topnav .main_nav_box ul li.nav_features{border-left-color:#5b4282;}

  /* >=44px tap target */
  .crvs-topnav .main_nav_box ul li a{padding:15px 15px;border:0;
    font-size:12px;letter-spacing:.12em;text-align:left;}
  .crvs-topnav .main_nav_box ul li[class]:hover{background:#f6f6f8 none!important;}
  .crvs-topnav .main_nav_box ul li:hover a{color:#c66196;}

  /* ---------------- category ---------------- */
  .top24-category{padding-top:28px;}
  .top24-category__head{flex-wrap:wrap;gap:0 12px;}
  .top24-category__lead{grid-template-columns:minmax(0,1fr);}
  .top24-category__lead>a{height:220px;}
  .top24-category__lead>div{padding:22px;}
  .top24-category__lead h3{font-size:22px;}
  .top24-category__grid{grid-template-columns:minmax(0,1fr);}

  /* ---------------- footer ---------------- */
  .top24-footer__rail{padding:26px 0 8px;}
  .top24-footer__rail-head{margin-bottom:10px;}
  /* stay a grid so the <a> children keep block layout; one column, hairline rules */
  .top24-footer__stories{grid-template-columns:minmax(0,1fr);gap:0;}
  .top24-footer__story{padding:12px 0 12px 13px;}
  .top24-footer__story + .top24-footer__story{border-top:1px solid #303038;}
  .top24-footer__story span{-webkit-line-clamp:3;}

  /* one column, everything flush left, nothing auto-placed */
  .top24-footer__base{padding:24px 0 18px;}
  .top24-footer__base-inner{grid-template-columns:minmax(0,1fr);
    grid-template-areas:"logo" "tag" "topics";
    gap:15px;align-items:start;justify-items:start;}
  .top24-footer__logo img{width:62px;}
  .top24-footer__base p{max-width:36em;font-size:12.5px;line-height:1.65;}
  .top24-footer__topics{gap:9px 16px;}
  .top24-footer__social{gap:9px;}
  .top24-footer__social a{width:34px;height:34px;}
  .top24-footer__copy{margin-top:18px;padding-top:14px;line-height:1.5;}
}
