/*
Theme Name: Caravan-On-Tour-Theme
Theme URI: https://caravanontour.com.au/
Author: Garry Purcell
Author URI: https://caravanontour.com.au/
Description: A colourful Australian Camping and Caravanning WordPress theme featuring a sticky Top Menu Bar, 8 Australian States & Territories quick-filter ribbon with individual field editing, extreme backend editing controls with Toggle On/Off switches for every Main Site and Sidebar function, alternating Left/Right post featured image controls, and a comprehensive View Details page.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caravan-on-tour-theme
Tags: blog, two-columns, three-columns, left-sidebar, right-sidebar, custom-colors, custom-menu, featured-images, theme-options, travel
*/

:root {
    --cot-primary: #D95D24;
    --cot-secondary: #1E6B52;
    --cot-accent: #1D6FA5;
    --cot-gold: #F4A261;
    --cot-bg: #FDF8F2;
    --cot-surface: #FFFFFF;
    --cot-text: #000000;
    --cot-muted: #4A4A4A;
    --cot-border: #E5D9CC;
    --cot-container-width: 1380px;
    --cot-left-width: 260px;
    --cot-right-width: 280px;
    --cot-body-size: 16px;
    --cot-radius: 14px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: var(--cot-body-size);
    line-height: 1.65;
    color: var(--cot-text);
    background-color: var(--cot-bg);
}

body.cot-topo-bg {
    background-image:
        radial-gradient(circle at 15% 20%, rgba(217, 93, 36, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(30, 107, 82, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(29, 111, 165, 0.05) 0%, transparent 45%);
}

a {
    color: var(--cot-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cot-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.cot-container {
    width: 100%;
    max-width: var(--cot-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Menu Bar */
.cot-top-header {
    background: var(--cot-secondary);
    color: #FFFFFF;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.cot-top-header.cot-gradient-header {
    background: linear-gradient(120deg, var(--cot-secondary) 0%, var(--cot-accent) 55%, var(--cot-primary) 100%);
}

.cot-top-header.cot-sticky-bar {
    position: sticky;
    top: 0;
}

.cot-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
    padding: 8px 0;
}

.cot-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.cot-brand:hover {
    color: #FFF6E9;
}

.cot-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.25rem;
}

.cot-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    flex-wrap: wrap;
}

.cot-nav-menu > li {
    position: relative;
}

.cot-nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.94rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.cot-nav-menu > li > a:hover,
.cot-nav-menu > li.current-menu-item > a {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.cot-nav-menu li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #FFFFFF;
    color: var(--cot-text);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    padding: 8px;
    list-style: none;
    z-index: 1000;
    border: 1px solid var(--cot-border);
}

.cot-nav-menu li:hover > ul.sub-menu,
.cot-nav-menu li:focus-within > ul.sub-menu {
    display: block;
}

.cot-nav-menu li ul.sub-menu li a {
    display: block;
    padding: 8px 12px;
    color: var(--cot-text);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
}

.cot-nav-menu li ul.sub-menu li a:hover {
    background: #FDF2EA;
    color: var(--cot-primary);
}

.cot-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cot-top-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.cot-top-search-form input[type="search"] {
    background: transparent;
    border: none;
    color: #FFFFFF;
    outline: none;
    width: 150px;
    font-size: 0.88rem;
}

.cot-top-search-form input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.cot-top-search-form button {
    background: var(--cot-gold);
    color: #000000;
    border: none;
    border-radius: 999px;
    padding: 5px 12px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.cot-mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

/* States Ribbon */
.cot-states-ribbon {
    background: #FFFFFF;
    border-bottom: 2px solid var(--cot-border);
    padding: 10px 0;
}

.cot-states-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cot-states-label {
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--cot-secondary);
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cot-state-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    background: var(--cot-pill-color, #1E6B52);
    color: #FFFFFF;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cot-state-pill:hover {
    filter: brightness(1.1);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

/* Hero Banner */
.cot-hero-banner {
    background: linear-gradient(135deg, rgba(217, 93, 36, 0.94), rgba(30, 107, 82, 0.92));
    color: #FFFFFF;
    padding: 36px 0;
    border-bottom: 4px solid var(--cot-gold);
}

.cot-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cot-hero-title {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.cot-hero-subtitle {
    margin: 0;
    font-size: 1.05rem;
    color: #FFF8F0;
    max-width: 720px;
}

.cot-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cot-gold);
    color: #000000;
    font-weight: 800;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.cot-hero-cta:hover {
    background: #FFFFFF;
    color: var(--cot-primary);
}

/* Breadcrumbs */
.cot-breadcrumbs {
    padding: 12px 0 0 0;
    font-size: 0.88rem;
    color: var(--cot-muted);
}

.cot-breadcrumbs a {
    font-weight: 600;
}

/* Multi-Column Layout */
.cot-workspace-grid {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    padding: 28px 0 48px 0;
}

.cot-col-left {
    width: var(--cot-left-width);
    flex-shrink: 0;
}

.cot-col-main {
    flex: 1 1 auto;
    min-width: 0;
}

.cot-col-right {
    width: var(--cot-right-width);
    flex-shrink: 0;
}

.cot-sticky-sidebar {
    position: sticky;
    top: 88px;
}

/* Sidebar Widgets */
.cot-widget {
    background: var(--cot-surface);
    border: 1px solid var(--cot-border);
    border-radius: var(--cot-radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.cot-widget-title {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--cot-gold);
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--cot-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cot-widget ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #EFE6DC;
}

.cot-widget ul li:last-child {
    border-bottom: none;
}

.cot-badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cot-tip-box {
    background: linear-gradient(135deg, #FFF7EC, #F3FBF8);
    border-left: 4px solid var(--cot-primary);
}

/* Post Cards & Alternating Left/Right Image */
.cot-post-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cot-post-card {
    display: flex;
    flex-direction: row;
    background: var(--cot-surface);
    border: 1px solid var(--cot-border);
    border-radius: var(--cot-radius);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body.cot-card-shadows .cot-post-card {
    box-shadow: 0 8px 24px rgba(34, 24, 16, 0.07);
}

body.cot-hover-lift .cot-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(34, 24, 16, 0.12);
}

.cot-post-card.cot-img-left {
    flex-direction: row;
}

.cot-post-card.cot-img-right {
    flex-direction: row-reverse;
}

.cot-post-thumb-wrap {
    flex: 0 0 38%;
    max-width: 38%;
    position: relative;
    background: #EFE7DE;
    overflow: hidden;
}

.cot-post-thumb-wrap img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

.cot-post-thumb-wrap.cot-ratio-43 img {
    aspect-ratio: 4 / 3;
}

.cot-post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    height: 100%;
    background: linear-gradient(135deg, var(--cot-secondary), var(--cot-primary));
    color: #FFFFFF;
    font-size: 2.5rem;
}

.cot-post-body {
    flex: 1 1 auto;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cot-post-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.cot-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.cot-badge-cat {
    background: var(--cot-primary);
    color: #FFFFFF;
}

.cot-badge-time {
    background: #EAF4FA;
    color: var(--cot-accent);
}

.cot-post-title {
    margin: 0 0 10px 0;
    font-size: 1.42rem;
    line-height: 1.3;
    font-weight: 800;
}

.cot-post-title a {
    color: var(--cot-text);
}

.cot-post-title a:hover {
    color: var(--cot-primary);
}

.cot-post-meta {
    font-size: 0.85rem;
    color: var(--cot-muted);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cot-post-excerpt {
    color: var(--cot-text);
    margin-bottom: 16px;
}

.cot-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cot-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--cot-secondary);
    color: #FFFFFF;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
}

.cot-read-more:hover {
    background: var(--cot-primary);
    color: #FFFFFF;
}

.cot-flip-img-btn {
    background: #FFF4EC;
    color: var(--cot-primary);
    border: 1px solid var(--cot-primary);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cot-flip-img-btn:hover {
    background: var(--cot-primary);
    color: #FFFFFF;
}

/* Single Post */
.cot-single-article {
    background: var(--cot-surface);
    border: 1px solid var(--cot-border);
    border-radius: var(--cot-radius);
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.cot-single-header {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--cot-border);
    padding-bottom: 16px;
}

.cot-single-title {
    margin: 0 0 10px 0;
    font-size: 2rem;
    line-height: 1.25;
    color: var(--cot-text);
}

.cot-single-hero-img {
    margin: 0 0 22px 0;
    border-radius: 12px;
    overflow: hidden;
}

.cot-single-hero-img img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.cot-single-flow-layout.cot-single-img-left .cot-single-float-img {
    float: left;
    width: 44%;
    margin: 0 24px 16px 0;
    border-radius: 12px;
    overflow: hidden;
}

.cot-single-flow-layout.cot-single-img-right .cot-single-float-img {
    float: right;
    width: 44%;
    margin: 0 0 16px 24px;
    border-radius: 12px;
    overflow: hidden;
}

.cot-single-content {
    color: var(--cot-text);
    font-size: 1.04rem;
}

.cot-single-content::after {
    content: "";
    display: table;
    clear: both;
}

.cot-author-box {
    margin-top: 28px;
    padding: 18px;
    background: #FDF5EC;
    border: 1px solid var(--cot-border);
    border-left: 4px solid var(--cot-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cot-related-posts {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid var(--cot-border);
}

.cot-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.cot-related-card {
    background: #FAF6F1;
    border: 1px solid var(--cot-border);
    border-radius: 10px;
    padding: 14px;
}

/* Pagination */
.cot-pagination {
    margin-top: 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cot-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: #FFFFFF;
    border: 1px solid var(--cot-border);
    border-radius: 8px;
    color: var(--cot-text);
    font-weight: 700;
}

.cot-pagination .page-numbers.current {
    background: var(--cot-primary);
    color: #FFFFFF;
    border-color: var(--cot-primary);
}

/* Footer */
.cot-site-footer {
    background: #173C30;
    color: #F2F5F3;
    padding: 40px 0 20px 0;
    border-top: 5px solid var(--cot-primary);
}

.cot-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.cot-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.88rem;
    color: #D5E2DC;
}

.cot-back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--cot-primary);
    color: #FFFFFF;
    border: none;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    display: none;
    z-index: 998;
}

.cot-back-to-top.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* View Details Front-end Card */
.cot-view-details-card {
    background: #FFFFFF;
    border: 1px solid var(--cot-border);
    border-radius: var(--cot-radius);
    padding: 26px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.cot-vd-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.cot-vd-table th,
.cot-vd-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--cot-border);
}

.cot-vd-table th {
    background: #F6EFE7;
    color: var(--cot-secondary);
    width: 220px;
}

/* Responsive */
@media (max-width: 1024px) {
    .cot-workspace-grid {
        flex-direction: column;
    }
    .cot-col-left,
    .cot-col-right {
        width: 100%;
    }
    .cot-sticky-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .cot-mobile-toggle {
        display: inline-flex;
    }
    .cot-nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 10px;
    }
    .cot-nav-menu.is-open {
        display: flex;
    }
    .cot-navbar {
        flex-wrap: wrap;
    }
    .cot-post-card,
    .cot-post-card.cot-img-left,
    .cot-post-card.cot-img-right {
        flex-direction: column;
    }
    .cot-post-thumb-wrap {
        flex: none;
        max-width: 100%;
    }
    .cot-single-flow-layout.cot-single-img-left .cot-single-float-img,
    .cot-single-flow-layout.cot-single-img-right .cot-single-float-img {
        float: none;
        width: 100%;
        margin: 0 0 18px 0;
    }
}
