/*
Theme Name: Travet.dk Newspaper Magazine
Theme URI: https://travet.dk/
Description: Sitewide Newspaper child theme med Travet.dk magazine-layout og faste annoncekolonner.
Author: Travet.dk
Version: 1.4.2
Template: Newspaper
Text Domain: travet-magazine
*/

:root{
  --tm-red:#d71920;
  --tm-dark:#111318;
  --tm-text:#1f2328;
  --tm-line:#d9dde1;
  --tm-bg:#ffffff;
  --tm-rail:300px;
  --tm-center:680px;
  --tm-gap:20px;
  --tm-max:1360px;
}
*{box-sizing:border-box}
body{margin:0;background:#fff;color:var(--tm-text);font-family:Arial,Helvetica,sans-serif}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}

/* Header */
.tm-topbar{background:var(--tm-dark);color:#fff;font-size:12px}
.tm-topbar__inner,.tm-header__inner,.tm-nav__inner,.tm-breaking__inner{
  max-width:var(--tm-max);margin:0 auto;padding-left:20px;padding-right:20px
}
.tm-topbar__inner{height:30px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.tm-topbar a{color:#fff;opacity:.9;margin-left:16px}
.tm-header{background:#fff}
.tm-header__inner{min-height:120px;display:flex;align-items:center;justify-content:space-between;gap:30px}
.tm-logo{font-size:48px;font-weight:900;letter-spacing:-2px;color:#111}
.tm-logo span{color:var(--tm-red)}
.tm-logo img{max-height:82px;width:auto}
.tm-tagline{text-align:right;font-weight:700;font-size:14px;line-height:1.5}
.tm-tagline small{display:block;color:#7b8087;font-weight:400}
.tm-a1{width:min(970px,calc(100% - 30px));margin:0 auto 16px}
.tm-nav{background:var(--tm-dark);border-bottom:1px solid #2a2d31}
.tm-nav__inner{display:flex;align-items:center;min-height:48px}
.tm-nav .menu{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0}
.tm-nav .menu>li>a{display:block;color:#fff;padding:16px 14px;font-size:13px;font-weight:800;text-transform:uppercase}
.tm-nav .current-menu-item>a,.tm-nav .menu>li>a:hover{background:var(--tm-red)}
.tm-breaking{border-bottom:1px solid var(--tm-line);background:#fff}
.tm-breaking__inner{min-height:38px;display:flex;align-items:center;overflow:hidden}
.tm-breaking__label{background:var(--tm-red);color:#fff;font-size:11px;font-weight:800;padding:7px 12px;margin-right:16px;white-space:nowrap}
.tm-breaking__items{display:flex;gap:24px;white-space:nowrap;overflow:hidden;font-size:12px;font-weight:700}
.tm-breaking__time{color:var(--tm-red);margin-right:6px}

/* Sitewide shell */
.tm-shell{max-width:var(--tm-max);margin:20px auto 0;padding:0 20px;display:grid;grid-template-columns:var(--tm-rail) minmax(0,var(--tm-center)) var(--tm-rail);gap:var(--tm-gap);align-items:start}
.tm-rail{display:flex;flex-direction:column;gap:18px}
.tm-center{min-width:0}
.tm-ad{width:100%;overflow:hidden;background:#fff;border:1px solid #ddd;text-align:center}
.tm-ad img{display:block;width:100%;height:auto;object-fit:contain}
.tm-ad--250{min-height:250px}
.tm-ad--600{min-height:600px;display:flex;align-items:center}
.tm-ad--600 img{max-height:600px}
.tm-ad--wide{min-height:90px}
.tm-ad-placeholder{min-height:inherit;background:#f2f3f4;color:#333;display:flex;align-items:center;justify-content:center;font-weight:800;line-height:1.4;padding:12px}
.tm-a9{width:min(970px,calc(100% - 30px));margin:26px auto}

/* Home */
.tm-hero{border:1px solid var(--tm-line);background:#fff;margin-bottom:14px}
.tm-hero__image{aspect-ratio:16/8.6;background:#dfe2e5;overflow:hidden}
.tm-hero__image img{width:100%;height:100%;object-fit:cover}
.tm-hero__body{padding:16px 18px 18px}
.tm-kicker{color:var(--tm-red);font-size:11px;font-weight:900;text-transform:uppercase;margin-bottom:6px}
.tm-hero h1{font-size:31px;line-height:1.04;margin:0 0 8px;font-weight:900}
.tm-summary{color:#6b7076;font-size:14px;line-height:1.5}
.tm-two{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:22px}
.tm-card{border:1px solid var(--tm-line);background:#fff}
.tm-card__image{aspect-ratio:16/8.6;background:#dfe2e5;overflow:hidden}
.tm-card__image img{width:100%;height:100%;object-fit:cover}
.tm-card__body{padding:11px 12px 14px}
.tm-card h3{font-size:16px;line-height:1.25;margin:4px 0 0;font-weight:800}
.tm-section{margin:24px 0}
.tm-section__title{font-size:21px;font-weight:900;text-transform:uppercase;border-bottom:3px solid #16181b;margin:0 0 12px;padding-bottom:8px;position:relative}
.tm-section__title:after{content:"";position:absolute;left:0;bottom:-3px;width:48px;height:3px;background:var(--tm-red)}
.tm-latest{list-style:none;margin:0;padding:0;border-top:1px solid var(--tm-line)}
.tm-latest li{display:flex;align-items:flex-start;gap:12px;border-bottom:1px solid var(--tm-line);padding:9px 0;font-size:14px;font-weight:700}
.tm-latest time{color:var(--tm-red);font-size:12px;min-width:44px}
.tm-section-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tm-content-ad{margin:20px 0}

/* Article/page/archive */
.tm-content-box{background:#fff}
.tm-entry-header{border-bottom:1px solid var(--tm-line);padding-bottom:14px;margin-bottom:18px}
.tm-entry-title{font-size:38px;line-height:1.08;margin:6px 0 10px;font-weight:900}
.tm-entry-meta{font-size:12px;color:#777}
.tm-featured{margin:0 0 18px}
.tm-featured img{width:100%;display:block}
.tm-entry-content{font-family:Georgia,"Times New Roman",serif;font-size:18px;line-height:1.72}
.tm-entry-content p{margin:0 0 1.2em}
.tm-entry-content h2,.tm-entry-content h3{font-family:Arial,Helvetica,sans-serif}
.tm-archive-title{font-size:28px;font-weight:900;text-transform:uppercase;border-bottom:3px solid #111;padding-bottom:10px;margin:0 0 18px}
.tm-list-card{display:grid;grid-template-columns:220px 1fr;gap:16px;padding:0 0 18px;margin-bottom:18px;border-bottom:1px solid var(--tm-line)}
.tm-list-card__image{aspect-ratio:16/10;background:#eee;overflow:hidden}
.tm-list-card__image img{width:100%;height:100%;object-fit:cover}
.tm-list-card h2{font-size:22px;line-height:1.18;margin:4px 0 8px}
.tm-pagination{margin:28px 0}
.tm-pagination .page-numbers{display:inline-block;padding:7px 10px;border:1px solid #ddd;margin-right:4px}
.tm-pagination .current{background:var(--tm-red);color:#fff;border-color:var(--tm-red)}

/* Footer */
.tm-footer{background:var(--tm-dark);color:#fff;margin-top:30px}
.tm-footer__inner{max-width:var(--tm-max);margin:0 auto;padding:36px 20px;display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px}
.tm-footer h3{margin:0 0 10px}
.tm-footer p,.tm-footer a{color:#c6c9cd;font-size:13px;line-height:1.7}

/* Mobile/tablet */
.tm-mobile-ad{display:none}
@media(max-width:1319px){
  .tm-shell{display:block;max-width:1080px}
  .tm-rail{display:none}
}
@media(max-width:767px){
  .tm-topbar__inner{height:auto;padding-top:7px;padding-bottom:7px}
  .tm-topbar__right{display:none}
  .tm-header__inner{min-height:88px}
  .tm-logo{font-size:36px}
  .tm-tagline{display:none}
  .tm-a1,.tm-a9{display:none}
  .tm-nav__inner{padding:0}
  .tm-nav .menu{overflow-x:auto;flex-wrap:nowrap}
  .tm-nav .menu>li>a{white-space:nowrap;padding:14px 11px;font-size:12px}
  .tm-breaking__inner{padding-left:0;padding-right:0}
  .tm-breaking__items{gap:16px}
  .tm-shell{margin-top:14px;padding:0 12px;width:100%}
  .tm-mobile-ad{display:block;max-width:320px;margin:14px auto}
  .tm-two,.tm-section-grid{grid-template-columns:1fr}
  .tm-hero h1{font-size:26px}
  .tm-entry-title{font-size:31px}
  .tm-entry-content{font-size:17px}
  .tm-list-card{grid-template-columns:120px 1fr;gap:12px}
  .tm-list-card h2{font-size:18px}
  .tm-footer__inner{grid-template-columns:1fr;gap:18px}
}


/* ===== 1.2.1: rigtig højre sidebar ===== */
.tm-sidebox{
    border:1px solid var(--tm-line);
    background:#fff;
    width:100%;
}
.tm-sidebox__title{
    margin:0;
    background:var(--tm-dark);
    color:#fff;
    padding:10px 12px;
    font-size:13px;
    line-height:1.2;
    font-weight:900;
    text-transform:uppercase;
    border-left:4px solid var(--tm-red);
}
.tm-sidebox__content{
    padding:12px;
}
.tm-sidebox__content .widget{
    margin:0 !important;
}
.tm-sidebox__content img,
.tm-sidebox__content iframe{
    max-width:100%;
    height:auto;
}
.tm-sidebox__empty{
    color:#777;
    font-size:12px;
    line-height:1.5;
}

/* Menuen styres nu af WordPress-menuplaceringen "Travet hovedmenu". */
.tm-nav .menu{
    width:100%;
}
.tm-nav .menu-item-has-children{
    position:relative;
}
.tm-nav .sub-menu{
    display:none;
    position:absolute;
    left:0;
    top:100%;
    min-width:210px;
    list-style:none;
    margin:0;
    padding:0;
    background:var(--tm-dark);
    z-index:9999;
}
.tm-nav .menu-item-has-children:hover>.sub-menu{
    display:block;
}
.tm-nav .sub-menu a{
    display:block;
    color:#fff;
    padding:11px 13px;
    font-size:12px;
    font-weight:700;
    border-top:1px solid #2d3136;
}
.tm-nav .sub-menu a:hover{
    background:var(--tm-red);
}


/* 1.2.3 – Travet sidebar-wrappers */
.tm-sidebox__content .travet-home-sales-sidebar-server,
.tm-sidebox__content .travet-sidebar-calendar,
.tm-sidebox__content .travet-facebook{
    margin:0 !important;
    width:100% !important;
}
.tm-sidebox__content .travet-home-sales-title{
    display:none !important; /* sidebox har allerede titel */
}
.tm-sidebox__content .travet-home-sales-list{
    width:100%;
}
.tm-sidebox__content .travet-home-sales-item{
    display:flex;
    gap:10px;
    padding:9px 0;
    border-bottom:1px solid #e6e8ea;
}
.tm-sidebox__content .travet-home-sales-image{
    width:72px;
    min-width:72px;
}
.tm-sidebox__content .travet-home-sales-image img{
    width:72px;
    height:54px;
    object-fit:cover;
}


/* 1.2.5 – sidekolonner synlige på normale desktops */
@media(min-width:1320px){
  .tm-shell{
    width:100%;
    max-width:1360px;
    grid-template-columns:300px minmax(0,680px) 300px;
    column-gap:20px;
    padding-left:20px;
    padding-right:20px;
  }
  .tm-rail{
    display:flex !important;
    width:300px;
  }
  .tm-center{
    width:680px;
    max-width:680px;
  }
}

/* Hvis viewport kun lige akkurat kan rumme layoutet, fjernes ydre padding. */
@media(min-width:1320px) and (max-width:1359px){
  .tm-shell{
    max-width:1320px;
    padding-left:0;
    padding-right:0;
  }
}


/* ===== 1.2.6: bredt 25 / 50 / 25 desktop-layout ===== */
@media(min-width:1320px){
  .tm-shell{
    width:calc(100% - 40px) !important;
    max-width:1680px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding-left:0 !important;
    padding-right:0 !important;
    display:grid !important;
    grid-template-columns:minmax(250px,1fr) minmax(600px,2fr) minmax(250px,1fr) !important;
    gap:24px !important;
    align-items:start !important;
  }

  .tm-center{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }

  .tm-rail{
    display:flex !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    gap:24px !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .tm-ad img,
  .tm-sidebox img,
  .tm-sidebox iframe,
  .tm-sidebox ins{
    max-width:100% !important;
  }

  /* Sideannoncer må ikke tvinge kolonnen til 300 px. */
  .tm-ad--250,
  .tm-ad--600{
    min-height:0 !important;
  }

  .tm-ad--250 img{
    width:100% !important;
    height:auto !important;
    max-height:320px !important;
    object-fit:contain !important;
  }

  .tm-ad--600 img{
    width:100% !important;
    height:auto !important;
    max-height:650px !important;
    object-fit:contain !important;
  }

  /* Højre sidebar: hold alle plugin-elementer inde i boksen. */
  .tm-sidebox__content{
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .tm-sidebox__content > *,
  .tm-sidebox__content .widget,
  .tm-sidebox__content .travet-home-sales-sidebar-server,
  .tm-sidebox__content .travet-sidebar-calendar,
  .tm-sidebox__content .travet-facebook,
  .tm-sidebox__content .travet-calendar,
  .tm-sidebox__content .cff-wrapper{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .tm-sidebox__content table{
    width:100% !important;
    max-width:100% !important;
    table-layout:fixed !important;
  }

  .tm-sidebox__content img{
    height:auto !important;
  }
}

/* 1920 px skærm: udnyt mere af den disponible plads. */
@media(min-width:1700px){
  .tm-shell{
    max-width:1760px !important;
  }
}

/* På mindre desktops bevares tre kolonner, men med lidt mindre luft. */
@media(min-width:1320px) and (max-width:1499px){
  .tm-shell{
    width:calc(100% - 20px) !important;
    gap:14px !important;
    grid-template-columns:minmax(240px,1fr) minmax(600px,2fr) minmax(240px,1fr) !important;
  }
}


/* ===== 1.2.7: fjern "kassen" – brug hele desktopbredden ===== */
@media(min-width:1320px){
  html,
  body{
    width:100%;
    max-width:none;
    overflow-x:hidden;
  }

  .tm-shell{
    width:100% !important;
    max-width:none !important;
    margin:20px 0 0 !important;
    padding:0 24px !important;
    display:grid !important;
    grid-template-columns:
      minmax(260px, 1fr)
      minmax(620px, 2fr)
      minmax(260px, 1fr) !important;
    gap:24px !important;
    align-items:start !important;
  }

  .tm-center,
  .tm-rail{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
  }

  /* Midterområdet må ikke få en ekstra boxed effekt. */
  .tm-center{
    background:transparent !important;
    box-shadow:none !important;
    border:0 !important;
    padding:0 !important;
  }

  /* Hovedkortene beholder deres egne normale kanter,
     men hele centerkolonnen er ikke længere en stor kasse. */
  .tm-content-box{
    width:100%;
    max-width:none;
    margin:0;
  }

  .tm-front,
  .tm-hero,
  .tm-section,
  .tm-two,
  .tm-section-grid{
    max-width:none !important;
    width:100% !important;
  }

  /* Headerens indhold må også bruge mere af skærmen. */
  .tm-topbar__inner,
  .tm-header__inner,
  .tm-nav__inner,
  .tm-breaking__inner{
    width:100% !important;
    max-width:none !important;
    padding-left:24px !important;
    padding-right:24px !important;
  }

  /* Top- og bundbanner er stadig centrerede, men resten af siden er full width. */
  .tm-a1,
  .tm-a9{
    max-width:970px;
  }
}

/* På meget brede skærme skal midten stadig være ca. dobbelt så bred
   som hver sidekolonne – ikke låses til en fast px-bredde. */
@media(min-width:1900px){
  .tm-shell{
    padding-left:32px !important;
    padding-right:32px !important;
    gap:28px !important;
  }
}


/* ===== 1.2.8: bred hovedside, smalle annonce-rails ===== */

/* Fjern grå Newspaper-baggrund omkring vores egne templates. */
html,
body,
body.travet-adrails-active,
body[class*="travet"]{
  background:#fff !important;
}

/* 1600 px+:
   260 px annonce | 920-1100 px website | 260 px annonce */
@media(min-width:1600px){
  .tm-shell{
    width:calc(100% - 32px) !important;
    max-width:1700px !important;
    margin:20px auto 0 !important;
    padding:0 !important;
    display:grid !important;
    grid-template-columns:260px minmax(920px,1100px) 260px !important;
    justify-content:center !important;
    gap:20px !important;
    align-items:start !important;
    background:#fff !important;
  }

  .tm-center{
    width:100% !important;
    max-width:1100px !important;
    min-width:920px !important;
    background:#fff !important;
    margin:0 !important;
  }

  .tm-rail{
    width:260px !important;
    max-width:260px !important;
    min-width:260px !important;
    display:flex !important;
    gap:20px !important;
    background:#fff !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:260px !important;
    max-width:260px !important;
    min-width:0 !important;
    background:#fff !important;
  }

  .tm-ad img,
  .tm-sidebox img,
  .tm-sidebox iframe,
  .tm-sidebox ins{
    max-width:100% !important;
    width:auto;
  }
}

/* 1400-1599 px:
   behold en bred hjemmeside og skjul sideannoncerne frem for at klemme den. */
@media(min-width:1400px) and (max-width:1599px){
  .tm-shell{
    display:block !important;
    width:calc(100% - 40px) !important;
    max-width:1180px !important;
    margin:20px auto 0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  .tm-center{
    width:100% !important;
    max-width:1180px !important;
    min-width:0 !important;
    margin:0 auto !important;
    background:#fff !important;
  }

  .tm-rail{
    display:none !important;
  }
}

/* 1320-1399 px: samme princip – hovedindhold først. */
@media(min-width:1320px) and (max-width:1399px){
  .tm-shell{
    display:block !important;
    width:calc(100% - 30px) !important;
    max-width:1100px !important;
    margin:20px auto 0 !important;
    padding:0 !important;
    background:#fff !important;
  }
  .tm-center{
    width:100% !important;
    max-width:1100px !important;
    min-width:0 !important;
    margin:0 auto !important;
    background:#fff !important;
  }
  .tm-rail{display:none !important;}
}

/* Sørg for at sektioner ikke arver faste Newspaper-bredder. */
.tm-center .tm-hero,
.tm-center .tm-two,
.tm-center .tm-section,
.tm-center .tm-section-grid,
.tm-center .tm-content-box,
.tm-center .tm-list-card{
  width:100% !important;
  max-width:none !important;
}

/* Højre sidebar indhold skalerer inden for 260 px. */
@media(min-width:1600px){
  .tm-sidebox__content{
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }
  .tm-sidebox__content > *,
  .tm-sidebox__content .widget,
  .tm-sidebox__content .travet-home-sales-sidebar-server,
  .tm-sidebox__content .travet-sidebar-calendar,
  .tm-sidebox__content .travet-facebook{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
}


/* ===== 1.2.9: sidekolonner også på normale desktop-viewports ===== */

/* 1380–1599 CSS-px:
   smalle reklamesider + bred hovedside */
@media(min-width:1380px) and (max-width:1599px){
  .tm-shell{
    display:grid !important;
    width:calc(100% - 24px) !important;
    max-width:none !important;
    margin:18px auto 0 !important;
    padding:0 !important;
    grid-template-columns:
      minmax(190px,220px)
      minmax(860px,1fr)
      minmax(190px,220px) !important;
    gap:16px !important;
    justify-content:center !important;
    align-items:start !important;
  }

  .tm-rail{
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    max-width:220px !important;
    gap:16px !important;
  }

  .tm-center{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:100% !important;
    min-width:0 !important;
    max-width:220px !important;
  }

  .tm-ad img,
  .tm-sidebox img,
  .tm-sidebox iframe,
  .tm-sidebox ins{
    max-width:100% !important;
    height:auto !important;
  }

  .tm-sidebox__content,
  .tm-sidebox__content > *,
  .tm-sidebox__content .widget,
  .tm-sidebox__content .travet-home-sales-sidebar-server,
  .tm-sidebox__content .travet-sidebar-calendar,
  .tm-sidebox__content .travet-facebook{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
}

/* 1600+:
   lidt større rails, men centerkolonnen får resten af pladsen */
@media(min-width:1600px){
  .tm-shell{
    display:grid !important;
    width:calc(100% - 32px) !important;
    max-width:1780px !important;
    margin:20px auto 0 !important;
    padding:0 !important;
    grid-template-columns:
      minmax(220px,260px)
      minmax(960px,1fr)
      minmax(220px,260px) !important;
    gap:20px !important;
    justify-content:center !important;
  }

  .tm-center{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
  }

  .tm-rail{
    display:flex !important;
    width:100% !important;
    max-width:260px !important;
    min-width:0 !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:100% !important;
    max-width:260px !important;
    min-width:0 !important;
  }
}

/* Kun på reelt mindre skærme skjules sidekolonnerne. */
@media(max-width:1379px){
  .tm-shell{
    display:block !important;
    width:calc(100% - 24px) !important;
    max-width:1120px !important;
    margin:18px auto 0 !important;
  }
  .tm-rail{
    display:none !important;
  }
  .tm-center{
    width:100% !important;
    max-width:1120px !important;
    min-width:0 !important;
    margin:0 auto !important;
  }
}


/* ===== 1.3.0: frigør temaet helt fra Newspaper boxed layout ===== */

/* Newspaper kan sætte boxed/max-width på body eller ydre wrappers.
   Magazine-temaet skal altid bruge browserens fulde viewport. */
html{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  background:#fff !important;
}
body,
body.td-boxed-layout,
body.td-full-layout,
body[class*="td-"]{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  left:auto !important;
  right:auto !important;
  background:#fff !important;
}

/* Kendte Newspaper outer wrappers må ikke indsnævre vores templates. */
#td-outer-wrap,
.td-theme-wrap,
.td-main-content-wrap,
.td-container-wrap,
.tdc-header-wrap,
.tdc-content-wrap,
.tdc-footer-wrap,
.tdc-zone,
.tdc_zone{
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* Vores egne topområder bruger hele viewporten. */
.tm-topbar,
.tm-header,
.tm-nav,
.tm-breaking,
.tm-footer{
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

.tm-topbar__inner,
.tm-header__inner,
.tm-nav__inner,
.tm-breaking__inner{
  width:calc(100% - 48px) !important;
  max-width:none !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* Desktop: website i midten skal være mindst ca. 900 px.
   Rails får resten, men aldrig på bekostning af hovedsiden. */
@media(min-width:1480px){
  .tm-shell{
    display:grid !important;
    width:calc(100vw - 40px) !important;
    max-width:none !important;
    margin:20px 20px 0 !important;
    padding:0 !important;
    grid-template-columns:
      minmax(190px, 260px)
      minmax(900px, 1fr)
      minmax(190px, 260px) !important;
    gap:20px !important;
    align-items:start !important;
    justify-content:stretch !important;
    background:#fff !important;
  }

  .tm-center{
    width:100% !important;
    min-width:900px !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  .tm-rail{
    display:flex !important;
    width:100% !important;
    max-width:260px !important;
    min-width:0 !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:100% !important;
    max-width:260px !important;
  }
}

/* Lidt smallere desktop: rails mindre, midten stadig bred. */
@media(min-width:1280px) and (max-width:1479px){
  .tm-shell{
    display:grid !important;
    width:calc(100vw - 24px) !important;
    max-width:none !important;
    margin:18px 12px 0 !important;
    padding:0 !important;
    grid-template-columns:
      minmax(150px, 190px)
      minmax(850px, 1fr)
      minmax(150px, 190px) !important;
    gap:14px !important;
    align-items:start !important;
  }

  .tm-center{
    width:100% !important;
    min-width:850px !important;
    max-width:none !important;
  }

  .tm-rail{
    display:flex !important;
    width:100% !important;
    max-width:190px !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:100% !important;
    max-width:190px !important;
  }
}

/* Under 1280 px prioriterer vi indholdet og skjuler rails. */
@media(max-width:1279px){
  .tm-shell{
    display:block !important;
    width:calc(100vw - 24px) !important;
    max-width:1120px !important;
    margin:18px auto 0 !important;
    padding:0 !important;
  }
  .tm-rail{
    display:none !important;
  }
  .tm-center{
    width:100% !important;
    max-width:1120px !important;
    min-width:0 !important;
    margin:0 auto !important;
  }
}


/* ===== 1.3.1: faste 300 px sidekolonner ===== */
@media(min-width:1560px){
  .tm-shell{
    width:calc(100vw - 40px) !important;
    max-width:none !important;
    margin:20px 20px 0 !important;
    padding:0 !important;
    display:grid !important;
    grid-template-columns:300px minmax(900px,1fr) 300px !important;
    gap:20px !important;
    align-items:start !important;
  }

  .tm-rail{
    display:flex !important;
    width:300px !important;
    max-width:300px !important;
    min-width:300px !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:300px !important;
    max-width:300px !important;
    min-width:0 !important;
  }

  .tm-center{
    width:100% !important;
    min-width:900px !important;
    max-width:none !important;
  }
}

/* 1380-1559 px: behold bred hovedside; skjul rails fremfor at klemme. */
@media(min-width:1380px) and (max-width:1559px){
  .tm-shell{
    display:block !important;
    width:calc(100vw - 32px) !important;
    max-width:1180px !important;
    margin:18px auto 0 !important;
    padding:0 !important;
  }
  .tm-rail{
    display:none !important;
  }
  .tm-center{
    width:100% !important;
    max-width:1180px !important;
    min-width:0 !important;
    margin:0 auto !important;
  }
}

/* Højre sidebar skal holde sig indenfor 300 px. */
@media(min-width:1560px){
  .tm-sidebox__content,
  .tm-sidebox__content > *,
  .tm-sidebox__content .widget,
  .tm-sidebox__content .travet-home-sales-sidebar-server,
  .tm-sidebox__content .travet-sidebar-calendar,
  .tm-sidebox__content .travet-facebook{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
}


/* ===== 1.3.2: 300 px rails synlige på almindelig desktop ===== */

/* Fra 1360 px bruger vi altid tre kolonner.
   300 + 20 + resten + 20 + 300. */
@media(min-width:1360px){
  .tm-shell{
    display:grid !important;
    width:calc(100vw - 24px) !important;
    max-width:none !important;
    margin:18px 12px 0 !important;
    padding:0 !important;
    grid-template-columns:300px minmax(0,1fr) 300px !important;
    gap:20px !important;
    align-items:start !important;
    justify-content:stretch !important;
    background:#fff !important;
  }

  .tm-rail{
    display:flex !important;
    flex-direction:column !important;
    width:300px !important;
    min-width:300px !important;
    max-width:300px !important;
    gap:20px !important;
  }

  .tm-center{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
  }

  .tm-ad,
  .tm-sidebox{
    width:300px !important;
    min-width:300px !important;
    max-width:300px !important;
  }

  .tm-sidebox__content{
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .tm-sidebox__content > *,
  .tm-sidebox__content .widget,
  .tm-sidebox__content .travet-home-sales-sidebar-server,
  .tm-sidebox__content .travet-sidebar-calendar,
  .tm-sidebox__content .travet-facebook{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .tm-ad img,
  .tm-sidebox img,
  .tm-sidebox iframe,
  .tm-sidebox ins{
    max-width:100% !important;
    height:auto !important;
  }
}

/* Under 1360 px går vi tilbage til én kolonne for ikke at skabe vandret scroll. */
@media(max-width:1359px){
  .tm-shell{
    display:block !important;
    width:calc(100vw - 24px) !important;
    max-width:1120px !important;
    margin:18px auto 0 !important;
    padding:0 !important;
  }

  .tm-rail{
    display:none !important;
  }

  .tm-center{
    width:100% !important;
    min-width:0 !important;
    max-width:1120px !important;
    margin:0 auto !important;
  }
}


/* ===== 1.4.0: 300 px reklamesider + rene sidebar-overskrifter ===== */
@media(min-width:1360px){
  .tm-rail{
    width:300px !important;
    min-width:300px !important;
    max-width:300px !important;
  }
  .tm-shell{
    grid-template-columns:300px minmax(0,1fr) 300px !important;
  }
  .tm-ad--rail,
  .tm-sidebox{
    width:300px !important;
    min-width:300px !important;
    max-width:300px !important;
  }
  .tm-ad--rail img{
    width:100% !important;
    height:auto !important;
    object-fit:contain !important;
  }
}

/* Den ydre tm-sidebox har allerede den ønskede overskrift.
   Skjul pluginernes egne dublerede overskrifter inde i boksen. */
.tm-sidebox__content .travet-home-sales-title,
.tm-sidebox__content .travet-section-heading,
.tm-sidebox__content .travet-section-heading__bar,
.tm-sidebox__content .travet-sidebar-title,
.tm-sidebox__content .cff-header,
.tm-sidebox__content .cff-header-text,
.tm-sidebox__content h1:first-child,
.tm-sidebox__content h2:first-child,
.tm-sidebox__content h3:first-child{
  display:none !important;
}

/* Undgå ekstra topafstand efter skjult intern overskrift. */
.tm-sidebox__content > *:first-child,
.tm-sidebox__content .travet-home-sales-sidebar-server,
.tm-sidebox__content .travet-sidebar-calendar,
.tm-sidebox__content .travet-facebook{
  margin-top:0 !important;
  padding-top:0 !important;
}


/* ===== 1.4.2: kun én overskrift i højre sidebar ===== */

/* Den sorte .tm-sidebox__title er den eneste overskrift, vi vil vise.
   Skjul alle interne sektionsoverskrifter fra Travet Layout / Facebook-feed. */
.tm-sidebox__content > h1,
.tm-sidebox__content > h2,
.tm-sidebox__content > h3,
.tm-sidebox__content > h4,
.tm-sidebox__content > h5,
.tm-sidebox__content > h6,
.tm-sidebox__content .travet-home-sales-title,
.tm-sidebox__content .travet-section-heading,
.tm-sidebox__content .travet-section-heading__bar,
.tm-sidebox__content .travet-sidebar-title,
.tm-sidebox__content .travet-widget-title,
.tm-sidebox__content .widget-title,
.tm-sidebox__content .block-title,
.tm-sidebox__content .td-block-title-wrap,
.tm-sidebox__content .td-block-title,
.tm-sidebox__content .cff-header,
.tm-sidebox__content .cff-header-text,
.tm-sidebox__content .cff-header-name,
.tm-sidebox__content .sb-item-header,
.tm-sidebox__content .sb-feed-header {
    display:none !important;
}

/* Nogle Travet-moduler lægger overskriften i første wrapper.
   Skjul kun heading-elementer dér – ikke produkt-/posttitler. */
.tm-sidebox__content > div:first-child > h1:first-child,
.tm-sidebox__content > div:first-child > h2:first-child,
.tm-sidebox__content > div:first-child > h3:first-child,
.tm-sidebox__content > div:first-child > .travet-section-heading:first-child,
.tm-sidebox__content > div:first-child > .travet-home-sales-title:first-child {
    display:none !important;
}

/* Fjern luft, som de skjulte overskrifter ellers efterlader. */
.tm-sidebox__content,
.tm-sidebox__content > div:first-child,
.tm-sidebox__content .travet-home-sales-sidebar-server,
.tm-sidebox__content .travet-sidebar-calendar,
.tm-sidebox__content .travet-facebook,
.tm-sidebox__content .cff-wrapper {
    margin-top:0 !important;
    padding-top:0 !important;
}

.tm-sidebox__content {
    padding-top:12px !important;
}
