/* Fonts and universal styles */
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,500,600,700,800");
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

html, body {
    margin: 0;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    min-width: 320px;
}

body {
    padding: 35px 20px;
}

/* Nav bar */
nav {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

nav .logo {
    font-size: 1.4em;
    font-weight: 600;
    color: #0a0a0a;
}

nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav li {
    list-style-type: none;
}

nav a {
    text-decoration: none;
    color: #000;
}

nav a:hover {
    color: blue;
}

nav .links li {
    padding: 8px 10px;
}

.hire {
    background: #ffd6ba;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

/* Header */
header {
    height: 230px;
    width: 1200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 0px;
    margin-top: 40px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header h1 {
    font-weight: 700;
    margin: 0px;
    width: 450px;
    font-size: 2.6em;
    line-height: 59px;
    color: #0a0a0a;
}

header h2 {
    font-weight: 600;
    opacity: 0.85;
    background-image: linear-gradient(to right, rgba(255, 225, 0, 0.1), rgb(245, 222, 179) 4%, rgba(255, 225, 0, 0.3));
    margin: 16px;
    padding: 0.1em 0.65em;
    border-radius: 0.8em 0.3em;
}

header p {
    font-weight: 300;
}

header span {
    font-weight: 400; text-transform: uppercase; letter-spacing: 1px; font-family: monospace;
}

/* Main */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 35px;
    gap: 35px;
    position: relative;
    z-index: 1;
}

/* Product list */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 35px; 
}

.product-item {
    display: flex;
    position: relative;
    height: 365px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.product-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-item, 
.product-img {
    border-radius: 5px;
    width: 100%;
}

.product-img {
    visibility: hidden;
}

.product-info {
    position: absolute;
    top: 110px;
    left: 63%;
    width: fit-content;
    height: 127px;
}

.product-info h2 {
    font-size: 2.35em;
    font-weight: 600;
    letter-spacing: -1px;
    margin-top: 0;
    color: #333232;
}

.product-info .links {
    display: flex;
    gap: 15px;
}

.product-info .demo, 
.product-info .download {
    text-decoration: none;
    padding: 13px 30px;
    border: 1px solid #333232;
    transition: 0.3s;
    border-radius: 2px;
    font-weight: 400;
}

.product-info .demo {
    color: #333232;
}

.product-info .demo:hover {
    background: #333232;
    color: #fff;
}

.product-info .download {
    background: #333232;
    color: #fff;
}

.product-info .download:hover {
    color: #333232;
    background: #f7f7fc;
    cursor: pointer;
}

/* Product item background colors */
.product-list .product-item:nth-child(6n+1) {
    background: #FEC5BB;
}

.product-list .product-item:nth-child(6n+2) {
    background: #D8E2DC;
}

.product-list .product-item:nth-child(6n+3) {
    background: #FFD7BA;
}

.product-list .product-item:nth-child(6n+4) {
    background: #F8EDEB;
}

.product-list .product-item:nth-child(6n+5) {
    background: #ECE4DB;
}

.product-list .product-item:nth-child(6n+6) {
    background: #A8DADC;
}

/* FAQs accordion */
#faqs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#faws, .accordion {
    border-radius: 5px;
}

.accordion {
    width: 1200px;
    padding: 30px;
    box-sizing: border-box;
    background: #f5f5f5;
}

.accordion-title {
    border-bottom: 1px dashed #c9c9c9;
    padding-bottom: 25px;
    width: 600px;
    margin: 10px auto 35px;
    color: #333232;
    font-weight: 600;
    font-size: 2em;
    text-align: center;
}

.accordion button {
    position: relative;
    display: block;
    text-align: left;
    width: 100%;
    padding: 1em;
    font-size: 1.15rem;
    font-weight: 400;
    border: 1px solid #ededed;
    background: #fff;
    margin-bottom: 15px;
    outline: none;
    color: #000;
}

.accordion button:hover,
.accordion button:focus {
    cursor: pointer;
    color: #000;
}

.accordion button:hover::after,
.accordion button:focus::after {
    cursor: pointer;
    border: 1px solid #000;
}

.accordion button .accordion-title {
    color: #000;
}

.accordion-icon {
    display: inline-block;
    position: absolute;
    top: 18px;
    right: 20px;
    width: 22px;
    height: 22px;
}

.accordion-icon::before {
    display: block;
    position: absolute;
    content: '';
    top: 9.5px;
    left: 6px;
    width: 10px;
    height: 2px;
    background: currentColor;
}

.accordion-icon::after {
    display: block;
    position: absolute;
    content: '';
    top: 5.5px;
    left: 10px;
    width: 2px;
    height: 10px;
    background: currentColor;
}

.accordion button[aria-expanded='true'] .accordion-icon::after {
    width: 0;
}

.accordion button[aria-expanded='true'] .icon::after {
    width: 0;
}

.accordion button[aria-expanded='true'] + .accordion-content {
    opacity: 1;
    max-height: 12em;
    transition: all 200ms linear;
}

.accordion .accordion-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 200ms linear, max-height 200ms linear;
}

.accordion .accordion-content p {
    font-size: 1rem;
    font-weight: 300;
    padding: 15px;
    background: white;
    margin: 0;
    margin-bottom: 20px;
}

/* Downloading modal */
.modal {
    opacity: 0;
    z-index: -1;
    position: fixed; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
    transition: opacity 0.3s ease, z-index 0s 0.3s;
}

.modal.show {
    opacity: 1;
    z-index: 1000; /* Ensure it's above other elements */
    transition: opacity 0.3s ease;
}

.modal-content {
    min-width: 320px;
    width: 584px;
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 2em;
    border-radius: 5px;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close {
    color: #aaa;
    float: right;
    font-size: 40px;
    border-radius: 50px;
    padding: 3px;
    height: 26px;
    width: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.celebration {
    font-size: 4em;
}

#template-name {
    font-size: 2.3em;
    margin: 13px 0px;
    background: linear-gradient(127deg, rgb(66, 211, 146), rgb(100, 126, 255));
    -webkit-text-fill-color: transparent !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    text-align: center;
}

.modal-info .message {
    width: 400px;
    text-align: center;
    font-size: 1.1em;
    color: #525252;
}

.modal-info .support {
    font-style: italic;
    text-align: center;
    background: #f1f1f1;
    padding: 10px 17px;
    border-radius: 20px;
}

/* Footer */

footer {
    width: 1200px;
    text-align: center;
    margin: 45px auto;
    position: relative;
    z-index: 1;
    color: #0a0a0a;
}

/* Media Queries */

@media only screen and (max-width: 1270px) {
    .product-item, .product-img, .accordion, header, nav, footer {
        width: 1000px;
        height: 100%;
    }

    header {
        height: 230px;
    }

    .product-info {
        top: 84px;
    }

    .product-info h2 {
        font-size: 2em;
    }

    .product-info .demo, .product-info .download {
        padding: 12px 23px;
    }
}

@media only screen and (max-width: 1045px) {
    .product-item, .product-img, .accordion, header, nav, footer {
        width: 100%;
    }
}

@media only screen and (max-width: 960px) {

    .product-item {
        display: flex;
        flex-direction: column;
    }

    .product-info {
        position: relative;
        display: flex;
        top: 0px;
        left: 0px;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        justify-content: space-between;
        background: white;
        padding: 18px 20px;
        height: 71px;

        border: 1px solid #d8d8d8;
        border-top: 0;
        border-bottom-right-radius: 5px;
        border-bottom-left-radius: 5px;
    }

    .product-img {
        width: 147%;
        transform: translate(0%, 0%);
        object-fit: cover;
    }

    .product-info h2 {
        margin: 0px;
        font-size: 1.5em;
    }

    .product-info .demo {
        display: none;
    }

    .product-info .download {
        padding: 10px 20px;
    }

    .product-info .download span {
        display: none;
    }

    .product-info .download:after {
        content: 'Download';
    }
}

@media only screen and (max-width: 745px) {
    .accordion-title {
        width: 100%;
    }
}

@media only screen and (max-width: 768px) {
    header {
        height: auto;
    }
    nav {
        flex-direction: column;
    }
    .links {
        display: none;
    }
    main, .product-list {
        gap: 25px;
    }
}

@media only screen and (max-width: 650px) {
    .product-info h2 {
        font-size: 1.3em;
    }
    .modal-info {
        font-size: 14px;
    }
    .modal-info .message {
        width: 100%;
    }
}

@media only screen and (max-width: 480px) {
    html {
        font-size: 15px;
    }
    header h1 {
        width: 320px;
        line-height: 45px;
    }
}

@media only screen and (max-width: 820px) {
    #download-modal {
        padding: 20px;
        box-sizing: border-box;
    }
    .modal-content {
        width: 100%;
        box-sizing: border-box;
    }
}