html, body {
    margin: 0;
    padding: 0;
    min-height: 100%; /* Use min-height to ensure content doesn't get cut off */
    background-image: url('http://i.imgur.com/JIys63C.jpg');
    background-color: #2d3a80;
    font-family: 'Titillium Web', sans-serif;
    font-size: 13px;
    color: #fff;
    text-align: justify;
    letter-spacing: 1px;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

#box1 {
    position: relative; /* Crucial for absolute positioning of children */
    width: 95%;
    max-width: 735px;
    min-height: 100%; /* This might need to be auto if children are absolutely positioned and define height */
    margin: 30px auto;
    padding: 8px; /* Original padding */
    box-sizing: border-box;
}

#header {
    height: 300px;
    width: 100%;
    background-image: url('./gifs/Scranimations.gif');
    background-size: cover;
    background-position: center;
    border: 1px solid #230023;
    box-sizing: border-box;
    margin-bottom: 8px; /* Add some space below header before linkity or content */
}

#linkity {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    line-height: 30px;
    text-align: center;
    margin-top: -35px; /* Adjust to pull up over the bottom of header or top of content */
    /* Increased negative margin slightly because of header's margin-bottom */
    margin-bottom: 15px; /* Space below links before content starts */
    z-index: 10;
}

#linkity a {
    width: auto;
    padding: 0 15px;
    display: inline-block;
    margin: 5px 2px 0;
    background-color: #230023;
    color: #fff;
    -moz-border-radius: 10px 10px 0px 0px;
    -webkit-border-radius: 10px 10px 0px 0px;
    border-radius: 10px 10px 0px 0px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid #230023;
    line-height: 30px;
}

#linkity a:hover {
    background-color: rgba(35, 0, 35, 0.4);
    border-bottom: 1px solid #fff;
    -moz-transition: .4s;
    -webkit-transition: .4s;
    transition: .4s;
}

.content-wrapper {
    /* For mobile, this wrapper helps group content.
       No specific flex/grid needed if children are block & 100% width */
    /* The original #box2 and #box3 were absolutely positioned *after* #header and #linkity.
       Their 'top' was 359px. We need to ensure there's space for them,
       or that #box1 grows appropriately.
    */
}

#box2 {
    width: 100%; /* Mobile: full width */
    min-height: auto;
    border: 1px solid #230023;
    padding: 8px;
    background-color: rgba(35, 0, 35, 0.4);
    margin-bottom: 8px; /* Space between box2 and box3 when stacked */
    box-sizing: border-box;
}

#box3 {
    width: 100%; /* Mobile: full width */
    min-height: auto;
    border: 1px solid #230023;
    padding: 8px;
    background-color: rgba(35, 0, 35, 0.4);
    margin-bottom: 4px;
    text-align: left;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    font-size: 14px;
    line-height: 30px;
    font-family: times;
    font-weight: bold;
    display: block;
    border-bottom: 1px solid #a481b0;
    letter-spacing: 2px;
    margin: -2px 0px 10px -4px;
    background: url('http://i.imgur.com/JIys63C.jpg'); /* Consider removing if redundant with body bg */
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
    color: #fff; /* Ensure h1 text is visible against its own background */
}

a {
    color: #fff;
    background: #000;
    text-decoration: none;
    font-style: italic;
    padding: 2px 4px;
}

a:hover {
    background: rgb(35, 0, 35);
}


/* Media Query for larger screens (tablets and desktops) */
@media (min-width: 768px) {
    #box1 {
        margin: 72px auto;
    }

    #header {
        height: 350px;
        margin-bottom: 0; 
    }

    #linkity {
        position: absolute;
        top: -23px; 
        left: 7px;  
        width: 735px; 
        margin-top: 0;
        margin-bottom: 0;
    }

    #linkity a {
        width: 120px;
        padding: 0;
        margin: 0 -1.5px 0;
    }

    .content-wrapper {
        /* This div should NOT establish a new positioning context for its
           absolutely positioned children on desktop, so they correctly
           refer to #box1. So, no 'position: relative;' here. */
    }

    #box2 {
        position: absolute;
        top: 359px; /* Relative to #box1 */
        left: 8px;  
        width: 528px; 
        min-height: 100%; 
        margin-right: 4px; 
        margin-bottom: 4px; 
    }

    #box3 {
        position: absolute;
        top: 359px;   /* Relative to #box1 */
        left: 553px;  
        width: 174px; 
        min-height: 100%; 
        margin-bottom: 4px; 
    }
}

/* Responsive YouTube or video container */
.responsive-video {
  width: 100%;
  max-width: 720px;
  height: auto;
  display: block;
  margin: 1em auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive tweak for smaller screens */
@media screen and (max-width: 600px) {
  .responsive-video {
    max-width: 100%;
    margin: 1em auto;
  }
}