/*
 Theme Name: AFT
 Theme URI:
 Author: Podcom Limited
 Author URI: https://www.podcom.co.nz
 Description: A custom theme for AFT
 Version: 1.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: aft
*/


/*
    1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
    box-sizing: border-box;
}
/*
    2. Remove default margin
*/
* {
    margin: 0;
}
/*
    Typographic tweaks!
    3. Add accessible line-height
    4. Improve text rendering
*/
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
/*
    5. Improve media defaults
*/
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}
/*
    6. Remove built-in form typography styles
*/
input, button, textarea, select {
    font: inherit;
}
/*
    7. Avoid text overflows
*/
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
/*
    8. Create a root stacking context
*/
#root, #__next {
    isolation: isolate;
}

/* Make RobotSans the default typeface */
body, html {
    font-family: 'Roboto', sans-serif;
}

main {
    min-height: 100vh;
    display: block;
}

.header-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.inner-content {
    max-width: calc(100% - 2rem);
    width: 1300px;
    margin: 0 auto;
}

.inner-content-wide {
    max-width: calc(100% - 2rem);
    width: 1300px;
    margin: 0 auto;
}

.inner-content-hero {
    max-width: calc(100% - 2rem);
    width: 1600px;
    margin: 0 auto;
}

.entry-content li {
    line-height: 1.5rem;
    font-weight: 300;
}

.wp-block-media-text.hero {
    max-width: 100%;
    width: 100%;
    border-radius: 15px;
    margin-top: 2rem;
    overflow: hidden;
}

/* inside the hero, we need to add waves */
.wp-block-media-text.hero .wp-block-media-text__content::before {
    background-image: url(/wp-content/themes/aft/assets/images/waves-hero.png);
    background-size: cover;
    background-position: bottom;
    content: '';
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0px;
    left: 0px;
    background-repeat: no-repeat;
    opacity: 0.75;
    /* mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%); */
}

.wp-block-media-text.hero .wp-block-media-text__content {
    min-width: 400px;
}

.wp-block-media-text.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

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

    /* Remove the min-width */
    .wp-block-media-text.hero .wp-block-media-text__content {
        min-width: initial;
    }

    .wp-block-media-text.hero {
        margin: 0px !important;
        border-radius: 0px;
    }

    /* Hide the hero image */
    .wp-block-media-text.hero figure {
        display: none;
    }

    .wp-block-media-text.hero .wp-block-group {
        padding: 0px;
    }

    .inner-content-hero {
        margin: 0px !important;
        width: 100%;
        max-width: 100%;
    }

    .aft-section-container.hero {
        padding: 0px !important;
    }

}

/* 1300 */
@media only screen and (max-width: 1300px) {
    .wp-block-media-text.hero h1 {
        font-size: 2rem !important;
    }
}

/* Size up H1, H2, H3, H4 with proper sizing and margins */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}


/* Update the detail details block to be more modern */
.wp-block-details {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    background-color: white;
    padding: 0.75rem;
    border-radius: 6px;
}
.wp-block-details summary {
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    padding-left: 0.5rem;
}

/* Arrow for buttons */

.arrow-button a,
a.arrow-button {
    /* color: white; */
    transition: background-color 0.3s ease;
    position: relative;
}

.arrow-button a::after,
a.arrow-button::after {
    content: '➔';
    margin-left: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.arrow-button a:hover::after,
a.arrow-button:hover::after {
    transform: translateX(5px);
}

.aft-button-subtle {
    display: inline-block; /* Change from block to inline-block to fit content */
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-end; /* Align the button to the right */
    width: auto; /* Ensure it takes only the width of its content */
    line-height: 1.25rem;
    text-wrap: nowrap;
    text-align: left;
}
.aft-button-subtle + .aft-button-subtle {
    margin-left: 1rem;
}

.aft-button-subtle:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Get a stack to be 100% wide */
.stack-100 {
    width: 100%;
}

.stack-100 > div {
    width: 100%;
    margin: 0 auto;
}

.stack-100 .wp-block-media-text,
.stack-100 .wp-block-cover {
    position: absolute;
    z-index: 999;
    top: -150px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stack-100 .first-stack {
    color: white;
}

.stack-100 .third-stack {
    background-color: #f8f8f8;
    color: #333;
}

.footer-logo-container svg {
    margin: 0 auto;
}

/* On any element with the .waves-content class, we need to give it an SVG background */
.waves-content {
    background-image: url('/wp-content/themes/aft/assets/images/waves-content.png');
    background-size: contain;
    background-position: center;
}

/* Sections Styles */
.aft-section-header-container {
    padding: 2rem 0;
    background-color: #f8f8f8;
}

.aft-section-container {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Color overwrites */
.has-primary-light-color-children > * {
    color: var(--wp--preset--color--primary-light) !important;
}

.aft-product-download-buttons p + h3 {
    margin-top: 1rem;
}


/* At the breakpoint 600px, we need to increase the height of the 1st and 3rd stack to be 200px each */
@media only screen and (max-width: 600px) {

    .stack-100 .first-stack,
    .stack-100 .third-stack {
        height: 0px;
        min-height: 0px !important;
    }
    /* .stack-100:has(.wp-block-cover) .first-stack,
    .stack-100:has(.wp-block-cover) .third-stack {
        height: 150px;
        min-height: 150px;
    } */
    /* When we are in mobile, make the position relative */
    .stack-100 .wp-block-media-text,
    .stack-100 .wp-block-cover {
        position: relative;
        top: 0;
    }
    .stack-100 .inner-content {
        margin: 0px;
        width: 100%;
        max-width: 100%;
    }
    .stack-100 .wp-block-media-text,
    .stack-100 .wp-block-cover {
        border-radius: 0px !important;
    }
    .stack-100 {
        gap: 0px;
    }


    /* Footer Responsive */
    .footer-buttons {
        width: 100% !important;
    }
    .footer-buttons .wp-block-button {
        width: 100% !important;
    }
    .footer-buttons .wp-block-button a {
        text-align: center !important;
        width: 100%;
    }
    .custom-logo-link img {
        max-width: 200px;
    }
    .m-hidden, .m-hide {
        display: none !important;
    }
    /* We have some text over images on desktop, when it hits mobile we want to ensure we can still read the images */
    .m-image-backgroud-overlay .wp-block-cover__background {
        background-color: var(--wp--preset--color--primary-dark) !important;
        opacity: 0.85 !important;
    }

}

/* If its above 600px */
@media only screen and (min-width: 600px) {
    .t-hide, .t-hidden {
        display: none !important;
    }
}

/* When the pixels are lower then 1500px */
@media only screen and (max-width: 1500px) {

     /* Sections Styles */
    .aft-header-container {
        padding: 0px !important;
    }
    .aft-header-container .waves-content {
        border-radius: 0px !important;
    }
    .aft-header-container {
        margin-top: 0rem;
    }
    .waves-content {
        background-size: cover;
    }

}

/* When the width is smaller then 430, we need to set the iframe to be 550px high */
@media only screen and (max-width: 415px) {
    #aft-investors-iframe {
        height: 550px;
    }
}







.aft-prescription-prescription-info {
    display: flex;
    flex-wrap: wrap; /* Allows blocks to wrap onto new lines if necessary */
    gap: 20px; /* Space between blocks */
    justify-content: space-between; /* Ensures blocks are evenly distributed */
}

.aft-prescription-block {
    display: flex;
    align-items: stretch;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    box-sizing: border-box; /* Includes padding and border in the block's width */
}

/* If the aft-prescription-block has a .small class, we want the blocks side by side and shorter */
.aft-prescription-prescription-info.small .aft-prescription-block {
    flex: 1 1 calc(50% - 20px); /* Two blocks per row with a 20px gap */
    max-width: calc(50% - 20px); /* Ensures blocks don't exceed 50% width */
}

.aft-prescription-prescription-info.small .aft-prescription-content {
    padding: 1rem; /* Reduce padding for smaller height */
}

.aft-prescription-prescription-info.small .aft-prescription-title {
    font-size: 1.5em; /* Reduce font size for smaller blocks */
    margin-bottom: 5px; /* Reduce margin to save space */
}

.aft-prescription-prescription-info.small .aft-prescription-description {
    font-size: 0.9em; /* Reduce font size for smaller blocks */
    margin-bottom: 10px; /* Reduce margin to save space */
}

.aft-prescription-prescription-info.small .aft-prescription-buttons {
    margin-top: 1rem; /* Reduce margin to save space */
}

.aft-prescription-prescription-info.small .aft-prescription-image-wrapper {
    flex: 0 0 150px; /* Reduce the width of the image container */
    min-width: 150px; /* Reduce minimum width for smaller blocks */
}

.aft-prescription-prescription-info.small .aft-prescription-image-strip {
    top: -5px; /* Adjust strip position */
    right: 2rem; /* Adjust position to fit smaller block */
    bottom: 0;
    height: 130%; /* Full height */
}

.aft-prescription-prescription-info.small .aft-prescription-image img {
    max-width: 100%;
    height: auto;
    padding: 0.5rem;
}

.aft-prescription-prescription-info.small .aft-prescription-info-wrapper {
    padding: 1rem;
}

.aft-prescription-info-wrapper {
    flex: 1 1 auto; /* Automatically adjust the width based on the content */
    display: flex;
    align-items: center; /* Center the content vertically */
}

.aft-prescription-content {
    padding: 2rem;
}

.aft-prescription-image-wrapper {
    flex: 0 0 250px; /* Set a fixed width to prevent wrapping */
    min-width: 300px; /* Minimum width to prevent wrapping */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: right;
    align-items: center;
}

.aft-prescription-image-strip {
    position: absolute;
    top: -10px;
    right: 4rem;
    bottom: 0;
    width: 4rem;
    z-index: 1;
    height: 130%; /* Full height */
    transform: rotate(5deg);
}

.aft-prescription-image {
    position: relative;
    z-index: 2;
    text-align: center;
}

.aft-prescription-image img {
    max-width: 100%;
    height: auto;
    padding: 2rem;
    margin-left: auto;
}

.aft-prescription-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--wp--preset--color--primary-dark);
}

.aft-prescription-category {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

.aft-prescription-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

.aft-prescription-buttons {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aft-prescription-country-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Container for our prescription if we want it to overlap the container */
.aft-prescription-top-overlap {
    position: absolute;
    top: -4rem;
    left: 0;
    right: 0;
    z-index: 1;
    max-width: calc(100% - 4.5rem);
}

/* Responsive design */
@media (max-width: 1024px) { /* Tablet screens */
    .aft-prescription-block {
        flex: 1 1 calc(100% - 20px); /* Full width on smaller screens */
        max-width: 100%; /* Ensures blocks take up full width */
    }
}

@media (max-width: 768px) { /* Mobile screens */
    .aft-prescription-block {
        flex-direction: column;
        align-items: center;
    }

    .aft-prescription-image-wrapper {
        order: -1;
        width: 100%;
        min-width: auto;
        margin-bottom: 20px;
        justify-content: center;
    }

    .aft-prescription-image-strip {
        top: 50px;
        right: auto;
        left: -30px;
        bottom: auto;
        width: 150%;
        height: 4rem;
        transform: rotate(-5deg);
    }

    .aft-prescription-content {
        text-align: center;
        padding: 1rem;
    }

    .aft-prescription-title {
        font-size: 1.8em; /* Adjust font size for small screens */
    }

    .aft-prescription-buttons .aft-button-subtle {
        flex: 1 1 calc(33.333% - 20px); /* Each button takes up 1/3 of the space with a gap */
        min-width: 100px;
        text-align: center;
    }
}

@media (max-width: 480px) { /* Very small screens */
    .aft-prescription-title {
        font-size: 1.5em; /* Further adjust font size for very small screens */
    }

    .aft-prescription-description {
        font-size: 0.9em; /* Adjust description font size for very small screens */
    }

    .aft-prescription-buttons .aft-button-subtle,
    .aft-prescription-country-links .aft-button-subtle {
        flex: 1 1 100%; /* Each button takes up the full width */
        font-size: 0.9em; /* Adjust button font size for very small screens */
        padding: 8px 16px; /* Adjust button padding for very small screens */
    }

    .aft-prescription-country-links .aft-button-subtle {
        text-align: center;
    }

}

@media (min-width: 1025px) {
    .aft-prescription-image-xl .aft-prescription-image-wrapper {
        min-width: 550px; /* Minimum width to prevent wrapping */
    }
    .aft-prescription-image-xl .aft-prescription-image img {
        padding-left: 0rem;
        padding-right: 1rem;
    }
}