/*
Theme Name: Wessex Resins & Adhesives
Description: Bespoke theme for WRA built with ACF Pro
Theme URI: https://wessexresins.co.uk/
Author: Adam Greenough  
Author URI: https://adamgreenough.net/
Version: 1.0
*/

/* ============================
   SETTINGS
   ============================ */

:root {
    --primary: #ad1d3f;
    --primary-hover: #c9294f;
    --primary-light: #fce8ec;
    --secondary: #11172c;

    --text: #1f2842;

    --gray: #5d6770;
    --light-gray: #f5f5f5;

    --border-color: #e5e5e5;
    --border-radius: 4px;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;

    font-size: 21px;
    @media(max-width: 1800px) { font-size: 20px; }
    @media(max-width: 1500px) { font-size: 19px; }
    @media(max-width: 1300px) { font-size: 18px; }
    @media(max-width: 1100px) { font-size: 17px; }
}

/* ============================
   RESET
   ============================ */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    color: var(--text);
    font-weight: 500;
}

/* Prevent horizontal overflow caused by AOS transforms or off-canvas elements on small screens.
   Target section tags only since all AOS animations are inside them. */
section {
    overflow-x: clip;
}

/* AOS hint — reduce chances of subpixel overflow from transforms and improve GPU compositing */
[data-aos],
.aos-animate {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
    border: 2px solid var(--light-gray);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--light-gray);
}

/* Text selection color */
::selection {
    background-color: var(--primary);
    color: white;
}

::-moz-selection {
    background-color: var(--primary);
    color: white;
}

/* ============================
   AOS (Animate On Scroll) Fixes
   ============================ */

/* Wrapper for posts grid items to separate AOS animation from hover effects */
.posts-grid .post-wrapper {
    height: 100%;
}

/* ============================
   Blockquote Image Fit
   ============================ */

/* Remove padding and adjust object-fit for cover mode */
.blockquote-block .author-image.image-cover {
    padding: 0;
}

.blockquote-block .author-image.image-cover img {
    object-fit: cover;
}

.blockquote-block .author-image.image-contain img {
    object-fit: contain;
}

/* ============================
   TYPOGRAPHY
   ============================ */

p {
    text-wrap: pretty;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 1rem;

    &.lead {
        color: var(--secondary);
        font-weight: 600;
        font-size: 1.1rem;
        line-height: 1.5;
    }

    &:last-child {
        margin-bottom: 0;
    }
}

ul, ol {
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    
    &:last-child {
        margin-bottom: 0;
    }
    
    li {
        margin-bottom: 0.5rem;
        padding-left: 0.25rem;
        
        &:last-child {
            margin-bottom: 0;
        }
        
        &::marker {
            color: var(--primary);
            font-weight: 700;
        }
    }
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);

    &:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }
}

mark {
    background-color: var(--primary-light);
    color: var(--text);
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

/* Global Heading Styles with Fluid Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
    text-wrap: pretty;
    color: var(--secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-margin-top: 100px;
    
    &:not(:first-child, h1) {
        margin-top: 2rem;
    }
}

.section-subtitle + h1,
.section-subtitle + h2,
.section-subtitle + h3,
.section-subtitle + h4,
.section-subtitle + h5,
.section-subtitle + h6 {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.5rem, 1.5rem + 3vw, 3.6rem);
    margin-bottom: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    text-wrap: balance;
    font-weight: 800;
    line-height: 1;
}

h2 {
    font-size: clamp(1.7rem, 1.1rem + 2vw, 2.4rem); 
    margin-bottom: clamp(1rem, 0.8rem + 0.7vw, 1.25rem);
}

h3 {
    font-size: clamp(1.2rem, 0.9rem + 1.2vw, 1.6rem); 
    margin-bottom: clamp(0.8rem, 0.7rem + 0.4vw, 1rem);
}

h4 {
    font-size: clamp(1.1rem, 0.85rem + 0.8vw, 1.4rem); 
}

h5 {
    font-size: clamp(1rem, 0.8rem + 0.3vw, 1.2rem); 
    font-weight: 600;
}

h6 {
    font-size: clamp(0.9rem, 0.85rem + 0.1vw, 1rem); 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

section {
    position: relative;
    z-index: 1;
    background: #fff;
}

/* Table Styles */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    margin: 2rem 0;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
    font-size: 0.875rem;
}

table thead {
    background: var(--light-gray);
}

table th {
    padding: 0.875rem 1rem !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: var(--secondary) !important;
    border: 1px solid #e5e5e5 !important;
    white-space: nowrap !important;
    vertical-align: top !important;
    background: var(--light-gray) !important;
}

table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:nth-child(even) {
    background: #fafafa;
}

table tbody tr:hover {
    background: var(--light-gray);
}

table tbody td {
    padding: 0.875rem 1rem !important;
    border: 1px solid #e5e5e5 !important;
    color: var(--text) !important;
    vertical-align: top !important;
}

@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: auto;
        display: block;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
}

/* =========================
   Search Results Page
   ========================= */

.search-results-page {
    padding: 4rem 0;
    background: var(--light-gray);
    min-height: 70vh;
}

.search-results-header {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    
    h1 {
        font-size: clamp(2rem, 4vw, 2.5rem);
        margin-bottom: 1rem;
        color: var(--secondary);
    }
    
    .search-query {
        font-size: 1.125rem;
        color: var(--text);
        margin-bottom: 0.5rem;
        
        strong {
            color: var(--primary);
        }
    }
    
    .search-count {
        font-size: 0.9375rem;
        color: var(--gray);
        margin-bottom: 2rem;
    }
}

.search-form-wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    
    .search-form {
        display: flex;
        gap: 0.5rem;
        max-width: 600px;
        
        .search-field {
            flex: 1;
            padding: 0.75rem 1.25rem;
            border: 1px solid #e5e5e5;
            border-radius: var(--border-radius);
            font-size: 1rem;
            transition: var(--transition);
            margin: 0;
            
            &:focus {
                outline: none;
                border-color: var(--primary);
                box-shadow: 0 0 0 3px rgba(173, 29, 63, 0.1);
            }
        }
        
        .search-submit {
            padding: 0.625rem 1rem;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            
            &:hover {
                background: var(--primary-hover);
            }
            
            svg {
                width: 24px;
                height: 24px;
                fill: white;
            }
        }
    }
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result-item {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid #e5e5e5;
    transition: var(--transition);
    
    &:hover {
        box-shadow: 0 6px 12px rgba(0,0,0,0.08);
        transform: translateY(-2px);
    }
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    
    .search-result-type {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        background: var(--primary);
        color: white;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-radius: var(--border-radius);
    }
    
    .search-result-date {
        font-size: 0.875rem;
        color: var(--gray);
    }
}

.search-result-title {
    font-size: 1.5rem;
    margin-top: 1.5rem !important;
    margin-bottom: 1rem;
    
    a {
        color: var(--secondary);
        text-decoration: none;
        transition: color 0.2s ease;
        
        &:hover {
            color: var(--primary);
        }
    }
}

.search-result-excerpt {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.search-result-thumbnail {
    margin-bottom: 1rem;
    
    img {
        width: 100%;
        max-width: 300px;
        height: auto;
        border-radius: var(--border-radius);
    }
}

.search-result-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    
    &:hover {
        gap: 0.75rem;
        
        svg {
            transform: translateX(4px);
        }
    }
    
    svg {
        transition: transform 0.2s ease;
    }
}

.search-no-results-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 3rem;
    margin-bottom: 3rem;
    
    svg {
        color: var(--gray);
        margin-bottom: 1.5rem;
        opacity: 0.5;
        width: 64px;
        height: 64px;
    }
    
    h2 {
        font-size: 2rem;
        color: var(--secondary);
        margin-bottom: 1rem;
    }
    
    p {
        font-size: 1.125rem;
        color: var(--text);
        margin-bottom: 2rem;
    }
}

.search-suggestions {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    
    h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        color: var(--secondary);
    }
    
    ul {
        list-style: none;
        padding: 0;
        
        li {
            padding: 0.5rem 0;
            padding-left: 1.5rem;
            position: relative;
            
            &:before {
                content: "→";
                position: absolute;
                left: 0;
                color: var(--primary);
                font-weight: 700;
            }
        }
    }
}

@media (max-width: 768px) {
    .search-results-header {
        padding: 2rem 1.5rem;
    }
    
    .search-result-item {
        padding: 1.5rem;
    }
    
    .search-form-wrapper .search-form {
        flex-direction: column;
        
        .search-submit {
            width: 100%;
        }
    }
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

.tag {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--border-radius);
    padding: 0.5rem 1.2rem;
}

/* ============================
   ANIMATIONS
   ============================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================
   BUTTONS
   ============================ */

a.button,
button.button {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
    border: none;
    cursor: pointer;
    position: relative;
    will-change: transform;
    border-radius: var(--border-radius);
    font-family: inherit;
    line-height: 1.5;

    &::before {
        width: 100%;
        height: 100%;
        content: "";
        position: absolute;
        top: 4px;
        left: 4px;
        border: solid 2px var(--primary);
        border-radius: var(--border-radius);
        z-index: -1;
        transition: var(--transition);
    }
    
    &:hover, &:focus {
        background-color: var(--primary-hover);
        color: white;

        &::before {
            border-color: var(--primary-hover);
        }
    }

    &:active {
        transform: translate(2px, 2px);

        &::before {
            top: 0px;
            left: 0px;
        }
    }
    
    &.secondary, &.secondary-cta {
        background-color: var(--secondary);
        
        &::before {
            border-color: var(--secondary);
        }
        
        &:hover, &:focus {
            background-color: color-mix(in srgb, var(--secondary) 95%, white);
            
            &::before {
                border-color: color-mix(in srgb, var(--secondary) 95%, white);
            }
        }
    }
    
    &.outline {
        background-color: transparent;
        border: 2px solid var(--primary);
        color: var(--primary);
        
        &:hover, &:focus {
            background-color: var(--primary);
            color: white;
        }
    }
}

/* ============================
   CONTAINERS
   ============================ */

.container {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
}

/* ============================
   HEADER
   ============================ */

#topper {
    background: var(--secondary);
    color: white;
    font-size: 0.85rem;
    padding: 0.75rem 0;
    position: relative;
    z-index: 1;

    .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        @media (max-width: 767px) {
            flex-direction: column;
            gap: 0.5rem;
        }
    }

    .topper-contact {
        display: flex;
        gap: 1.5rem;
        font-size: 0.8rem;
        
        @media (max-width: 767px) {
            gap: 1rem;
            flex-wrap: wrap;
            justify-content: center;
        }
        
        a {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: white;
            text-decoration: none;
            transition: var(--transition);
            
            &:hover {
                color: var(--primary);
            }
            
            .material-symbols-outlined {
                font-size: 1.1rem;
                color: var(--primary);
            }
        }
    }

    .topper-brands {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        line-height: 1;
        
        @media (max-width: 767px) {
            margin-top: 0.25rem;
        }
        
        ul {
            display: flex;
            justify-content: center;
            align-items: center;
            list-style: none;
            padding: 0;
            margin: 0 0 0 0.5rem;
            gap: 1rem;
            
            @media (max-width: 767px) {
                gap: 0.75rem;
            }

            li {
                margin: 0;
                padding: 0;
                line-height: 1;
                
                &::marker {
                    content: none;
                }
                
                a {
                    display: flex;
                    align-items: center;
                    gap: 0.3rem;
                    padding: 0;
                    margin: 0;
                    color: white;
                    text-decoration: none;
                    font-weight: 600;
                    text-transform: uppercase;
                    letter-spacing: 0.03em;
                    font-size: 0.8rem;
                    line-height: 1;
                    transition: var(--transition);

                    &:hover {
                        color: var(--primary);

                        .material-symbols-outlined {
                            color: white;
                            opacity: 1;
                        }
                    }
                    
                    .material-symbols-outlined {
                        font-size: 0.8rem;
                        line-height: 1;
                        opacity: 0.5;
                        color: white;
                        transition: var(--transition);
                    }
                }
            }
        }
    }
}

/* Hide topper menu at hamburger menu breakpoint (1200px) */
@media (max-width: 1200px) {
    #topper {
        display: none;
    }
}

/* ============================
   MASTHEAD
   ============================ */

/* WordPress admin bar compatibility with sticky header */
.admin-bar #masthead {
    top: 32px; /* Default admin bar height */
    
    @media screen and (max-width: 782px) {
        top: 46px; /* WordPress changes admin bar height on mobile */
    }
    
    @media screen and (max-width: 600px) {
        /* WordPress admin bar becomes fixed on mobile scroll */
        position: absolute;
        left: 0;
        right: 0;
        width: 100%;
        
        &.scrolled {
            position: fixed;
            top: 0;
        }
    }
}

/* Add padding to body when admin bar is present on mobile */
.admin-bar {
    @media screen and (max-width: 600px) {
        /* Add padding to prevent content overlap with absolutely positioned header */
        padding-top: 70px; /* Adjust this value based on your header height */
        
        /* Reset padding when header becomes fixed */
        &.scrolled-header {
            padding-top: 0;
        }
    }
}

#masthead {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%; /* Ensure full width */
    transition: box-shadow 0.3s ease, padding 0.3s ease; /* Add transition for padding */

    .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative; /* Ensure proper positioning context */
    }

    .masthead-logo {
        flex: 0 0 auto;
        position: relative;
        z-index: 101;
        
        a {
            display: block;
            
            img {
                height: 2.8rem;
                width: auto;
                display: block;
                margin-top: 0.1rem;
                transition: height 0.3s ease; /* Add transition for image height */
                
                @media (max-width: 767px) {
                    height: 2.2rem;
                }
            }
        }
    }

    .masthead-menu {
        display: flex;
        margin: 0;
        padding: 0;
        list-style: none;
        gap: 1rem;
        
        @media (max-width: 1200px) {
            display: none; /* Updated breakpoint from 991px to 1200px */
        }
        
        > li {
            position: relative;
            margin-bottom: 0;
            padding-left: 0;
            
            &::marker {
                content: none;
            }
            
            > a {
                display: block;
                padding: 1rem;
                color: var(--secondary);
                text-decoration: none;
                font-size: 1rem;
                font-weight: 500;
                transition: var(--transition);
                white-space: nowrap;
                
                &:hover, &:focus {
                    color: var(--primary);
                }
            }
            
            &.menu-item-has-children > a {
                padding-right: 1.8rem;
                position: relative;
                
                &::after {
                    content: "keyboard_arrow_down";
                    font-family: 'Material Symbols Outlined';
                    position: absolute;
                    right: 0.45rem;
                    top: 52%;
                    transform: translateY(-50%);
                    font-size: 1.1rem;
                    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
                    transition: var(--transition);
                    color: var(--primary);
                }
                
                &:hover::after {
                    opacity: 0.8;
                }
            }
            
            > ul.sub-menu {
                position: absolute;
                top: 100%;
                left: 0;
                background: white;
                border-radius: 4px;
                margin: 0;
                padding: 0.5rem 0;
                min-width: 235px;
                box-shadow: var(--shadow);
                opacity: 0;
                visibility: hidden;
                transform: translateY(10px);
                transition: var(--transition);
                z-index: 100;
                list-style: none;
                
                li {
                    margin-bottom: 0;
                    padding-left: 0;
                    
                    &::marker {
                        content: none;
                    }
                }
                
                > li {
                    list-style: none;
                    position: relative;
                    
                    > a {
                        display: block;
                        padding: 0.5rem 1rem;
                        color: var(--secondary);
                        text-decoration: none;
                        font-size: 0.9rem;
                        transition: var(--transition);
                        
                        &:hover, &:focus {
                            color: var(--primary);
                            background-color: var(--light-gray);
                        }
                    }
                    
                    &.menu-item-has-children > a {
                        padding-right: 2rem;
                        position: relative;
                        
                        &::after {
                            content: "chevron_right";
                            font-family: 'Material Symbols Outlined';
                            position: absolute;
                            right: 0.7rem;
                            top: 50%;
                            transform: translateY(-50%);
                            font-size: 1rem;
                            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
                            transition: var(--transition);
                            color: var(--primary);
                        }
                        
                        &:hover::after {
                            transform: translateY(-50%) translateX(2px);
                            opacity: 0.8;
                        }
                    }
                    
                    > ul.sub-menu {
                        position: absolute;
                        top: 0;
                        left: 100%;
                        background: white;
                        border-radius: 4px;
                        margin: 0;
                        padding: 0.5rem 0;
                        min-width: 235px;
                        box-shadow: var(--shadow);
                        opacity: 0;
                        visibility: hidden;
                        transform: translateX(10px);
                        transition: var(--transition);
                        list-style: none;
                        
                        li {
                            margin-bottom: 0;
                            padding-left: 0;
                            
                            &::marker {
                                content: none;
                            }
                        }
                        
                        > li {
                            list-style: none;
                            
                            > a {
                                display: block;
                                padding: 0.5rem 1rem;
                                color: var (--secondary);
                                text-decoration: none;
                                font-size: 0.9rem;
                                transition: var (--transition);
                                
                                &:hover, &:focus {
                                    color: var(--primary);
                                    background-color: var(--light-gray);
                                }
                            }
                        }
                    }
                    
                    &:hover > ul.sub-menu,
                    &:focus-within > ul.sub-menu {
                        opacity: 1;
                        visibility: visible;
                        transform: translateX(0);
                    }
                }
            }
            
            &:hover > ul.sub-menu,
            &:focus-within > ul.sub-menu {
                opacity: 1;
                visibility: visible;
                transform: translateY(0);
            }
        }
        
        .current-menu-item > a {
            color: var(--primary); /* Only highlight current page */
        }
        
        .current-menu-parent > a {
            color: var(--secondary); /* Reset parent to default color */
        }
    }

    .masthead-nav {
        transition: opacity 0.3s ease, visibility 0.3s ease;
        opacity: 1;
        visibility: visible;
        position: relative;
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .masthead-search-form {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center; /* Center the search form */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        padding: 0;
        
        /* Constrain the search form width and position */
        & form {
            position: relative;
            width: 100%;
            max-width: 50%; /* Limit width to avoid overlapping */
            margin: 0 auto; /* Center the form */
            
            @media (max-width: 991px) {
                max-width: 70%;
            }
            
            @media (max-width: 767px) {
                max-width: 60%; /* Smaller on mobile */
                margin: 0 auto 0 calc(35% - 2rem); /* Adjust to balance whitespace */
            }
        }
        
        .search-submit {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%) translateX(10px); /* Center vertically and start with horizontal offset */
            background: none;
            border: none;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.3s ease, transform 0.3s ease;
            z-index: 10; /* Higher z-index to ensure visibility */
            height: 1.5rem; /* Explicit height */
            width: 1.5rem; /* Explicit width */
        }
        
        .search-icon {
            color: var(--primary);
            font-size: 1.3rem;
            transition: var(--transition);
            display: block; /* Ensure icon is block-level */
        }
        
        input[type="search"] {
            width: 100%;
            border: none;
            border-bottom: 2px solid var(--primary);
            padding: 0.6rem 2rem 0.6rem 0;
            font-size: 1.1rem;
            background: transparent;
            color: var(--secondary);
            text-align: left;
            
            &::-webkit-search-cancel-button,
            &::-webkit-search-decoration,
            &::-webkit-search-results-button,
            &::-webkit-search-results-decoration {
                -webkit-appearance: none;
                appearance: none;
                display: none;
            }
            
            &::-ms-clear,
            &::-ms-reveal {
                display: none;
                width: 0;
                height: 0;
            }
            
            &:focus {
                outline: none;
            }
            
            &::placeholder {
                color: var(--gray);
                opacity: 0.7;
            }
        }
    }
    
    &.search-active {
        .masthead-nav {
            opacity: 0;
            visibility: hidden;
        }
        
        .masthead-search-form {
            opacity: 1;
            visibility: visible;
            
            .search-submit {
                opacity: 1;
                transform: translateY(-50%) translateX(0); /* Keep vertical centering when visible */
                transition-delay: 0.1s;
                
                &:hover .search-icon {
                    color: var(--primary-hover);
                }
            }
            
            input[type="search"] {
                animation: slideDown 0.3s forwards;
            }
        }
    }

    .masthead-cta {
        display: flex;
        align-items: center;
        gap: 1rem;
        position: relative;
        z-index: 101; /* Same as logo */
        
        /* Hide the CTA button on small screens */
        @media (max-width: 500px) {
            .button {
                display: none;
            }
        }
        
        #masthead-search {
            background: none;
            border: none;
            padding: 0.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--secondary);
            transition: var(--transition);
            position: relative; /* For icon positioning */
            
            &:hover, &:focus {
                color: var(--primary);
            }
            
            .material-symbols-outlined {
                font-size: 1.4rem;
            }

            .search-icon {
                opacity: 1;
                transition: opacity 0.3s ease;
            }
            
            .close-icon {
                position: absolute;
                opacity: 0;
                transition: opacity 0.3s ease;
                font-size: 1.3rem;
            }
        }
    }
    
    &.search-active #masthead-search {
        .search-icon {
            opacity: 0;
        }
        
        .close-icon {
            opacity: 1;
        }
    }
    
    /* Add subtle shadow when scrolled and make it more compact */
    &.scrolled {
        padding: 0.75rem 0; /* Reduce padding when scrolled */
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        
        .masthead-logo img {
            height: 2.4rem; /* Slightly smaller logo when scrolled */
            
            @media (max-width: 767px) {
                height: 1.9rem;
            }
        }
        
        .masthead-menu > li > a {
            padding-top: 0.8rem;
            padding-bottom: 0.8rem;
        }
    }

    /* Hamburger Icon */
    .hamburger-menu {
        display: none;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 200;
        margin-left: 1rem;
        position: relative;
        
        @media (max-width: 1200px) {
            display: flex;
        }
        
        span {
            display: block;
            height: 2px;
            width: 100%;
            background-color: var(--secondary);
            border-radius: 2px;
            transition: all 0.3s ease;
            transform-origin: left;
        }
        
        &.active {
            span:first-child {
                transform: rotate(45deg);
            }
            
            span:nth-child(2) {
                opacity: 0;
                transform: scaleX(0);
            }
            
            span:last-child {
                transform: rotate(-45deg);
            }
        }
    }
    
    /* For devices under 1200px */
    @media (max-width: 1200px) {
        .masthead-cta {
            margin-left: auto; /* Push to right */
            
            /* Hide search button in mobile mode */
            #masthead-search {
                display: none !important;
            }
        }
        
        /* Hide search form in mobile mode */
        .masthead-search-form {
            display: none;
        }
    }
}

/* ============================
   MOBILE MENU OVERLAY - IMPROVED
   ============================ */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 21, 38, 0.7); /* Darker, semi-transparent background using secondary color */
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px); /* Add blur effect */
    -webkit-backdrop-filter: blur(5px); /* For Safari support */
    cursor: pointer; /* Indicate it's clickable */
    
    &.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ============================
   MOBILE MENU - COMPLETELY SIMPLIFIED
   ============================ */

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    max-width: 90%;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 160;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    &.active {
        right: 0;
    }
    
    .mobile-menu-inner {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 0;
        
        /* Simplified mobile menu */
        .mobile-menu {
            list-style: none;
            margin: 0;
            padding: 0 1.5rem;
            
            li {
                position: relative;
            }
            
            /* Basic link styling */
            a {
                display: block;
                padding: 0.75rem 0;
                color: var(--secondary);
                text-decoration: none;
                font-weight: 500;
                border-bottom: 1px solid var(--border-color);
            }
            
            /* Only current item gets highlight */
            .current-menu-item > a {
                color: var(--primary);
                font-weight: 600;
            }
            
            /* Simple toggle button */
            .toggle-button {
                position: absolute;
                right: 0;
                top: 10px;
                width: 30px;
                height: 30px;
                background: transparent;
                border: none;
                cursor: pointer;
                z-index: 2;
                
                &:before, &:after {
                    content: '';
                    display: block;
                    background-color: var(--primary);
                    position: absolute;
                }
                
                /* Horizontal line */
                &:before {
                    width: 16px;
                    height: 2px;
                    top: 14px;
                    left: 7px;
                }
                
                /* Vertical line (for plus sign) */
                &:after {
                    width: 2px;
                    height: 16px;
                    top: 7px;
                    left: 14px;
                    transition: transform 0.2s ease;
                }
                
                /* When submenu is open, hide vertical bar (minus sign) */
                &.active:after {
                    transform: rotate(90deg);
                    opacity: 0;
                }
            }
            
            /* Simple submenu styling */
            .sub-menu {
                display: none; /* Hidden by default */
                list-style: none;
                margin: 0;
                padding: 0 0 0 1rem; /* Simple indentation */
                border-left: 2px solid var(--primary); /* Colored border */
                
                /* Override any WordPress behavior */
                &.shown-by-default {
                    display: none !important;
                }
                
                /* Last item in submenu shouldn't have a border */
                > li:last-child > a {
                    border-bottom: none;
                }
            }
            
            /* Only show submenu when explicitly toggled */
            .menu-item.open > .sub-menu {
                display: block;
            }
        }
    }
    
    .mobile-menu-top {
        padding: 1.2rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        background-color: var(--light-gray);
        
        /* Enhanced mobile search styling */
        .mobile-search-form {
            position: relative;
            
            form {
                display: flex;
                align-items: center;
            }
            
            input[type="search"] {
                width: 100%;
                padding: 0.7rem 3rem 0.7rem 1rem;
                border: 2px solid var(--border-color);
                border-radius: 50px;
                font-size: 0.9rem;
                transition: var(--transition);
                background-color: white;
                
                &:focus {
                    outline: none;
                    border-color: var(--primary);
                    box-shadow: 0 0 0 3px rgba(173, 29, 63, 0.1);
                }
                
                &::placeholder {
                    color: var(--gray);
                    opacity: 0.7;
                }
            }
            
            button {
                position: absolute;
                right: 0.5rem;
                top: 50%;
                transform: translateY(-50%);
                background: none;
                border: none;
                cursor: pointer;
                padding: 0.5rem;
                color: var(--primary);
                display: flex;
                align-items: center;
                justify-content: center;
                transition: var(--transition);
                
                .material-symbols-outlined {
                    font-size: 1.2rem;
                }
                
                &:hover {
                    color: var(--primary-hover);
                }
            }
        }
    }
    
    .mobile-menu-bottom {
        padding: 1.5rem;
        border-top: 1px solid var(--border-color);
        
        .mobile-cta {
            text-align: center;
            
            .button {
                display: inline-block;
                width: 100%;
            }
        }
    }
    
    /* Mobile Menu Search - Keep this visible */
    .mobile-search-form {
        display: block !important; /* Ensure mobile menu search remains visible */
    }
}

/* Lock body when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* ============================
   UTILITIES
   ============================ */

.overlay-darken {
    background-color: #0F1526;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    z-index: 0;
    mix-blend-mode: darken;
}

.light-bg {
    background-color: var(--light-gray);
}

/* ============================
   FOOTER
   ============================ */

#site-footer {
    background: white;
    padding: 0;
    z-index: 1;
    position: relative;
    
    .footer-top {
        padding: 2.5rem 0 2rem;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        overflow: hidden;
        
        &::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 60%;
            background-image: url('/wp-content/uploads/2025/11/fM5v680A.jpg');
            background-size: cover;
            background-position: right center;
            background-repeat: no-repeat;
            opacity: 0.15;
            filter: grayscale(100%);
            mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
            -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
            pointer-events: none;
            z-index: 0;
        }
        
        .container {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 2.5rem;
            position: relative;
            z-index: 1;
        }
    }
    
    .footer-info {
        flex: 1;
        max-width: 700px;
    }
    
    /* Horizontal layout for logo and text */
    .footer-logo-text {
        display: flex;
        align-items: flex-start;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .footer-logo {
        margin-bottom: 0; /* Remove extra margin since it's handled by the gap */
        
        img {
            height: 2.75rem;
            width: auto;
        }
    }
    
    .footer-text {
        color: var(--gray);
        font-size: 0.95rem;
        line-height: 1.5;
        margin-top: 0rem;
        flex: 1;
        min-width: 250px;
        border-left: solid 1px var(--border-color);
        padding-left: 1.5rem;
        
        @media (max-width: 767px) {
            border-left: none;
            padding-left: 0;
            min-width: 100%;
        }
    }
    
    /* Footer Logos Bar */
    .footer-logos-bar {
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        background: white;
        
        /* Remove container padding on mobile for full-width carousel */
        @media (max-width: 999px) {
            padding: 2.5rem 0; /* Increased padding */
            
            .container {
                padding-left: 0;
                padding-right: 0;
                max-width: 100%;
            }
        }
        
        .accreditation-logos {
            /* Swiper container */
            width: 100%;
            
            .swiper-wrapper {
                display: flex;
                flex-wrap: wrap;
                gap: 2rem;
                align-items: center;
                justify-content: space-between;
                
                /* Desktop overrides to reset Swiper styles */
                @media (min-width: 1000px) {
                    transform: none !important;
                    width: 100% !important;
                    box-sizing: border-box;
                }

                /* Mobile Carousel overrides */
                @media (max-width: 999px) {
                    flex-wrap: nowrap;
                    gap: 0; /* Swiper handles gap */
                    justify-content: flex-start;
                }
            }
        }
        
        .logo-item {
            display: block;
            transition: var(--transition);
            
            /* Desktop overrides to reset Swiper styles */
            @media (min-width: 1000px) {
                width: auto !important;
                height: auto !important;
                margin-right: 0 !important;
            }
            
            @media (max-width: 999px) {
                width: auto;
                flex: 0 0 auto;
            }
            
            img {
                display: block;
                max-height: 2.5rem; /* Reduced size */
                width: auto;
                max-width: 140px;
                object-fit: contain;
            }
            
            &:hover {
                opacity: 0.8;
            }
        }
    }
    
    /* Footer Middle Section */
    .footer-middle {
        padding: 2.5rem 0;
    }
    
    /* Improved footer columns with better responsive behavior */
    .footer-columns {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .footer-column h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        position: relative;
        color: var(--secondary);
    }
    
    /* Updated contact styles with boxed icons */
    .footer-contact-details {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        
        a {
            display: flex;
            align-items: center;
            gap: 0.875rem;
            color: var(--text);
            text-decoration: none;
            transition: var(--transition);
            font-size: 0.9rem;
            padding: 0.25rem 0;
            
            &:hover {
                color: var(--primary);
                
                .contact-icon {
                    background-color: var(--primary-hover);
                    transform: translateY(-2px);
                    box-shadow: 0 4px 8px rgba(173, 29, 63, 0.2);
                }
            }
        }
    }
    
    .contact-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--primary);
        color: white;
        width: 2.2rem;
        height: 2.2rem;
        border-radius: var(--border-radius);
        transition: var(--transition);
        
        .material-symbols-outlined {
            font-size: 1.1rem;
            color: white;
        }
    }
    
    /* Updated menu items with chevrons */
    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
        
        li {
            margin-bottom: 0.75rem;
        }
        
        a {
            color: var(--text);
            text-decoration: none;
            font-size: 0.9rem;
            transition: var(--transition);
            position: relative;
            padding-left: 1.2rem;
            display: block;
            
            &::before {
                content: "chevron_right";
                font-family: 'Material Symbols Outlined';
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
                transition: var(--transition);
                color: var(--primary);
                font-size: 0.9rem;
                font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            }
            
            &:hover {
                color: var(--primary);
                text-decoration: none;
                padding-left: 1.4rem;
                
                &::before {
                    left: 0.2rem;
                }
            }
        }
    }
    
    /* Footer Bottom */
    .footer-bottom {
        background-color: var(--secondary);
        padding: 1.25rem 0;
        color: white;
        
        .container {
            display: block;
        }
        
        .footer-bottom-inner {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: space-between;
            gap: 2rem;
        }
        
        .copyright {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
            letter-spacing: 0.02em;
            
            a {
                color: rgba(255,255,255,0.8);
                text-decoration: none;
                transition: var(--transition);
                
                &:hover {
                    color: var(--primary);
                }
            }
            
            .site-credit {
                a {
                    color: rgba(255,255,255,0.7);
                    
                    &:hover {
                        color: var(--primary);
                    }
                }
            }
        }
        
        .footer-legal-links {
            .legal-links {
                display: flex;
                align-items: center;
                gap: 0.4rem;
                list-style: none;
                margin: 0;
                padding: 0;
                
                li {
                    margin: 0;
                    padding: 0;
                    display: flex;
                    align-items: center;
                    
                    &:not(:last-child)::after {
                        content: "·";
                        color: rgba(255,255,255,0.4);
                        margin-left: 0.4rem;
                        font-weight: 700;
                    }
                    
                    a {
                        font-size: 0.75rem;
                        color: rgba(255,255,255,0.7);
                        text-decoration: none;
                        transition: var(--transition);
                        padding: 0.25rem 0;
                        
                        &:hover {
                            color: var(--primary);
                        }
                    }
                }
            }
        }
    }
    
    @media (max-width: 767px) {
        .footer-bottom {
            padding: 1.5rem 0;
            
            .footer-bottom-inner {
                flex-direction: column-reverse;
                text-align: center;
                gap: 1rem;
            }
            
            .footer-legal-links .legal-links {
                justify-content: center;
                flex-wrap: wrap;
                gap: 0.25rem 0.4rem;
            }
        }
    }
    
    /* Better responsive behavior for footer */
    @media (max-width: 991px) {
        .footer-top .container {
            flex-direction: column;
        }
        
        .footer-info {
            max-width: 100%;
        }
        
        .accreditation-logos {
            justify-content: flex-start;
            /* margin-top: 1.5rem; */
        }
        
        /* 2-column layout for medium screens */
        .footer-columns {
            grid-template-columns: repeat(2, 1fr);
            gap: 2.5rem 3rem;
        }
    }
    
    @media (max-width: 767px) {
        /* Single column for small screens */
        .footer-columns {
            grid-template-columns: 1fr;
            gap: 2.25rem;
        }
        
        .footer-logo-text {
            flex-direction: column;
            gap: 1.5rem;
        }
        
        /* More compact spacing on mobile */
        .footer-middle {
            padding: 2.5rem 0;
        }
        
        .footer-column h3 {
            margin-bottom: 1rem;
        }
    }
}

/* ============================
   CARD COMPONENT
   ============================ */

.card {
    background: white;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform, box-shadow;
    height: 100%;
    display: flex;
    flex-direction: column;
    
    &:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.1);
        
        .card-image img {
            transform: scale(1.08);
        }
    }
    
    .card-image {
        width: 100%;
        position: relative;
        overflow: hidden;
        
        /* Default aspect ratio - can be overridden */
        aspect-ratio: 16 / 9;
        
        &.square {
            aspect-ratio: 1 / 1;
        }
        
        &.landscape {
            aspect-ratio: 4 / 3;
        }
        
        &.portrait {
            aspect-ratio: 3 / 4;
        }
        
        &.widescreen {
            aspect-ratio: 16 / 9;
        }
        
        img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
            will-change: transform;
        }
        
        a {
            display: block;
            width: 100%;
            height: 100%;
        }
    }
    
    .card-content {
        padding: 1.5rem;
        position: relative;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        
        h3 {
            font-size: 1.2rem;
            margin: 0.5rem 0 0.75rem;
            line-height: 1.3;
            
            a {
                color: var(--secondary);
                text-decoration: none;
                transition: color 0.2s ease;
                
                &:hover {
                    color: var(--primary);
                }
            }
        }
        
        .card-meta {
            color: var(--gray);
            font-size: 0.85rem;
            font-weight: 600;
            margin: 0;
            line-height: 1.3;
            display: inline-block;
        }
        
        .card-text {
            color: var(--text);
            margin-bottom: 1rem;
            font-size: 0.9rem;
            line-height: 1.5;
        }
        
        .card-link {
            margin-top: auto;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--primary);
            text-decoration: none;
            
            &:hover {
                text-decoration: underline;
            }
        }
    }
}

/* ============================
   PAGINATION
   ============================ */

.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    
    ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        gap: 0.3rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    li {
        margin: 0;
        
        > a, > span {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 4px;
            background-color: white;
            color: var(--text);
            font-weight: 500;
            font-size: 0.9rem;
            text-decoration: none;
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
            position: relative;
            
            &:hover {
                background-color: var(--light-gray);
                color: var(--primary);
                border-color: var(--primary);
            }
            
            &.current {
                background-color: var(--primary);
                color: white;
                border-color: var(--primary);
                font-weight: 700;
                position: relative;
                z-index: 2;
                
                &:hover {
                    background-color: var(--primary-hover);
                    color: white;
                }
            }
        }
        
        .material-symbols-outlined {
            font-size: 1rem;
            line-height: 1;
            height: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            top: 1px;
        }

        .prev .material-symbols-outlined {
            margin-left: 0.25rem;
        }
        
        &.dots {
            span {
                border: none;
                background: transparent;
            }
        }
    }
    
    @media (max-width: 767px) {
        margin-top: 2rem;
        
        li {
            a, span {
                width: 2.2rem;
                height: 2.2rem;
            }
        }
    }
}

/* ============================
   BOOKING POPUP
   ============================ */

#booking-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: opacity 0.4s ease, visibility 0.4s ease, backdrop-filter 0.4s ease;
}

#booking-popup.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.popup-container {
    position: relative;
    width: 90%;
    max-width: 1021px;
    height: 90vh;
    max-height: 800px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#booking-popup.active .popup-container {
    transform: scale(1);
    opacity: 1;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s;
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
}

#booking-popup.active .popup-close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.2s;
}

.popup-close:hover {
    background-color: #f1f1f1;
    transform: scale(1.1);
}

.popup-close:before,
.popup-close:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: #333;
}

.popup-close:before {
    transform: rotate(45deg);
}

.popup-close:after {
    transform: rotate(-45deg);
}

.popup-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.popup-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

body.popup-open {
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .popup-container {
        width: 95%;
        height: 80vh;
    }
}

/* ============================
   HOME HERO SECTION
   ============================ */

.home-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: white;
    border-bottom: 4px solid var(--primary);
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 1;
}

#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    opacity: 0.6;
    mask-image: linear-gradient(135deg, transparent 40%, black 70%);
    -webkit-mask-image: linear-gradient(135deg, transparent 40%, black 70%);
    pointer-events: auto;
    
    @media (max-width: 767px) {
        opacity: 0.4;
        mask-image: linear-gradient(135deg, transparent 50%, black 75%);
        -webkit-mask-image: linear-gradient(135deg, transparent 50%, black 75%);
    }
}

.hero-content {
    position: relative;
    z-index: 5;
    width: 100%;
    padding: 6rem 0 8rem 0;
    pointer-events: none;
    
    /* Allow pointer events only on interactive elements */
    a, button, input, select, textarea {
        pointer-events: auto;
    }
}

.hero-content-inner {
    max-width: 900px;
    text-align: left;
    animation: fadeInUp 1s ease-out;
}

.hero-content-inner .section-title.tag {
    margin-bottom: 1.5rem;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
    color: white;
    margin-bottom: 1rem;
    pointer-events: none;
}

.hero-subtitle {
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    line-height: 1.5;
    font-weight: 400;
    max-width: 750px;
    pointer-events: none;
}

.hero-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.hero-cta-buttons .button {
    /* Inherit base button styles and just override what's needed */
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    min-width: 160px;
}

.hero-cta-buttons .secondary-cta {
    background-color: var(--secondary);
    
    &::before {
        border-color: var(--secondary);
    }
}

.hero-cta-buttons .secondary-cta:hover {
    background-color: rgba(15, 21, 38, 0.9);
    
    &::before {
        border-color: rgba(15, 21, 38, 0.9);
    }
}

/* Video CTA Button - with play icon */
.button.video-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.button.video-cta .play-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.7;
    margin-left: -0.5rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .home-hero {
        min-height: 60vh;
    }
    
    .hero-content {
        padding: 4rem 0 5rem 0;
    }
    
    .hero-content-inner {
        padding: 1rem;
        text-align: center;
    }
    
    .hero-title {
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
    
    .hero-cta-buttons {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .hero-cta-buttons .button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .home-hero .hero-play-button {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .home-hero {
        min-height: 50vh;
    }
    
    .home-hero .hero-play-button {
        width: 70px;
        height: 70px;
    }
    
    .home-hero .hero-play-button .play-icon {
        width: 28px;
        height: 28px;
    }
    
    .home-hero .hero-play-button .circular-text {
        width: 100px;
        height: 100px;
    }
    
    .hero-content {
        padding: 3rem 0 4rem 0;
    }
    
    .hero-overlay {
        background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    }
}

/* Short screens - based on viewport HEIGHT */
@media (max-height: 700px) {
    .hero-content {
        padding: 6rem 0 7rem 0;
    }
}

@media (max-height: 600px) {
    .hero-content {
        padding: 8rem 0 9rem 0;
    }
}

@media (max-height: 500px) {
    .hero-content {
        padding: 10rem 0 11rem 0;
    }
}

/* Ensure video plays on mobile devices */
@media (hover: none) and (pointer: coarse) {
    .hero-video {
        /* Ensure video covers properly on mobile */
        min-width: 100%;
        min-height: 100%;
    }
}

/* ============================
   404 ERROR PAGE
   ============================ */

.error-404-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--secondary) 0%, #1a2538 100%);
    color: white;
    overflow: hidden;
    padding: 4rem 0;
    
    @media (max-width: 767px) {
        min-height: 70vh;
        padding: 3rem 0;
    }
    
    #particles-404 {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: 0;
    }
    
    .container {
        position: relative;
        z-index: 1;
    }
    
    .error-404-content {
        text-align: center;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .error-404-number {
        font-size: clamp(6rem, 10vw, 12rem);
        font-weight: 900;
        line-height: 1;
        margin-bottom: 1rem;
        background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-fill-color: transparent;
        letter-spacing: -0.02em;
    }
    
    h1 {
        font-size: clamp(2rem, 4vw, 3rem);
        margin: 0 0 1.5rem;
        color: white;
        font-weight: 800;
    }
    
    p {
        font-size: clamp(1rem, 2vw, 1.2rem);
        margin: 0 0 2.5rem;
        color: rgba(255, 255, 255, 0.85);
        line-height: 1.6;
        text-wrap: balance;
    }
    
    .button {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
        padding: 1rem 2rem;
        
        &:hover {
            transform: translateY(-2px);
        }
    }
}

/* =========================
   Help Centre Styles
   ========================= */

/* Archive Styles */
.help-centre-archive {
    padding: 0;
    background: var(--light-gray);
}

.help-centre-header {
    text-align: center;
    padding: 4rem 0;
    background: var(--secondary);
    color: white;
    margin-bottom: 4rem;
    
    h1 {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
        font-weight: 900;
        margin: 0 0 1rem;
        color: white;
    }
    
    p {
        font-size: clamp(1rem, 2vw, 1.25rem);
        margin: 0;
        opacity: 0.9;
        text-wrap: balance;
    }
}

.help-centre-archive > .container {
    padding-top: 0;
    padding-bottom: 0;
}

.help-centre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.help-article-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    
    &:hover {
        border-color: var(--primary);
    }
}

.help-article-card-link {
    text-decoration: none !important;
    color: inherit;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    
    * {
        text-decoration: none !important;
    }
}

.help-article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.help-article-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--secondary);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    transition: var(--transition);
    
    img, svg {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

.help-article-card:hover .help-article-icon {
    background: var(--primary);
    transform: scale(1.05);
}

.help-article-brand {
    img {
        height: 40px;
        width: auto;
        max-width: 150px;
    }
}

.help-article-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0 !important;
    color: var(--secondary);
    transition: color 0.2s ease;
}

.help-article-card:hover .help-article-title {
    color: var(--primary);
}

.help-article-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.help-article-meta {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 1rem;
}

.help-article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none !important;
    transition: gap 0.2s ease;
    
    &:hover {
        gap: 0.75rem;
        text-decoration: none !important;
    }
    
    svg {
        transition: transform 0.2s ease;
        margin-top: 1px;
    }
}

/* Single Page Styles */
.help-centre-single {
    padding: 0;
    background: var(--light-gray);
}

.help-centre-single > .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.help-centre-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    align-items: start;
}

.help-sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    
    h3 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--secondary);
        margin: 0 0 1rem;
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    
    &:hover {
        color: var(--primary);
    }
}

.help-centre-nav {
    .help-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .help-nav-item {
        margin-bottom: 0.25rem;
        
        > a {
            display: block;
            padding: 0.5rem 0;
            color: #333;
            text-decoration: none;
            transition: all 0.2s ease;
            font-weight: 400;
            font-size: 0.875rem;
            
            &:hover {
                color: var(--primary);
            }
        }
        
        &.current > a {
            color: var(--primary);
            font-weight: 600;
        }
        
        &.has-children > a {
            position: relative;
            padding-right: 1.25rem;
            
            &::after {
                content: '';
                position: absolute;
                right: 0;
                top: 50%;
                transform: translateY(-50%) rotate(0deg);
                width: 8px;
                height: 8px;
                border-right: 2px solid currentColor;
                border-bottom: 2px solid currentColor;
                border-top: none;
                border-left: none;
                transform: translateY(-60%) rotate(45deg);
                transition: transform 0.2s ease;
            }
        }
        
        &.expanded > a::after {
            transform: translateY(-40%) rotate(-135deg);
        }
    }
    
    .help-nav-sublist {
        list-style: none;
        padding: 0.25rem 0 0.25rem 0.625rem;
        margin: 0;
        border-left: 2px solid #e5e5e5;
        margin-left: 0;
        display: none;
    }
    
    .help-nav-item.expanded .help-nav-sublist {
        display: block;
    }
    
    .help-nav-sublist .help-nav-item {
        margin-bottom: 0.125rem;
        
        a {
            padding: 0.375rem 0;
            font-size: 0.8125rem;
        }
    }
}

.help-centre-content {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    
    h1 {
        font-size: clamp(2rem, 4vw, 2.5rem);
        font-weight: 800;
        color: var(--secondary);
        margin: 0 0 1rem;
        line-height: 1.2;
    }
    
    /* Header area styling */
    > article > .help-featured-image,
    > article > .help-parent-title,
    > article > h1,
    > article > .help-content-excerpt {
        position: relative;
    }
    
    /* Brand-specific color overrides */
    article[data-brand="pro-set"] {
        .help-content-body {
            h2 {
                color: #0f753c;
            }
            
            a:not(.button) {
                color: #0f753c;
                
                &:hover {
                    color: #0f753c;
                }
            }
            
            ul li::marker,
            ol li::marker {
                color: #0f753c;
            }
        }
        
        .help-child-list li:hover .help-child-icon {
            background: #0f753c;
        }
        
        .download-link:hover {
            border-left-color: #0f753c;
            
            .download-icon {
                background: #0f753c;
            }
            
            .download-name {
                color: #0f753c;
            }
        }
    }
    
    article[data-brand="west-system"] {
        .help-content-body {
            h2 {
                color: #0085ca;
            }
            
            a:not(.button) {
                color: #0085ca;
                
                &:hover {
                    color: #0085ca;
                }
            }
            
            ul li::marker,
            ol li::marker {
                color: #0085ca;
            }
        }
        
        .help-child-list li:hover .help-child-icon {
            background: #0085ca;
        }
        
        .download-link:hover {
            border-left-color: #0085ca;
            
            .download-icon {
                background: #0085ca;
            }
            
            .download-name {
                color: #0085ca;
            }
        }
    }
    
    article[data-brand="entropy"] {
        .help-content-body {
            h2 {
                color: #b4bd00;
            }
            
            a:not(.button) {
                color: #b4bd00;
                
                &:hover {
                    color: #b4bd00;
                }
            }
            
            ul li::marker,
            ol li::marker {
                color: #b4bd00;
            }
        }
        
        .help-child-list li:hover .help-child-icon {
            background: #b4bd00;
        }
        
        .download-link:hover {
            border-left-color: #b4bd00;
            
            .download-icon {
                background: #b4bd00;
            }
            
            .download-name {
                color: #b4bd00;
            }
        }
    }
}

.help-parent-title {
    margin-bottom: 0.5rem;
    
    a {
        font-size: 1.125rem;
        color: var(--secondary);
        opacity: 0.5;
        text-decoration: none;
        font-weight: 600;
        transition: opacity 0.2s ease;
        
        &:hover {
            opacity: 0.7;
        }
    }
}

.help-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    
    h1 {
        margin: 0 0 1rem;
    }
}

.help-title-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    opacity: 0.15;
    
    img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: brightness(0) invert(1);
    }
}

.help-content-brand {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid transparent;
    
    img {
        height: 50px;
        width: auto;
        max-width: 200px;
    }
    
    &[data-brand="wessex"] {
        border-bottom-color: var(--primary);
    }
    
    &[data-brand="pro-set"] {
        border-bottom-color: #0f753c;
    }
    
    &[data-brand="west-system"] {
        border-bottom-color: #0085ca;
    }
    
    &[data-brand="entropy"] {
        border-bottom-color: #b4bd00;
    }
}

.help-content-excerpt {
    font-size: 1.125rem;
    color: #555;
    line-height: 1.7;
    margin: 0 0 2.5rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.help-featured-image {
    margin: 0 0 2rem 0;
    
    img {
        width: 100%;
        height: auto;
        border-radius: var(--border-radius);
    }
}

.help-content-body {
    line-height: 1.8;
    
    h2 {
        font-size: 1.75rem;
        color: var(--primary);
    }
    
    h3 {
        font-size: 1.375rem;
        color: var(--secondary);
    }
    
    a:not(.button) {
        color: var(--primary);
        
        &:hover {
            color: var(--primary);
            opacity: 0.8;
        }
    }
    
    .button {
        margin-top: 0.5rem;
    }
    
    ul, ol {
        li::marker {
            color: var(--primary);
        }
    }
    
    /* WordPress editor image alignment */
    img {
        max-width: 100%;
        height: auto;
    }
    
    .alignleft {
        float: left;
        margin: 0.5rem 1.5rem 1rem 0;
    }
    
    .alignright {
        float: right;
        margin: 0.5rem 0 1rem 1.5rem;
    }
    
    .aligncenter {
        display: block;
        margin-left: auto;
        margin-right: auto;
        clear: both;
    }
    
    .alignnone {
        margin: 1rem 0;
    }

}

.help-child-pages {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-gray);
    
    h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--secondary);
        margin: 0 0 1.5rem;
    }
}

/* Help Article Previous/Next Navigation */
.help-article-nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

.help-nav-prev,
.help-nav-next {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.2s ease;
    
    &:hover {
        background: #e8e8e8;
        text-decoration: none;
        
        .help-nav-icon {
            background: var(--primary);
        }
        
        .help-nav-title {
            color: var(--primary);
        }
    }
}

.help-nav-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--secondary);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: background 0.2s ease;
    
    img, svg {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

.help-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.help-nav-placeholder {
    flex: 1;
}

.help-nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.help-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    
    .help-nav-chevron {
        width: 12px;
        height: 12px;
    }
}

.help-nav-next .help-nav-label {
    justify-content: flex-end;
}

.help-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    transition: color 0.2s ease;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .help-article-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .help-nav-prev,
    .help-nav-next {
        justify-content: flex-start;
        text-align: left;
    }
    
    .help-nav-next {
        flex-direction: row-reverse;
    }
    
    .help-nav-placeholder {
        display: none;
    }
}

.help-centre-archive .cta-block,
.help-centre-single .cta-block {
    margin-top: 4rem;
}

.help-child-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
    
    li {
        background: var(--light-gray);
        border-radius: var(--border-radius);
        transition: background 0.2s ease;
        
        &:hover {
            background: #e8e8e8;
        }
    }
    
    a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
        color: var(--secondary);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s ease;
        
        &:hover {
            color: var(--primary);
        }
    }
}

.help-child-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: var(--secondary);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: var(--transition);
    
    img, svg {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

.help-child-list li:hover .help-child-icon {
    background: var(--primary);
}

.help-child-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.help-child-title {
    font-weight: 600;
    display: block;
}

.help-child-excerpt {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.4;
    font-weight: 400;
    display: block;
}

.help-child-arrow {
    flex-shrink: 0;
    opacity: 0.5;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .help-centre-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .help-centre-single .help-centre-layout {
        display: flex;
        flex-direction: column;
    }
    
    .help-centre-single .help-centre-sidebar {
        order: 2;
        position: static;
    }
    
    .help-centre-single .help-centre-content {
        order: 1;
    }
    
    .help-centre-sidebar {
        position: static;
    }
    
    .help-centre-content {
        padding: 2rem;
    }
    
    .help-centre-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   Download Shortcode Styles
   ========================= */

.download-shortcode {
    margin: 1rem 0;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 1px solid #e5e5e5;
    border-left: 4px solid var(--secondary);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    
    &:hover {
        border-left-color: var(--primary);
        box-shadow: var(--shadow);
        transform: translateX(4px);
        text-decoration: none;
        
        .download-icon {
            background: var(--primary);
        }
        
        .download-name {
            color: var(--primary);
            text-decoration: none;
        }
        
        .download-arrow {
            transform: translateX(4px);
        }
    }
}

.download-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--secondary);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    
    svg {
        color: white;
    }
}

.download-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.download-name {
    font-weight: 600;
    color: var(--secondary);
    transition: color 0.2s ease;
    line-height: 1.3;
}

.download-meta {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-separator {
    opacity: 0.5;
}

.download-arrow {
    flex-shrink: 0;
    color: var(--secondary);
    opacity: 0.5;
    transition: transform 0.2s ease;
}

/* =========================
   YouTube Shortcode Styles
   ========================= */

.youtube-shortcode {
    margin: 1rem 0;
}

.youtube-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1rem 1rem;
    background: white;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #ff0000;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    
    &:hover {
        border-left-color: var(--primary);
        box-shadow: var(--shadow);
        transform: translateX(4px);
        text-decoration: none;
        
        .youtube-thumbnail {
            .youtube-play-button {
                transform: translate(-50%, -50%) scale(1.1);
            }
        }
        
        .youtube-title {
            color: var(--primary);
            text-decoration: none;
        }
        
        .youtube-arrow {
            transform: translateX(4px);
        }
    }
}

.youtube-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
    background: #000;
    
    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .youtube-play-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transition: transform 0.2s ease;
        
        svg {
            display: block;
            width: 40px;
            height: auto;
        }
    }
}

.youtube-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.youtube-title {
    font-weight: 600;
    color: var(--secondary);
    transition: color 0.2s ease;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.youtube-meta {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.youtube-source {
    color: #ff0000;
    font-weight: 500;
}

.youtube-separator {
    opacity: 0.5;
}

.youtube-channel {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.youtube-arrow {
    flex-shrink: 0;
    color: var(--secondary);
    opacity: 0.5;
    transition: transform 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .youtube-channel,
    .youtube-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .youtube-link {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .youtube-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .youtube-content {
        width: 100%;
    }
    
    .youtube-arrow {
        display: none;
    }
}