/*
Theme Name: Petrolheads Theme
Description: Custom WordPress theme for Petrolheads.ee
Version: 1.0
Author: Kaadervärk
*/

:root {
    --light-gray: #eeeeee;
    --dark-gray: #555555;
    --petrolheads-yellow: #fce37f;
    --light-gray-darkened: #bababa;
    --orange: #c3512f;
    --dark-orange: #883d1f;

    --grid-gutter-width: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    min-height: 100vh; /* Default min-height */

    /* Adjust min-height when WordPress admin bar is present */
    /* This targets the body when the 'admin-bar' class is active (logged in users) */
    &.admin-bar {
        min-height: calc(100vh - var(--wp-admin--admin-bar--height));
    }

    /* Adjust for mobile admin bar (height changes) */
    @media screen and (max-width: 782px) {
        &.admin-bar {
            min-height: calc(100vh - var(--wp-admin--admin-bar--height));
        }
    }
}

main {
    flex: 1; /* Allow main to grow and fill available space */
}

/* Full width sections */
/*.full-width-section {*/
/*    width: 100vw;*/
/*    position: relative;*/
/*    left: 50%;*/
/*    right: 50%;*/
/*    margin-left: -50vw;*/
/*    margin-right: -50vw;*/
/*}*/

/* Full height section for first block */
.full-height-section {
    height: calc(100vh - 50px - 2rem - var(--wp-admin--admin-bar--height, 0px)); /* subtract header (logo and padding) and WP admin bar if exists */
}

/* Header */
.header {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
}

.logo img {
    height: 50px;
}

@media (max-width: 480px) {
    .logo img {
        height: 40px;
    }
}

.logo h1 {
    font-size: 1.5rem;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Social icons in header */
.header-social, .header-search {
    display: flex;
    gap: 1rem;
}

.header-social a, .header-search a {
    color: #333;
    font-size: 1.5rem !important; /* Increased size for Font Awesome icons */
    transition: color 0.3s;
}

.header-social a:hover, .header-search a:hover {
    color: var(--petrolheads-yellow); /* Changed hover color to match nav */
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-size: 1em;
    line-height: 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.mobile-menu-toggle {
    color: #333;
}

/* Active/current menu item (WordPress adds these classes) */
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current_page_parent > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_ancestor > a {
    color: var(--petrolheads-yellow) !important;
}

/* Never highlight contact anchor as current */
.main-nav a[href$="#contact"].current,
.main-nav li.current-menu-item a[href$="#contact"],
.main-nav li.current_page_item a[href$="#contact"] {
    color: inherit;
}

.main-nav a:hover {
    color: var(--petrolheads-yellow);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    top: 100%;
    left: 0;
}

/* WordPress menu dropdowns (for wp_nav_menu output) */
.main-nav ul li {
    position: relative;
}

.main-nav ul > li {
    text-transform: uppercase;
}

.main-nav ul.sub-menu > li {
    text-transform: none;
}

.main-nav ul li .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.main-nav ul li:hover > .sub-menu {
    display: block;
}

.main-nav .sub-menu a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: var(--dark-gray);
}

.post-container {
    max-width: 1600px;
}

.front-page .container h2 {
    text-align: center;
    color: #333333;
    margin-bottom: 1rem;
}

/* Latest Posts Section - White */
.latest-posts {
    background: white;
    padding: 3rem 0;
}

.latest-posts .container {
    max-width: 1600px;
    height: 100%;
}

/* --- Custom Grid System (Bootstrap-like) --- */

.row {
    display: flex;
    flex-wrap: wrap;
    /* Use negative margins to pull in the first/last columns' padding */
    margin-left: calc(var(--grid-gutter-width) / -2);
    margin-right: calc(var(--grid-gutter-width) / -2);
}

.row > [class*='col-'] {
    position: relative;
    width: 100%;
    /* Use padding for spacing between columns */
    padding-left: calc(var(--grid-gutter-width) / 2);
    padding-right: calc(var(--grid-gutter-width) / 2);
}

/* Default mobile first (extra-small devices < 576px) */
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Small devices (sm) - Tablets, Portrait Mode (> 576px) */
@media (min-width: 576px) {
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Medium devices (md) - Desktops (> 768px) */
@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Large devices (lg) - Laptops/Desktops (> 992px) */
@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-1-5 {flex: 0 0 12.5%; max-width: 12.5%; } /* 100% / 8 = 12.5% */
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Extra large devices (xl) - Large Desktops (> 1200px) - Add if needed for even larger breakpoints */
/*
@media (min-width: 1200px) {
    .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}
*/

/* Reset the flex properties for grid items (post-card-featured, sponsor-item, team-member)
   We will now rely on the col- classes directly in the HTML.
   The previous flex/max-width calculations specific to these elements should be removed or adjusted.
*/
.posts-grid-featured {
    display: flex; /* Use flexbox for grid behavior */
    flex-wrap: wrap;
    justify-content: center; /* Center items if they don't fill the row */
    height: 100%;
}

.post-card-featured {
    /* flex and max-width handled by col- classes */
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    padding: 4px;
    text-decoration: none;
}

.latest-posts .post-card-featured {
    padding-left: 15px;
    padding-right: 15px;
}

.post-card-featured:hover .post-overlay-content {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.posts-grid-featured .post-overlay-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s;
}

.posts-grid-featured .post-card-featured:hover .post-overlay-content::before {
    background: rgba(0, 0, 0, 0.6);
}

.post-overlay-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    color: white;
    width: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    /* Flexbox properties to center content vertically and horizontally */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%; /* Ensure it takes full height to center content */
}

.post-title-overlay {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    opacity: 0.99;
}

.post-date-overlay {
    font-size: 0.6rem;
    opacity: 0.9;
}

/* Older Posts Grid (4-6 - Wide 3:1) */
.posts-grid-older {
    display: flex; /* Changed from grid to flex for consistency with row/col */
    flex-wrap: wrap;
    gap: 1.5rem; /* Maintain gap here */
    margin-top: 2rem;
    justify-content: center; /* Center if items don't fill */
}

.post-card-older {
    /* flex and max-width handled by col- classes */
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: #ccc;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Center content horizontally */
    text-align: center; /* Center text within the content */
    text-decoration: none;
}

.post-card-older:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.post-card-older::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s;
}

.post-card-older:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.post-card-older .post-overlay-content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%; /* Ensure it takes full height to center content */
}

.post-card-older .post-title-overlay {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.post-card-older .post-date-overlay {
    font-size: 0.6rem;
}

/* archive pages post grids */
.posts-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: center;
}

.post-card {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #ccc;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-decoration: none;
}

.post-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.3s;
    z-index: 0; /* Make sure it's behind the overlay content */
}

.all-podcasts .post-card::before,
.all-vlogs .post-card::before {
    background: rgba(0, 0, 0, 0.6); /* Slightly darker for podcast cards */
}

.post-card:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.post-card .post-overlay-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    color: white;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%; /* Important for vertical centering */
}

.post-card .post-title-overlay {
    font-size: 1.1rem; /* Smaller title for older post style */
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.post-card .post-date-overlay {
    font-size: 0.6rem; /* Smaller date font */
    opacity: 0.9;
    margin-bottom: 0.5rem; /* Add some space below date */
}

.post-card .post-categories-overlay {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Remove original .post-thumbnail and .post-content rules for .post-card
   as they are no longer used for this display style */
.post-card .post-thumbnail,
.post-card .post-content {
    display: none; /* Hide these parts for the overlay style */
}

/* Make sure images within post-card overlay the entire area */
.post-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1; /* Place image behind content and overlay */
    transition: transform 0.3s;
}

.post-card:hover img {
    transform: none;
}

/* Podcast (and vlog) archive styles */
.podcast-card {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
}

.podcast-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.podcast-card .podcast-thumbnail {
    flex-shrink: 0;
    width: auto;
    height: 120px;
    overflow: hidden;
    margin-right: 1.5rem; /* Space between thumbnail and content */
}

.podcast-card .podcast-thumbnail img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.podcast-card .podcast-content {
    flex-grow: 1; /* Content takes remaining space */
    display: flex;
    flex-direction: column;
}

.podcast-card .podcast-title {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
    color: #333;
    line-height: 1.2;
}

.podcast-card .podcast-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.8rem; /* Space before excerpt */
}

.podcast-card .podcast-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    max-height: 2.8em; /* 2 lines * line-height (1.4em) */
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .podcast-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }

    .podcast-card .podcast-thumbnail {
        height: auto;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .podcast-card .podcast-thumbnail img {
        width: 100%;
    }

    .podcast-card .podcast-content {
        align-items: center;
    }

    .podcast-card .podcast-title,
    .podcast-card .podcast-meta{
        text-align: center;
    }

    .podcast-card .podcast-excerpt {
        display: none; /* Hide excerpt on mobile */
    }
}

.pagination-links {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.pagination-links a {
    color: var(--dark-gray);
}

/* Blog Filter Styles */
.blog-filters {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    display: flex; /* Use flexbox for main filter sections */
    flex-direction: column; /* Stack search section and category section */
    gap: 1.5rem; /* Gap between search and category sections */
}

.blog-filter-search-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow search elements to wrap */
    gap: 1rem; /* Gap between search input, button, and clear button */
}

.blog-filter-search-section .blog-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    width: 100%; /* Take full width of parent */
}

.blog-filter-search-section input[type="search"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    flex: 1; /* Allows it to grow to fill space */
    min-width: 180px; /* Minimum width before wrapping */
}

.blog-filter-search-section .btn { /* General button styles for the search form */
    padding: 10px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.blog-filter-search-section .filter-button {
    background: var(--petrolheads-yellow);
    color: var(--dark-gray);
}

.blog-filter-search-section .filter-button:hover {
    background: var(--light-gray-darkened);
    color: #333;
}

.blog-filter-search-section .clear-filter-button {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
    padding-top: 6px;
    padding-bottom: 6px;
}

.blog-filter-search-section .clear-filter-button:hover {
    background: #e0e0e0;
}


.blog-filter-category-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.category-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Smaller gap between category buttons */
    justify-content: center;
    width: 100%; /* Take full width for centering */
}

.category-buttons-group .btn {
    background: var(--light-gray);
    color: var(--dark-gray);
    border: 1px solid #ccc;
    padding: 8px 15px; /* Smaller padding for buttons */
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none; /* For a tags */
    transition: background 0.3s, color 0.3s;
}

.category-buttons-group .btn:hover {
    background: var(--light-gray-darkened);
    color: #fff;
}

.category-buttons-group .btn.active {
    background: var(--petrolheads-yellow); /* Active button color */
    color: var(--dark-gray);
}

.category-buttons-group .btn.active:hover {
    background: var(--light-gray-darkened);
    color: #333;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
    font-size: 2.5rem;
    color: #333;
}

/* ... (rest of your existing CSS) ... */

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .blog-filter-search-section input[type="search"],
    .blog-filter-search-section .btn {
        flex: none; /* Do not grow, take full width if needed */
        width: 100%; /* Take full width */
    }
    .blog-filter-search-section .blog-search-form {
        flex-direction: column; /* Stack search elements */
    }
    .category-buttons-group {
        justify-content: space-around; /* Distribute buttons */
    }
    .category-buttons-group .btn {
        flex-grow: 1; /* Allow buttons to grow to fill space */
        text-align: center;
    }
}
@media (max-width: 480px) {
    .category-buttons-group .btn {
        flex-grow: unset; /* Don't force growth on very small screens */
        width: auto; /* Allow natural width */
    }
}


/* Post Content */

.post-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #555;
    line-height: 1.5;
}

/* Sponsors Section - Gray */
.sponsors {
    background: #eeeeee;
    padding: 3rem 0;
    text-align: center;
}

.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 2rem auto 0;
    gap: 2rem;
    justify-content: center;
}

.sponsor-item {
    /* flex and max-width handled by col- classes */
    transition: opacity 0.3s, filter 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: contrast(0) grayscale(1);
}

.sponsor-item:hover {
    filter: none;
}

.sponsor-item img {
    max-height: 46px !important;
    max-width: 200px !important;
    width: auto !important;
    height: auto !important;
}

.sponsor-item img[src$=".svg"] {
    min-width: 150px;
}

/* E-shop Banner - Cover Image */
.eshop-banner {
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden; /* allow bg zoom crop */
}

.eshop-banner .container h2 {
    color: white;
}

.eshop-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Zoomable background element */
.eshop-banner .eshop-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 0.4s ease;
    z-index: 0;
}

.banner-container {
    position: relative;
    z-index: 2; /* above overlays */
    transition: none;
}

.banner-container:hover { /* keep stationary */
    transform: none;
}

.banner-content {
    color: white;
    text-align: center;
}

.banner-content h2 {
    font-size: 3rem;
    color: #fff;
    font-weight: 100;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

/* Hover effects: zoom bg and title text, keep button stationary */
.eshop-banner:hover .eshop-banner-bg {
    transform: scale(1.05);
}

.eshop-banner:hover .banner-content h2 {
    transform: scale(1.03);
}

.btn {
    display: inline-block;
    background: var(--petrolheads-yellow);
    color: var(--dark-gray);
    padding: 12px 24px;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--light-gray-darkened);
    color: #fff !important;
}

.btn.btn-full-width {
    width: 100%;
    text-align: center;
}

/* WooCommerce cart button placement at top of listings/product */
.top-cart-button-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

.cart-button .cart-count {
    display: inline-block;
    background: var(--light-gray);
    color: var(--dark-gray);
    border: 1px solid #ccc;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Older Posts - White */
.older-posts {
    background: white;
    padding: 4rem 0;
}

/* Team Section */
.team {
    background: #eeeeee;
    padding: 4rem 0;
    text-align: center;
}

.team p {
    max-width: 800px;
    margin: 0 auto;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.team-member {
    /* flex and max-width handled by col- classes */
    cursor: pointer;
    transition: none;
    padding: 4px !important;
    color: var(--dark-gray);
    text-decoration: none;
}

.team-member:hover {
    transform: none;
}

.member-photo {
    margin: 0 auto 1rem;
    /*overflow: hidden;*/
}

/* Apply hover shadow only to the image container inside team member */
.member-photo {
    transition: box-shadow 0.3s;
}

.team-member:hover .member-photo img {
    box-shadow: 0 0px 15px rgba(0, 0, 0, 0.2);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact Section */
.contact-section {
    background: white;
    padding: 4rem 0;
}

.contact-section .extra-info {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
}

/* Newsletter Section */
.newsletter {
    background: #eeeeee;
    color: #333;
    padding: 0.5rem 0;
    text-align: center;
}

/* Footer */
.footer {
    background: #222;
    color: white;
    padding: 0.5em 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--light-gray-darkened); /* Consistent hover color */
}

.site-branding {
    margin: 0 auto;
    text-align: center;
}

.site-footer {
    background-color: #1a1a1a;
    padding: 0.5em 0;
    color: #fff;
    font-size: 0.8em;
}

.site-info {
    text-align: left;
}

.footer-content-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}




/* Author page styles */
.author-header {
    text-align: center;
    padding: 4rem 0 2rem;
}

.author-avatar {
    width: 250px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio {
    max-width: 1080px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.author-bio h4, .author-bio h3 {
    margin-top: 1rem;
}

.author-posts {
    padding: 2rem 0;
}

.author-pagination {
    text-align: center;
    margin-top: 2rem;
}

.author-pagination a {
    color: var(--dark-gray);
}

/* Single post author link */
.post-meta a {
    display: inline-block;
    color: var(--dark-gray);
    text-decoration: underline;
    font-weight: 500;
}

.single-post .post-content {
    max-width: 1600px;
}

.single-post .post-content h2 {
    margin-top: 1rem;
}

.single-post .post-content p {
    margin-bottom: 0.7rem;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.single-post .post-content a:not(.btn) {
    color: var(--orange);
}

.single-post .post-content a:not(.btn):hover {
    color: var(--dark-orange);
}

/* Custom styles for vlog/podcast */
.single-podcast-post-container {
    max-width: 1200px;
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.single-podcast-post-container .entry-header {
    margin-bottom: 1rem;
}

.single-podcast-post-container .entry-meta a {
    color: var(--dark-gray);
}

.single-podcast-post-container p {
    text-align: left;
}

.single-podcast-post-container .wp-block-embed {
    margin-top: 1rem;
}

/* Contact Form */

.contact-form,
.wpcf7-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: none;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
}

/* Contact Form 7 specific styles */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
    border-radius: 0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-col {
    flex: 1;
}

/* Team Section for specific page template/shortcode if applicable */
.team-section .team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.team-section .team-member img {
    border-radius: 0;
    width: 100%;
    height: auto;
    display: block;
}

.team-section .team-member .member-name {
    color: var(--dark-gray);
    text-align: center;
    margin-top: 10px;
}

.featured-image-container img {
    width: 100%;
    height: auto;
}

/* Responsive adjustments for overall layout elements (not col- classes) */
@media (max-width: 1060px) {
    .mobile-menu-toggle {
        display: block;
    }

    .header-right {
        gap: 1rem;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid #eee;
    }

    .main-nav a {
        display: block;
        padding: 1rem 0;
    }

    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        background: #f5f5f5;
        margin-left: 1rem;
    }

    /* Mobile: show WP submenus expanded, similar to legacy dropdown-content */
    .main-nav .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        background: #f5f5f5;
        margin-left: 1rem;
    }

    .header-container {
        position: relative;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header-social, .header-search {
        /*display: none;*/
        justify-content: center;
    }

    .post-card-older {
        height: 150px;
    }

    .banner-content h2 {
        font-size: 2rem;
    }

    .member-photo {
        width: 120px;
        height: 180px;
    }

    .author-avatar {
        width: 200px;
    }

    .site-info {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .posts-grid {
        margin-left: auto;
        margin-right: auto;
    }

    .sponsor-item {
        flex: 1 1 100%;
    }

    .full-height-section {
        height: auto;
    }

    .post-card-featured {
        height: 300px;
    }

    .post-card-older {
        height: 100px;
    }

    .post-overlay-content {
        padding: 1.5rem;
    }

    .post-card-older .post-overlay-content {
        padding: 1rem 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}


/* WooCommerce Styles */

/* WooCommerce button look to match .btn */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .checkout-button,
.woocommerce #place_order,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background: var(--petrolheads-yellow);
    color: var(--dark-gray);
    border: none;
    padding: 12px 24px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 0;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .checkout-button:hover,
.woocommerce #place_order:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
    background: var(--light-gray-darkened);
    color: #333;
}

/* Disabled state */
.woocommerce .button.disabled,
.woocommerce .button:disabled,
.woocommerce .button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* WooCommerce Blocks (Cart/Checkout) button styles */
/* Ensure block-based buttons (Cart/Checkout blocks) match theme buttons */
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wc-block-components-button,
.wp-block-woocommerce-checkout .wc-block-components-button,
.wc-block-checkout .wc-block-components-button,
.wc-block-components-checkout-place-order-button,
.wp-element-button.wc-block-components-button,
.wc-block-cart__submit-button {
    background: var(--petrolheads-yellow);
    color: var(--dark-gray);
    border: none;
    padding: 12px 24px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 0;
}

.wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button:hover,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button:hover,
.wp-block-woocommerce-cart .wc-block-components-button:hover,
.wp-block-woocommerce-checkout .wc-block-components-button:hover,
.wc-block-checkout .wc-block-components-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wp-element-button.wc-block-components-button:hover,
.wc-block-cart__submit-button:hover,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button:focus,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button:focus,
.wp-block-woocommerce-cart .wc-block-components-button:focus,
.wp-block-woocommerce-checkout .wc-block-components-button:focus,
.wc-block-checkout .wc-block-components-button:focus,
.wc-block-components-checkout-place-order-button:focus,
.wp-element-button.wc-block-components-button:focus,
.wc-block-cart__submit-button:focus {
    background: var(--light-gray-darkened);
    color: #333;
}

/* Disabled/loading states for block buttons */
.wc-block-components-button[aria-disabled="true"],
.wc-block-components-button.is-loading,
.wc-block-components-checkout-place-order-button[aria-disabled="true"],
.wc-block-components-checkout-place-order-button.is-loading {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide date/author meta on WooCommerce single product pages (if any from theme) */
.single-product .post-meta,
.single-product .posted-on,
.single-product .byline,
.single-product .entry-meta {
    display: none;
}

/* WooCommerce forms (classic templates) */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: var(--light-gray-darkened);
}

/* WooCommerce Blocks inputs */
.wc-block-components-text-input input,
.wc-block-components-textarea textarea,
.wc-block-components-select-control select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
}

.wc-block-components-text-input input:focus,
.wc-block-components-textarea textarea:focus,
.wc-block-components-select-control select:focus {
    outline: none;
    border-color: var(--light-gray-darkened);
}

/* Select2 (used by WooCommerce checkout for country/state) */
.select2-container .select2-selection--single {
    height: auto;
    border: 1px solid #ddd;
    border-radius: 0;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 1.4;
    padding: 8px 12px;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

/* Product page quantity input */
.woocommerce .quantity .qty {
    width: 90px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 0.95rem;
}

/* Shop/orderby dropdown */
.woocommerce .woocommerce-ordering select.orderby {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 0.95rem;
}

.woocommerce span.onsale {
    border-radius: 0 !important;
    background-color: var(--petrolheads-yellow) !important;
    color: var(--dark-gray) !important;
    padding-left: 1rem;
    padding-right: 1rem;
}

.formkit-powered-by-convertkit-container {
    display: none !important;
}

.text-uppercase {
    text-transform: uppercase;
}

.lang-switcher-shortcode {
    text-align: right; /* adjust as needed */
    line-height: 1.4;
    font-size: 14px;
}
.lang-switcher-shortcode a {
    text-decoration: none;
    color: inherit;
}
.lang-switcher-shortcode .current-lang {
    font-weight: bold;
}


/* Calendar styles */
.calendar-template-container .calendar-contents-container .calendar-day-container.today .no-events-message {
    display: none;
}

.wpem-calendar-view-container .calendar-contents-container table.calendar td.calendar-day-container.today {
    background: var(--light-gray-darkened);
}

.wpem-theme-button, a.wpem-theme-button, button.wpem-theme-button, input.wpem-theme-button {
    background: var(--petrolheads-yellow);
    color: var(--dark-gray);
}

a[href*="feed=single-event-listings-ical"] {
    display: none !important;
}

/* Event category legend */
.event-category-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.event-category-legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.event-category-legend-item .legend-color {
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 6px;
    border-radius: 3px;
}

.events-map {
    margin-bottom: 2rem;
}

.wpem-event-layout-dropdown.check-event-page {
    display: none !important;
}