
/* Cardinal Tree Farms Responsive Layout */
/* Desktop styles remain unchanged */


/* Restore original desktop header layout */
@media screen and (min-width: 1025px) {

    header .farm-header-title {
        position: absolute !important;
        left: 200px !important;
        bottom: 30px !important;
        width: 665px !important;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    header .farm-header-title h1 {
        font-size: 2.5em !important;
        line-height: 1.1;
        margin: 0;
    }

    header .farm-header-title span {
        font-size: 0.9em !important;
        line-height: 1.2;
    }
}

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

    html, body {
        max-width: 100%;
        overflow-x: clip;
    }

    #wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-left: 0;
        border-right: 0;
    }

    /* Header */
    header {
        height: auto;
        min-height: 0;
        padding: 15px;
        box-sizing: border-box;
        background-size: contain;
        text-align: center;
    }

    #logo {
        position: relative;
        left: auto;
        top: auto;
        width: 179px;
        height: 228px;
        margin: 0 auto 10px;
        background-size: contain;
    }

    #social {
        position: relative;
        left: auto;
        width: auto;
        margin: 10px auto;
        text-align: center;
    }

    #social img {
        max-width: 110px;
        height: auto;
    }

    .farm-header-title {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 10px 5px;
    }

    .farm-header-title h1 {
        font-size: clamp(24px, 5vw, 38px) !important;
        line-height: 1.15;
    }

    .farm-header-title span {
        display: block;
        line-height: 1.4;
        margin-top: 8px;
    }

    #countdown {
        position: relative;
        right: auto;
        bottom: auto;
        display: inline-block;
        margin: 12px auto;
    }

    /* Navigation */
    nav {
        height: auto;
        min-height: 44px;
    }

    nav ul.nav {
        width: 100%;
        left: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 8px;
        gap: 4px;
    }

    nav ul.nav > li {
        display: block;
        margin: 0;
        padding: 8px;
        font-size: 15px;
        line-height: 1.5;
    }

    nav ul.nav li a {
        display: inline-block;
    }

    /* Make Galleries links visible on touchscreens */
    nav ul.nav > li > ul,
    .nav li:hover ul {
        position: static;
        left: auto;
        display: block;
        background: transparent;
        box-shadow: none;
        padding: 0;
        margin-top: 3px;
    }

    nav ul.nav > li > ul li {
        display: inline-block;
        margin: 0 5px;
        padding: 3px;
        font-size: 13px;
    }

    /* Main content */
    section,
    section#full {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        box-sizing: border-box;
    }

    #body {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 18px;
    }

    aside {
        position: relative;
        width: 100%;
        max-width: 100%;
        top: auto;
        right: auto;
        bottom: auto;
        box-sizing: border-box;
        padding: 18px;
    }

    /* Homepage columns */
    #colcontain {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #colcontain .table-row,
    #colcontain .table-cell {
        display: block;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    #colcontain .table-row .table-cell {
        padding: 20px;
    }

    /* Images and media */
    section img,
    #body img,
    #colcontain img {
        max-width: 100%;
        height: auto;
    }

    iframe,
    video {
        max-width: 100%;
    }

    .box_skitter,
    .box_skitter_large {
        max-width: 100% !important;
    }

    /* Footer */
    #footerleft,
    #footerright {
        float: none;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding: 5px;
    }

    /* Popups */
    #popUpDiv,
    #popUpDiv2,
    #popUpDiv3,
    #popUpDiv4,
    #popUpDiv5 {
        width: 95%;
        max-width: 95%;
        box-sizing: border-box;
    }
}

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

    nav ul.nav {
        gap: 2px;
    }

    nav ul.nav > li {
        padding: 7px;
        font-size: 14px;
    }

    #body {
        padding: 12px;
    }

    #colcontain .table-row .table-cell {
        padding: 14px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.25em;
    }

    .ctf-survey,
    .ctf-coupon-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile header refinements */
@media screen and (max-width: 600px) {

    header {
        background-image: none;
    }

    #social {
        position: relative;
        margin: 0 auto 15px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }

    #social img {
        max-width: 95px;
        height: auto;
    }

    .farm-header-title {
        padding-top: 5px;
    }

    .farm-header-title h1 {
        font-size: 25px !important;
        line-height: 1.2;
    }
}

/* Compact desktop and tablet layout */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    header {
        height: 205px;
        min-height: 205px;
        padding: 0;
        position: relative;
        background-image: none;
    }

    #logo {
        position: absolute;
        left: 8px;
        top: 8px;
        width: 150px;
        height: 190px;
        margin: 0;
        background-size: contain;
    }

    #social {
        position: absolute;
        top: 8px;
        right: 12px;
        left: auto;
        width: auto;
        margin: 0;
    }

    #social img {
        max-width: 100px;
        height: auto;
    }

    .farm-header-title {
        position: absolute !important;
        top: 65px !important;
        left: 165px !important;
        bottom: auto !important;
        width: calc(100% - 180px) !important;
        padding: 0 !important;
        text-align: center;
    }

    .farm-header-title h1 {
        font-size: 26px !important;
        line-height: 1.2;
        margin: 0;
    }

    .farm-header-title span {
        font-size: 12px !important;
        line-height: 1.3;
    }

    #countdown {
        position: absolute;
        top: 148px;
        right: 12px;
        bottom: auto;
        margin: 0;
        padding: 7px 12px;
        font-size: 13px;
    }

    nav ul.nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}


