/*   
Theme Name: Growing up Green 2025
Theme URI: http://www.stoatsandweasels.com/
Description: Theme created for Growing up Green nursery in Brighton
Author: Kevin Meredith and Lisa Bamford
Author URI: http://www.stoatsandweasels.com/
Version: 1.2.3
*/

/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

html {
    /* font-size: 1em; */ /* boilder plate default */
	/* font-size:62.5%;
    line-height: 1.4; */
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images, videos, audio and canvas and the bottom of
 * their containers: h5bp.com/i/440
 */

audio,
canvas,
img,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browse Happy prompt
   ========================================================================== */

.browsehappy {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles start
   ========================================================================== */


body {
  margin: 0 0 0 0;
}

/* test start */

html { 
  background: url(graphics/wood_background.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

/* colors

#36481c - darkest green
#749933 - mid green
#aeb57a - light green
#3c423a - light green / grey
#c1272f - red menu background
#e4d6a7 - cream menu rollover color

*/

/* menu css from http://acroweb.co.uk/adding-css-drop-down-menus-to-wordpress-3-0-theme/ */

nav {
  background-color: #c1272f;
    display: block;
    float: left;
    margin: 0 0 0 16px;
    width: 980px;
    height: 40px;
}

/*

#mobile-show-hide-menu{
  display:none;
}

*/

nav{

}

nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
}
 
nav li{
    float: left;
    position: relative;
}
 
nav ul ul {
    /* drop down container */
    display: none;
    position: absolute;
    top: 40px; /* height of menu */
    left: 0;
    float: left;
    width: 180px;
    z-index: 99999;
}

nav a {
    /*color: #aaa;  top level nav normal color */
    display: block;
    line-height: 40px;
    padding: 0 0;
    text-decoration: none;
    font-weight: normal;
}

nav ul .page-item-11:hover > ul , nav ul .page-item-19:hover > ul, nav ul .page-item-1151:hover > ul {
  /* only apply to calendar and our nursery  was nav ul li:hover > ul*/
  /* .page-item-1151 is the Pollices on test server */
  display: block; /* what makes the submenu appear */
}

nav li > a{
  color: white !important;
  text-decoration: none;
}

/* top level element only */

nav > ul > li > a{
  /* only select the top level elements */
    /* new text hidding CSS to replace indent -99999 */
  /* text-indent: 150%;
  white-space: nowrap;
  overflow: hidden; */
  /* if you know it's gonna be a link cursor: pointer; */
}

nav > ul > li.current_page_item > a,
nav > ul > li.current_page_parent > a,
nav > ul > li.current_page_ancestor > a,
nav > ul > li > a:hover {
  color: #e4d6a7 !important;
  text-decoration: none;
}

nav > ul > li{
  margin-left: 20px;
}

nav li > a:hover,{
  color:#000 !important;
  text-decoration: none;
}

nav > ul > li > a{
  /* only select the top level elements */
  /* new text hidding CSS to replace indent -99999 */
  /* text-indent: 150%;
  white-space: nowrap;
  overflow: hidden; */
  /* if you know it's gonna be a link cursor: pointer; */
  font-size: 25px;
}


nav li:hover > a{
  /* top level rollover */
  /* background: white; 
    color: #ED0677 !important;
  text-decoration:none; */
}

.children a {
  color: white !important;  /* sub menu color */
  /* unless this is marked as important roll over and .current_page_item styling won’t work */
  background: #c1272f;
}

nav ul ul :hover > a, nav ul ul .current_page_item a:visited {
    color: #e4d6a7 !important; /* color of the sub menu rollover */
    text-decoration: none;
}

nav ul ul a {
    background: #333;
    line-height: 1em;
    padding: 10px;
    width: 160px;
    height: auto;
}

nav > ul > li.current_page_item > a,
nav > ul > li.current_page_parent > a,
nav > ul > li.current_page_ancestor > a {
  /* top level active items */


    /* color: #ED0677 !important; */ /* active page colors */
  /* background: white; */
}

.children .current_page_item > a{
    color: white !important;
}

/* menu link styles end */

/* typography start */

body {
  font-size:16px;
  line-height:20px;
  font-family: "proxima-nova",sans-serif;
  font-weight: 300; /* light */
}

h2, h3, h4, h5{
  font-weight: 400; /* regular */
  color: #36481c;
}

h3, h4, h5{
  text-transform: uppercase;
  font-size: 17px;
  line-height: 20px;
  margin: 0 0 4px 0;
}

p{
  margin: 0 0 17px 0;
  color:#3c423a;
}

q, blockquote, h1, h2, h3, h4, h5, h6 {
    quotes: "\201C" "\201D" "\2018" "\2019";
}

h2{
  font-size: 30px;
  line-height: 42px;
  margin: 0 0 25px 0;
}

#main_content h2{
  /* color:#C1272F; */
  color:#C1272F;
}

/* for typekit hiding loading fonts */
.wf-loading p, .wf-loading h2,  .wf-loading h3,  .wf-loading h4,  .wf-loading h5{
    visibility: hidden;
  }
.wf-loading p, .wf-loading h2,  .wf-loading h3,  .wf-loading h4,  .wf-loading h5{
    visibility: visible;
}

/* test */
.test{
	background-color:red;
}

#wrapper {
	/* container in which every thing eles is inside */
	width: 1012px; /* used to be max-width */
	margin: 0px auto 0px auto;
	/* centre the page when the screen is larger than 980 */	
	position:relative;
	/* anything positioned in side the .page will be postioned relative to it */
	/* background-color: #FFF; */
	text-align: left; /* so text of all child elements text is alinded left */
}

.hide_text{
  text-indent: 150%;
  white-space: nowrap;
  overflow: hidden;
  /* for elements were the background is an image and the text needs to hidden */
}

/* default link styles start */

a:link, a:visited {
	color:inherit;
	text-decoration:none;
}
a:hover {
	text-decoration:underline;
}
a:active{
	
}

/* default link styles end */

/* nav > ul > li > a, */
.slide_show_button,
#home_page_slide_show,
#image_container,
.sample_menu_widget .fork,
.sample_menu_widget h2,
.sample_menu_widget,
.eyfs_widget,
.view_our_curriculum_widget,
/* .healthy_choice_ofsted_logos_widget > div > div,  NEEDED ANYMORE */
.view_our_food_menu_widget a,
.more_photos_menu_widget a,
.ofsted_report_widget,
.featured-posts h2,
.featured-posts,
.contact_map_link,
header,
.ofsted_report_widget,
footer,
#footer_decoration,
.paper_notice,
.logos_widget,
.testimonial_link_widget a{
  background: url("graphics/sprite_map_growing_up_green.png") no-repeat right top;
}


/* image container start */

#image_container{
  height:305px;
  width:958px;
  background-position: 0px -305px;
  position: relative;
  top: -10px;
  left: 7px;
}

.iamge_wrapper{
  display:inline-block;
  border-style: solid;
  border-width: 9px;
  border-color: white;
  position: relative;
}

.iamge_1{
  -webkit-transform: rotate(355deg);
  -moz-transform: rotate(355deg);
  -o-transform: rotate(355deg);
  -ms-transform: rotate(355deg);
  transform: rotate(355deg);
  top: 40px;
  left: 22px;
  z-index: 9991;
}

.iamge_2{
  -webkit-transform: rotate(7deg);
  -moz-transform: rotate(7deg);
  -o-transform: rotate(7deg);
  -ms-transform: rotate(7deg);
  transform: rotate(7deg);
  top: 30px;
  left: 18px;
  z-index: 9990;
}

.iamge_3{
  -webkit-transform: rotate(4deg);
  -moz-transform: rotate(4deg);
  -o-transform: rotate(4deg);
  -ms-transform: rotate(4deg);
  transform: rotate(4deg);
  top: 40px;
  left: -10px;
  z-index: 9992;
}

/* image container end */

/* home page slide show start */

#home_page_slide_show{
  height: 390px;
  width: 980px;

  background-position: 0px -619px;
  margin-bottom: 20px;
}


#home_page_slide_show .iamge_wrapper{
  -webkit-transform: rotate(-2deg);
  -moz-transform: rotate(-2deg);
  -o-transform: rotate(-2deg);
  -ms-transform: rotate(-2deg);
  transform: rotate(-2deg);
  position: absolute;
  top: 310px;
  left: 36px;
  display: none;
}

.iamge_title_and_description{
  position: absolute;
  left: 715px;
  top: 395px;
  width: 240px;
  display: none;
}

.iamge_title_and_description a{
  font-weight: 600;
}

#home_page_slide_show .iamge_wrapper{
  -webkit-transform: rotate(-2deg);
  -moz-transform: rotate(-2deg);
  -o-transform: rotate(-2deg);
  -ms-transform: rotate(-2deg);
  transform: rotate(-2deg);
  position: absolute;
  top: 310px;
  left: 36px;
  display: none;
}

.iamge_title_and_description_1, #home_page_slide_show .iamge_wrapper_1{
  display: block;
}

.iamge_title_and_description p, .iamge_title_and_description h4{
  color: white;
}

.slide_show_button{
  width:36px;
  height:40px;

  position: absolute;
  top:600px;
  cursor: pointer;
}

#slide_show_button_back{
    background-position: 0px -1076px;
    z-index:9981;
    left: 30px;
}

#slide_show_button_next{
    background-position: -36px -1076px;
    z-index:9982;
    left: 660px;
}

/* home page slide show end */

/* header stuff start */

header{
    margin-left: 16px;
    margin-top: 10px;
    width:980px;
    height:224px;
    background-position: 0 -80px;
    margin-bottom: 16px;
}

header h1{
	margin:0;
	/* over rides style in normalize pushed the page down by 13px */
}

.header_icon{
  overflow: hidden;
  display: inline-block;
  text-indent: -9999px;
  position: absolute;
}

.home_icon{
  top:1px;
  left:30px;
  width:160px;
  height:200px;
}

.facebook_icon{
  top:9px;
  left:878px;
  width:38px;
  height:38px;
}

.twitter_icon{
  top:9px;
  left:925px;
  width:39px;
  height:41px;
}

#content_container{
    background-color: rgba(246,245,239,0.9);
    margin-left: 16px;
    width:980px;
    margin-top: 76px;
    padding-bottom: 90px;
}

#main_content{
    float:left;
    width:615px;
    margin-left: 20px;
    margin-top: 20px; /* space between content and gallery images, slide show and spacer div */ 
    /* background-color: #888888; */
}

#sidebar{
    margin-top: 28px; /* space between content and gallery images, slide show and spacer div */  
}

/* header stuff end */

/* table styles start */

.tablepress td, .tablepress th{
  padding: 0 0 0 0 !important;
  height: 20px;
}

.tablepress tbody td,
.tablepress tfoot th {
  border-top: none !important;
}
.tablepress tbody tr:first-child td {
  border-top: 0;
}
.tablepress thead th {
  border-bottom: none !important;
}

.tablepress th{
  font-weight: inherit !important;
  background-color: transparent !important;
}

/* table styles end */

footer{
  color:white;
  padding-top:16px;
  padding-left:35px;
  width:978px; /* is 1013 */
  height:36px; /* is 52 */

  background-position: 0 -1585px;
  margin-bottom: 50px;
  font-size: 12px;
}

#footer_decoration{
  position:absolute;
  /* display: none; */
  /*
  width:220px;
  height:517px;
  bottom:33px;
  right:63px;
  background-position: -741px -2003px;
  */
  /* display: none; */
  /*
    set to display none
    set back ground image
    then page will set position and higth and width of back ground
    right position will also be set from custom fields
  */
}

/* page quote is showin the tinyMCE drop down and also must be in the editor-style.css or the srtyle wont show in the tinyMCE */
.page_quote{
	color:#32237b;
	text-align:center;
	/* font-weight:bold; */
	font-style:italic;
}

/* pages with out an image gallery at the top start */

#no_image_container{
  width: 10px;
  height: 22px; /* brings the spacing up to 30px */
}

/* pages without an image gallery at the top end */

/* home page start */

.page-template-home_page_template-php #content_container{
  padding-bottom: 40px !important;
}

.paper_notice{
    width:479px;
    padding-left: 23px;
    padding-right: 120px;
    padding-top:45px;
    height:205px;
    background-position: -362px -1334px;
    overflow: hidden;
}

.small_contact{
  width:233px;
  text-align: center;
}

.small_contact h4{
  text-transform: capitalize;
  color: #861452;
}

.preston_contact{
  float: left;
}

.beacon_contact{
  float: right;
}

article a:link {
  color:#c1272f;
  text-decoration: none;
}  /* unvisited link */
article a:visited {
  color:#c1272f;
  text-decoration: none;
}  /* visited link */
article a:hover {
  color:#c1272f;
  text-decoration: underline;
}  /* mouse over link */
article a:active {
  color:#c1272f;
  text-decoration: underline;
}  /* selected link */

/* home page end */

/* nursery page start */

.nursery_gallery_preview{
  background-color: #861452;
  color:white;
  text-align: center;
  padding: 5px 0 5px 0;
  margin: 0 0 50px 0;
}

.gallery_link{
  display: inline-block;
  margin: 25px 30px 25px 30px;
}

.nursery_text_wrapper{
  margin-top: 20px;
  text-transform: uppercase;
  width: 180px;
  margin-left: 18px;
}

.nursery_image_wrapper{
  border-style: solid;
  border-width: 5px;
  border-color: #FFF;
}

.page-template-sub_page_photo_gallery_template-php article, .page-template-sub_page_photo_gallery_template-php h2{
  margin-left: 20px;
}

.page-template-sub_page_photo_gallery_template-php article h2, .page-template-sub_page_photo_gallery_template-php .widget h2{
  margin-left: 0;
}

.page-template-sub_page_photo_gallery_template-php article{
  margin-bottom: 60px;
}

/* nursery page end */

/* contact page start */

.page-template-contact_template-php #main_content{
    width:940px;
}

.page-template-contact_template-php #main_content article, .page-template-sub_page_photo_gallery_template-php article{
    width:615px;
    float:left;
}

.contact_map_link{
    float:right;
    width:97px;
    height:66px;
    margin-right: 104px;
    margin-top: 8px;
    background-position: 0px -1010px;
}

/* contact page end */

/* news / blog start */

.type-post{ /* no border on single-post */
  padding-bottom:30px;
  margin-bottom: 30px;
  border-bottom:1px solid #759a33;
}

.type-post img{
  max-width: 620px;
  height:auto;
}

.previous-next{
  margin-top: 20px;
  font-weight:400;
  margin-bottom: 20px;
}

.previous-next .next{
  float:left;
}

.previous-next .previous{
  float:right;
}

.previous-next a{
  color:#c1272f;
}

.more-link{
  text-transform: uppercase;
  color:#c1272f !important;
  font-weight:400;
}

article ul{ /* effects all pages */
  padding-left: 12px;
  
}

article li{ /* effects all pages */
  margin-bottom: 5px;
}

.wp-caption-text{
  margin-top: 10px;
  margin-left: 10px;
  margin-right: 10px;
  font-size: 13px;
  line-height: 15px;
}

/*
a[href*="category/featured"], a[href*="category/uncategorized"] {

}*/



/* news / blog end */

/* side bar start */

.widget{ /* basic styles for duration wirdgit */
  width:210px;
  padding: 0 30px 25px 20px;
}

.cat-item-1, .cat-item-4{ /* categories of Favorites and Uncategorized */
  display: none;
}

.widget h2{
  font-size: 17px;
  line-height: 19px;
  font-weight:400;
  text-transform: uppercase;
  margin-bottom: 0;
}

.widget ul{
  list-style: none;
  padding-left: 0;
  margin: 0 0 0 0;
}

.featured-posts{
    background-position: -720px -1009px;
    padding-top: 45px;
    margin-bottom: 40px;
}

.featured-posts h2{
    background-position: 0px -1155px;
    height: 58px;
    width: 152px;
    margin-bottom: 20px;
    text-indent: 150%;
    white-space: nowrap;
    overflow: hidden;
    margin-left: 35px;
}

/* side bar end */

/* side bar and widgets start */

#sidebar{
    float:right;
    width:280px;
    /* background-color: #cccccc; */
}

.advanced_text{
  padding:0 0 0 0;
  margin-bottom: 70px;
}

.file-list-widget{
  /* list PDF files same style as basic widget */
  padding: 0 30px 0px 20px;
}

.ofsted_report_widget{
    background-position: -200px -1009px;
    height: 217px; /* is actually 260 */
    width: 260px;
    padding: 40px 0 0 0!important;
    text-align: center;
}

.ofsted_report_widget h2{
  margin-bottom: 20px;
}

.ofsted_report_widget .quote{
  color:#35abd5;
  font-size: 35px;
  line-height:  45px;
  font-family: 'Satisfy', cursive;
  font-weight: 400px;
  margin-bottom: 0px;
}

.ofsted_report_widget a:link, .ofsted_report_widget a:visited{
  color:#c1272f !important;
  text-decoration: none;
}

.ofsted_report_widget a:hover{
  text-decoration:underline;
}

.quote_widget{
  width:260px;
}

.quote_widget p{
  text-align: center;
  color: #759a33;
  font-size: 20px;
  line-height: 30px;
  font-family: 'Satisfy', cursive;
  font-weight: 400px;
  margin-left: 20px;
  margin-right: 20px;
}

.quote_widget .author, .ofsted_report_widget h2{
  color: #36481d;
  text-transform: uppercase;
  font-size: 15px;
  font-family: inherit;
  font-weight: inherit;
}

.view_our_food_menu_widget, .more_photos_menu_widget, .testimonial_link_widget{
  width:260px;
}

.view_our_food_menu_widget a{
    background-position: 0px -1267px;
    width:229px;
    height:153px;
    display: block;
    margin-left: 15px;
}

.testimonial_link_widget a{
    background-position: -260px -2456px;
    display: block;
    width:248px;
    height:63px;
}

.logos_widget{
    background-position: 0px -2321px;
    width:260px;
    height:186px;
    display: block;
    /* margin-left: 15px; */
}

.logos_widget #daynurseries{
  display:block;
  width:80px;
  height:80px;
  position:relative;
  left:180px;
}

.more_photos_menu_widget a{
    background-position: 0px -1520px;
    width:180px;
    height:54px;
    display: block;
    margin-left: 40px;
}
/*
.healthy_choice_ofsted_logos_widget > div > div{
    background-position: 0px -1420px;
    width:202px;
    height:100px;
    margin-left: 15px;
}
*/
.view_our_curriculum_widget{
    background-position: -460px -1009px;
    width:260px;
    height:183px; /* is 243 */
    text-align: center;
    padding-top: 50px;
}

.eyfs_widget{
    background-position: -229px -1267px;
    width:259px;
    height:52px; /* actually height 67 */
    padding: 15px 0 0 0;
    text-align: center;
}

.sample_menu_widget{
    background-position: -720px -1009px;
    width:260px;
    padding-top: 40px;
    padding-bottom: 30px;
    text-align: center;
}

.sample_menu_widget h2{
    background-position: -179px -1519px;
    width:156px;
    height:56px;
    /* hide text */
    text-indent: 150%;
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto 20px auto;
}

.sample_menu_widget .fork{
    background-position: 0px -1213px;
    width:79px;
    height:18px;
    margin: 10px auto 0 auto;
}

.view_our_curriculum_widget a, .eyfs_widget a{
  color:white;
  text-transform: uppercase;
  display: block;
}

/* side bar widgets end */

/* events page start */

.page-template-events_template-php #main_content{
    width:940px;
}

.gug_event{
  border-top:1px solid #759a33;
  padding-bottom:30px;
  padding-top:30px;
}

.last_event{
  /* styling the last elements in the events list could also add some extra space at the bottom */
  border-bottom:1px solid #759a33;
  padding-bottom:30px;
  padding-top:30px;
  margin-bottom: 30px;
}

.gug_event_image{
  float:left;
  width:300px;
  margin-top: 4px;
}

.gug_event_text{
  float:right;
  width:620px;
}

.gug_event_date_and_time{
  color:#c1272f;
  font-weight:400;
}

/* events page end */

/* ==========================================================================
   Author's custom styles end
   ========================================================================== */


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 150%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
