/* basic reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* color variables, create palette of pale yellow orange red colors, set in CSS variables */
:root {
    --pale-yellow: #dacece;
    --pale-orange: #f9d9d9;
    --pale-red: #f9c3c3;
    --light: #ffffff;
    --dark: #333333;
    --border-radius: 10px;
    --padding: 40px;
    --gap: 20px;
}

html, body {
    height: 100%;
    display: grid;
}

body {
    font-family: 'AvenirNext-Regular', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark);
    margin: var(--gap);
}

h1, h2, h3, h4, a[class] {
            font-family: 'AvenirNext-Bold', sans-serif;
            line-height: 1.2;
        }

        /* load AvenirNext-Italic , bold, normal, otf file type*/
        @font-face {
            font-family: 'AvenirNext-Italic';
            src: url('/fonts/AvenirNextLTPro-It.otf') format('opentype');
            font-weight: normal;
            font-style: italic;
        }

        @font-face {
            font-family: 'AvenirNext-Bold';
            src: url('/fonts/AvenirNextLTPro-Bold.otf') format('opentype');
            font-weight: bold;
            font-style: normal;
        }

        @font-face {
            font-family: 'AvenirNext-Regular';
            src: url('/fonts/AvenirNextLTPro-Regular.otf') format('opentype');
            font-weight: normal;
            font-style: normal;
        }

/*
gridContainer
gridItem
gridCTA
ctaItem
buyNow
action
download
*/

.gridContainer {
    max-width: 1920px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    margin: auto;
}

.gridItem:nth-child(1) {
    grid-column: span 3;
    display: grid;
    grid-template-columns: minmax(40%, 1fr) 2fr;
    gap: var(--gap);
}

.featureImage {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.featureImageWrapper {
    overflow: hidden;
    border-radius: var(--border-radius);
    position: sticky;
    top: var(--gap);
    height: fit-content;
}

.ctasWrapper {
    display: grid;
    gap: var(--gap);
    grid-template-rows: 1fr;
}

.ctaItem {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    gap: var(--gap);
    border-radius: var(--border-radius);
    background-color: var(--pale-yellow);
}

.ctaItem:first-child {
    padding: var(--padding);
}

.ctaItem.downloadTheBook .moreInfoInner {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

h1 + p {
    max-height: 14vh;
    overflow: hidden;
}

.moreOptions {
    border:none;
    background-color: transparent;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 300;
    color: #777;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    margin-bottom: var(--gap);
    margin-top: 60px;
}
.moreOptionsWrapper {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
.buyNow,
.download,
.action {
    background-color: var(--pale-orange);
    display: block;
    padding: var(--padding);
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

/* add right arrow at the end with pseudo elemnt */
.buyNow::after,
.download::after,
.action::after {
    content: '→';
    font-size: 40px;
    position: absolute;
    top: 54%;
    right: 40px;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

/* on hover, move the arrow to the right */
.buyNow:hover,
.download:hover
.action:hover {
    background-color: var(--pale-red);
}

.buyNow:hover::after,
.download:hover::after,
.action:hover::after {
    transform: translateX(10px) translateY(-50%);
}



.gridItem:not(:first-child) a {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
    text-decoration: none;
    padding: var(--padding);
    background-color: var(--pale-red);
    border-radius: var(--border-radius);
}

.action::after,
.download::after {
    content: '→';
    margin-left: 10px;
    font-size: 40px;
    position: absolute;
    top: 54%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

.action:hover,
.download:hover {
    background-color: var(--pale-orange);
}

.action:hover::after,
.download:hover::after {
    transform: translateX(10px) translateY(-50%);
}

.moreInfo {
    opacity: 0;
    pointer-events: none;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    max-height: 100%;
    position: fixed;
    background-color: #000000d9;
    padding: var(--padding);
    z-index: 98;
    transition: opacity 0.3s;
    display: grid;
    place-items: center;
}

.moreInfo.show {
    opacity: 1;
    pointer-events: all;
}

.moreInfoInner {
    max-width: 700px;
    margin: auto;
    padding: var(--padding);
    background-color: var(--pale-yellow);
    border-radius: var(--border-radius);
    overflow-y: auto;
    max-height: 100%;
}

.closeReadMore.closeReadMore.closeReadMore {
    pointer-events: none;
    position: fixed;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    text-decoration: none;
    padding: 6px;
    background-color: transparent;
    color: #ffffff;
    z-index: 99;
}

.moreInfo p {
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 30px 0px
}

/* paypal */
select#selector {
    font-size: 1rem;
    font-family: 'AvenirNext-Bold', sans-serif;
}





@media (max-width: 940px) {

    body {
    margin-top: 0;
}
    
    .gridItem:nth-child(1) {
        grid-template-columns: 1fr;
    }
    .featureImageWrapper {
        order: -3;
        position: relative;
        margin-bottom: var(--gap);
    }

.moreInfoInner.moreInfoInner {
    padding: 30px;
}

.moreInfo.moreInfo {
    padding: 20px;
    padding-top: 50px;
}

    .downloadTheBook .action::after, .downloadTheBook .download::after {
    right: 30px;
    font-size: 32px;
}
    
}
