/*
 * HTML5 Boilerplate
 *
 * 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;
}

body {
    font-size: 1em;
    line-height: 1.4;
}

a {
    color: #00e;
}

a:visited {
    color: #551a8b;
}

a:hover {
    color: #06e;
}

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

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

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

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

textarea {
    resize: vertical;
}

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

body {background:#1960A2 url(../img/sf.jpg) no-repeat center 65%;/*background-size:50% auto;*/}

header img {float:left;max-width:8%;margin-right:2%;}
h1 {color: #FFE935;font-size:1.2rem;margin:0 0 1rem;line-height:3rem;
    }
	
#layout {padding:.75rem 1.5%;}	

article {padding:1rem 3%;margin-bottom:3rem;color:#fff;clear:left;}
article a {color:#FFE763 !important; font-weight:bold;}
article a:hover {color:#FFE011;text-decoration:none;}

/* bottone */
.m-button {display:block;color:#000 !important;line-height:5rem;width:75%;margin:0 auto;text-decoration:none;
background: #ffe763;	
text-align:center;font-weight:bold;font-size:1.1rem;
border:1px solid rgb(254,252,234);-moz-border-radius:6px;border-radius:6px;
}

.m-button:active {
background: #ffde0a;
		}

footer {/*position:absolute;bottom:0;left:0;*/color:#fff;font-size:0.8rem;width:100%;}
footer p {text-align:center;line-height:3rem;margin:0;}

/* smartphone portrait */
@media screen and (max-width:240px) {
h1 {font-size:1rem;line-height:2rem;}
article {padding:0 3%;}
}
@media screen and (min-width:260px) {
.m-button  {font-size:1.8rem;}
}
@media screen and (min-width:241px) and (max-width:30em) {
body {background-size:70% auto;background-position:center 45%;}
header img {float:left;max-width:13%;margin-right:1%;}
h1 {font-size:1.4rem;line-height:4.5rem;}

article {margin-bottom:2rem;padding:.2rem 3%;}
article p {margin:0;}
}

/* smartphone landscape */
@media screen and (min-width:30.5em) and (max-width:45em) and (max-height:35em) {
	body {background-size:50% auto;}
	h1 {font-size:1.8rem;line-height:6rem;}
	header img {max-width:10%;}
	article {margin-bottom:2rem;padding:.5rem 3%;}
	footer {position:static;margin:3rem 0 0;}
}

/* tablet portrait */ 
@media screen and (max-width:48em) and (min-height:45em) {
	header img {max-width:8%;}
	h1 {font-size:2rem;line-height:6.5rem;}
	article  {margin-bottom:15rem;font-size:1.1rem;}
	footer {margin:3rem 0 0;}
}

@media screen and (min-width:48.5em) {
	h1 {font-size:3rem;line-height:7rem;    }
	article  {margin-bottom:8rem;font-size:1.2rem;}
}



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

/* Prevent callout */

.nocallout {
    -webkit-touch-callout: none;
}

.pressed {
    background-color: rgba(0, 0, 0, 0.7);
}

/* A hack for HTML5 contenteditable attribute on mobile */

textarea[contenteditable] {
    -webkit-appearance: none;
}

/* A workaround for S60 3.x and 5.0 devices which do not animated gif images if
   they have been set as display: none */

.gifhidden {
    position: absolute;
    left: -100%;
}

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    background-repeat: no-repeat;
    border: 0;
    direction: ltr;
    display: block;
    overflow: hidden;
    text-align: left;
    text-indent: -999em;
}

.ir br {
    display: none;
}

/*
 * 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 helper
 * Used to contain floats: h5bp.com/q
 */

.clearfix:before,
.clearfix:after {
    content: "";
    display: table;
}

.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.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

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

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    /* Style adjustments for viewports that meet the condition */
}
