/*
Theme Name: Casual Theme
Theme URI: https://wordpress.casualfridays.nz/
Author: Casual Fridays
Author URI: http://www.casualfridays.co.nz/
Description: This is the Casual block theme developed for the future of Wordpress.
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 5.7
Version: 2.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: http://www.casualfridays.co.nz/
Tags: blog, news, portfolio, grid-layout, one-column, two-columns, three-columns, four-columns, five-columns, six-columns, wide-blocks, full-width-blocks, block-styles, custom-colors, custom-logo, featured-image-header, full-site-editing.
*/

/* =============================================================================
   Table of Contents
   1. Defaults
   2. Site Content
   3. Scroll Effects
   4. Fade Effects
   5. Rotating Sentence
   6. Testimonial Slider
   7. Projects Archive
   8. Site Header & Navigation
   9. Transparent Header
   10. Scroll Down
   11. Site Footer
   12. Plugins
   13. Media Queries
       — max-width: 781px
       — min-width: 600px
============================================================================= */


/* =============================================================================
   1. Defaults
============================================================================= */

html {
    font-size: 16px;
}


/* =============================================================================
   2. Site Content
============================================================================= */

.site-content {
    margin-block-start: 0;
}

/* Hero Chevron */
.hero-intro {
    position: relative;
    overflow: hidden;
}

.hero-intro::after {
    content: '';
    position: absolute;
    top: 0;
    right: 1rem;
    width: 45%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1053.23 1430.23'%3E%3Cdefs%3E%3CclipPath id='clippath'%3E%3Cpath d='M34.67,1368.79h0c-54.4-67.75-43.58-166.77,24.17-221.17,1.33-1.07,2.68-2.12,4.05-3.15l562.46-429.36L62.88,285.76C-6.6,233.6-20.65,134.98,31.52,65.49c1.03-1.37,2.08-2.72,3.15-4.06C90.31-8.12,193.14-20.46,264.36,33.88l726.01,554.19c39.05,29.49,62.26,75.39,62.85,124.32.02.9,0,1.81,0,2.71v2.71c-.59,48.93-23.8,94.84-62.85,124.32l-726.01,554.19c-71.46,54.29-173.1,42.1-229.69-27.55h0Z' style='fill:none;'/%3E%3C/clipPath%3E%3ClinearGradient id='linear-gradient' x1='-200.1' y1='1438.72' x2='-200.1' y2='1441.89' gradientTransform='translate(68146.44 658112.11) scale(337.98 -456.44)' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23284f64'/%3E%3Cstop offset='1' stop-color='%233787c1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg style='clip-path:url(%23clippath);'%3E%3Cg id='Group_140'%3E%3Crect id='Rectangle_637' x='-20.97' y='-20.46' width='1074.2' height='1450.68' style='fill:url(%23linear-gradient);'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");    background-repeat: no-repeat;
    background-size: contain;
    background-position: center right;
}

.hero-intro-content {
    position: relative;
    z-index: 1;
}

/* =============================================================================
   3. Scroll Effects
============================================================================= */

.scroll-speed-1, .scroll-speed-2, .scroll-speed-3,
.scroll-speed-4, .scroll-speed-5, .scroll-speed-6,
.scroll-direction-left, .scroll-direction-right {
    position: relative;
    z-index: 10;
    will-change: transform;
    transition: transform 0.05s linear;
}

.wp-block-columns .has-scroll-effect,
.wp-block-column .has-scroll-effect,
.wp-block-group .has-scroll-effect {
    overflow: visible !important;
}


/* =============================================================================
   4. Fade Effects
============================================================================= */

.js .fadeup-effect,
.js .fadedown-effect,
.js .faderight-effect,
.js .fadeleft-effect {
    opacity: 0;
    will-change: transform, opacity;
}


/* =============================================================================
   5. Rotating Sentence
============================================================================= */

.rotating-sentence-wrap {
    min-height: 2rem; /* CSS fallback before JS measures */
    position: relative;
}

.rotating-sentence-wrap h1,
.rotating-sentence-wrap h2,
.rotating-sentence-wrap h3,
.rotating-sentence-wrap h4,
.rotating-sentence-wrap h5,
.rotating-sentence-wrap h6 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}


/* =============================================================================
   6. Testimonial Slider
============================================================================= */

.testimonial-slider-wrap {
    position: relative;
}

/* Inner layout — chevron arrows flank the content */
.testimonial-slider-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Content area — items stack absolutely so they crossfade cleanly */
.testimonial-content-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    min-height: 180px; /* CSS fallback before JS measures */
}

.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.testimonial-item .testimonial-quote {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.testimonial-item .testimonial-name {
    font-weight: 600;
    margin: 0 0 0.2rem;
}

.testimonial-item .testimonial-company {
    font-size: 0.9rem;
    opacity: 0.65;
    margin: 0;
}

/* Minimal chevron arrows */
.testimonial-arrow {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    color: currentColor;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.testimonial-arrow:hover {
    opacity: 1;
}

/* Circle dots */
.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 0.25rem;
}

.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: currentColor;
    opacity: 0.2;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.testimonial-dot.active {
    opacity: 1;
    transform: scale(1.3);
    background: var(--wp--preset--color--accent-one-color) !important;
}


/* =============================================================================
   7. Projects Archive
============================================================================= */

.site-content.projects .wp-block-post-template {
    display: grid;
}

/* Card wrapper */
.site-content.projects .post-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Featured image */
.site-content.projects .wp-block-post-featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Overlay */
.site-content.projects .post-contents {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2rem;
    box-sizing: border-box;
    gap: 1rem;
}

.site-content.projects .wp-block-post-title,
.site-content.projects .wp-block-read-more,
.site-content.projects .wp-block-post-excerpt,
.site-content.projects .wp-block-post-excerpt__more-link {
    position: static !important;
    display: block;
    margin: 0;
}

.site-content.projects .wp-block-post-title a,
.site-content.projects .wp-block-read-more a,
.site-content.projects .wp-block-post-excerpt,
.site-content.projects .wp-block-post-excerpt__more-link {
    text-decoration: none;
    color: #fff;
    text-align: left;
}

.site-content.projects .post-contents .wp-block-post-title,
.site-content.projects .post-contents .wp-block-read-more,
.site-content.projects .post-contents .wp-block-post-excerpt {
    margin: 0 !important;
    align-self: flex-start;
    max-width: 100% !important;
    display: inline-block;
    text-align: left;
    color: #fff;
    text-decoration: none;
}


/* =============================================================================
   8. Site Header & Navigation
============================================================================= */

.site-footer-leader {
    opacity: 0.85;
}


/* =============================================================================
   9. Transparent Header
============================================================================= */

[class*="template-transparent-header"] .site-header {
    background-color: transparent;
    position: fixed;
    width: 100%;
    z-index: 99;
    color: #ffffff;
}

[class*="template-transparent-header"] .fixed-header .site-header {
    background-color: #ffffff;
    color: #222222;
}

[class*="template-transparent-header"] .wp-block-cover .page-title-banner {
    margin-top: -77px;
    z-index: 0;
}


/* =============================================================================
   10. Scroll Down
============================================================================= */

.scroll-down a {
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 2;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none !important;
    transition: opacity 0.3s;
}

.scroll-down a:hover,
.scroll-down a:focus {
    opacity: 0.5;
}

#scroll a span {
    position: absolute;
    top: -50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    border-left: 1px solid #fff;
    border-bottom: 1px solid #fff;
    transform: rotate(-45deg);
    animation: sdb05 1.5s infinite;
    box-sizing: border-box;
}

@keyframes sdb05 {
    0%   { transform: rotate(-45deg) translate(0, 0); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: rotate(-45deg) translate(-20px, 20px); opacity: 0; }
}


/* =============================================================================
   11. Site Footer
   (footer-specific styles go here)
============================================================================= */


/* =============================================================================
   12. Plugins
   (plugin-specific styles go here)
============================================================================= */


/* =============================================================================
   13. Media Queries
============================================================================= */

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

    /* Font size adjustments */
    h1 { font-size: clamp(1.8rem, 6vw, 2.027rem); }
    h2 { font-size: clamp(1.6rem, 5.5vw, 1.802rem); }
    h3 { font-size: clamp(1.4rem, 5vw, 1.602rem); }
    h4 { font-size: clamp(1.3rem, 4.5vw, 1.424rem); }
    h5 { font-size: clamp(1.1rem, 4vw, 1.266rem); }
    h6 { font-size: clamp(1rem, 3.5vw, 1.125rem); }

    /* Column width adjustments */
    .wp-block-columns.half-stack-only > .wp-block-column    { flex-basis: 45% !important; }
    .wp-block-columns.third-stack-only > .wp-block-column   { flex-basis: 33% !important; }
    .wp-block-columns.quarter-stack-only > .wp-block-column { flex-basis: 25% !important; }

    .reverse-stack-on-mobile {
        display: flex !important;
        flex-direction: column-reverse;
    }

    /* Scroll down */
    .scroll-down a { display: none; }

    /* Remove fade effect delays on mobile */
    .js .fadeup-effect-2,   .js .fadedown-effect-2,
    .js .faderight-effect-2,.js .fadeleft-effect-2,
    .js .fadeup-effect-3,   .js .fadedown-effect-3,
    .js .faderight-effect-3,.js .fadeleft-effect-3,
    .js .fadeup-effect-4,   .js .fadedown-effect-4,
    .js .faderight-effect-4,.js .fadeleft-effect-4 {
        animation-delay: 0s;
    }

    .frontpage-1 {
        min-height: 60vh !important;
    }

    /* Testimonial slider — hide arrows, dots remain */
/* Testimonial slider — full width on mobile */
.testimonial-slider-inner {
    display: block;
}

.testimonial-arrow {
    display: none;
}

.testimonial-content-wrap {
    width: 100%;
}

/* Circle dots */
.testimonial-dots {
    margin-top: 1rem;
}

.hero-intro::after {
    display: none;
}

}

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

    /* Fixed header on scroll */
    .fixed-header .site-header {
        position: fixed;
        top: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
        padding-top: 0.25em !important;
        padding-bottom: 0.25em !important;
        transition: all 100ms ease-in-out;
        z-index: 99;
    }
}