/* ==========================================================================
   Just Around the Bend Theme - Road Trip Inspired Calendar
   Version: 1.0
   Updated: 2024-06-10
   Changes:
   - Warm road trip color palette with vintage map elements
   - Playful typography and winding road motifs
   - Animated journey effects and discovery highlights
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Road+Rage:wght@400;700&family=Wanderlust:wght@300;400;600&display=swap');

:root {
    /* Journey Color Palette */
    --road-bg: #FFF5E6;
    --road-text: #3A3226;
    --road-primary: #F8E8D8;
    --road-secondary: #E8D8C8;
    --road-date-number: #E74C3C;

    /* Landscape Layer Colors */
    --road-layer1: #F8E8D8;
    --road-layer2: #E8D8C8;
    --road-layer3: #D8C8B8;
    --road-layer4: #C8B8A8;
    --road-layer5: #B8A898;

    /* Road Trip Accents */
    --road-accent1: #E74C3C;
    /* Vintage Red */
    --road-accent2: #3498DB;
    /* Sky Blue */
    --road-accent3: #2ECC71;
    /* Grass Green */
    --road-accent4: rgba(231, 76, 60, 0.5);
    --road-accent5: rgba(52, 152, 219, 0.3);

    /* Theme Variables */
    --road-shadow: rgba(231, 76, 60, 0.15);
    --road-radius: 12px;
    --road-transition: 0.3s ease-in-out;
    --road-hover: #E8D8C8;
    --road-glow: 0 0 15px rgba(231, 76, 60, 0.2);
    --road-texture: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M10,50 Q25,25 50,50 Q75,75 90,50" fill="none" stroke="%23E74C3C" stroke-width="0.5" opacity="0.1"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes road-sign {

    0%,
    100% {
        transform: rotate(-2deg);
    }

    50% {
        transform: rotate(2deg);
    }
}

@keyframes car-move {
    0% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(10px);
    }
}

@keyframes road-line {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 0;
    }
}

@keyframes compass-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==================== BASE STYLES ==================== */
.just-around-the-bend {
    font-family: 'Wanderlust', sans-serif;
    color: var(--road-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--road-bg);
    min-height: 100vh;
    background-image:
        var(--road-texture),
        linear-gradient(to bottom, #FFF5E6, #F8E8D8);
    background-repeat: repeat;
    animation: road-line 60s linear infinite;
}

.just-around-the-bend .container {
    background-color: var(--road-primary);
    padding: 2rem;
    border: 1px solid var(--road-accent4);
    box-shadow: var(--road-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--road-radius);
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
}

.just-around-the-bend .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            var(--road-accent1),
            var(--road-accent2),
            transparent);
}

.just-around-the-bend .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            var(--road-accent3),
            var(--road-accent1),
            transparent);
}

/* ==================== HEADER & TITLE ==================== */
.just-around-the-bend #calendar-title {
    font-family: 'Road Rage', serif;
    color: var(--road-text);
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.1em;
    position: relative;
    font-weight: 700;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.just-around-the-bend #calendar-title::after {
    content: "➤";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    animation: car-move 3s infinite alternate;
    color: var(--road-accent1);
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.just-around-the-bend #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--road-primary);
    border: 1px solid var(--road-accent4);
    border-radius: var(--road-radius);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.just-around-the-bend #date-weather-container::before {
    content: "NEXT STOP";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--road-primary);
    padding: 0 8px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--road-accent1);
    font-weight: 600;
    font-family: 'Wanderlust', sans-serif;
    text-transform: uppercase;
}

.just-around-the-bend #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--road-accent1), transparent);
}

.just-around-the-bend #current-date {
    font-family: 'Road Rage', serif;
    color: var(--road-accent1);
    font-size: 2.1rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.just-around-the-bend #today-weather {
    font-family: 'Wanderlust', sans-serif;
    color: var(--road-text);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

/* ==================== ANALOG CLOCK ==================== */
.just-around-the-bend #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.just-around-the-bend .clock-face {
    width: 180px;
    height: 180px;
    border: 3px solid var(--road-accent1);
    border-radius: 50%;
    position: relative;
    background-color: var(--road-primary);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
    background-image:
        radial-gradient(circle at center, transparent 65%, var(--road-accent4) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="%23E74C3C" stroke-width="0.3" opacity="0.3"/></svg>');
}

.just-around-the-bend .hand {
    position: absolute;
    top: 50%;
    transform-origin: 100%;
    transform: rotate(90deg);
    transition: all 0.05s;
    transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
}

.just-around-the-bend .hour-hand {
    width: 40%;
    left: 10%;
    height: 4px;
    background: var(--road-accent1);
    margin-top: -2px;
    border-radius: 2px;
}

.just-around-the-bend .minute-hand {
    width: 48%;
    left: 2%;
    height: 3px;
    background: var(--road-accent2);
    margin-top: -1.5px;
    border-radius: 1.5px;
}

.just-around-the-bend .second-hand {
    width: 48%;
    left: 2%;
    height: 2px;
    background: var(--road-accent3);
    margin-top: -1px;
}

/* Clock center ornament */
.just-around-the-bend .clock-face::after {
    content: "⌖";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background-color: var(--road-accent1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 2px var(--road-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--road-primary);
}

/* Digital display in clock */
.just-around-the-bend .clock-face::before {
    content: "🗺️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.1;
    z-index: 1;
}

/* ==================== CALENDAR TABLE ==================== */
.just-around-the-bend table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.just-around-the-bend th {
    background-color: var(--road-accent1);
    color: var(--road-primary) !important;
    font-family: 'Wanderlust', sans-serif;
    font-weight: 600;
    padding: 0.8rem 0.4rem;
    border-radius: var(--road-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.just-around-the-bend th span.full-day-name {
    display: inline;
}

.just-around-the-bend th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.just-around-the-bend td {
    background-color: var(--road-primary);
    color: var(--road-text);
    padding: 1rem;
    border: 1px solid var(--road-accent4);
    height: 90px;
    vertical-align: top;
    transition: all var(--road-transition);
    position: relative;
    border-radius: var(--road-radius);
    box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.1);
}

.just-around-the-bend td .date-number {
    color: var(--road-date-number) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Road Rage', serif;
}

.just-around-the-bend td:hover {
    background-color: var(--road-secondary);
    box-shadow: 0 2px 12px rgba(231, 76, 60, 0.15);
}

/* Current date highlight */
.just-around-the-bend td.current-day {
    background-color: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--road-accent1);
    animation: road-sign 3s infinite;
}

.just-around-the-bend td.current-day .date-number {
    color: var(--road-text) !important;
    font-weight: 600;
}

.just-around-the-bend td.current-day::before {
    content: "📍";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--road-accent1);
    font-weight: bold;
}

/* ==================== EVENT MARKERS ==================== */
.just-around-the-bend .event-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--road-accent2);
    margin: 0 1px;
    transition: all var(--road-transition);
}

.just-around-the-bend .event-marker:hover {
    transform: scale(1.4);
    background-color: var(--road-accent2);
    box-shadow: 0 0 6px rgba(52, 152, 219, 0.4);
}

/* ==================== MODAL STYLES ==================== */
.just-around-the-bend .modal-content {
    position: relative;
    background-color: var(--road-primary);
    border: 1px solid var(--road-accent4);
    padding: 25px;
    color: var(--road-text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-radius: var(--road-radius);
    animation: car-move 0.3s ease-out;
}

.just-around-the-bend .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--road-accent1) 0%,
            var(--road-accent2) 50%,
            var(--road-accent1) 100%);
}

.just-around-the-bend .modal-content h2 {
    color: var(--road-accent1);
    font-family: 'Road Rage', serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* Modal date display */
.just-around-the-bend .modal-date {
    font-family: 'Road Rage', serif;
    color: var(--road-accent1);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--road-accent4);
    letter-spacing: 0.05em;
}

/* Event list */
.just-around-the-bend .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.just-around-the-bend .event-item {
    background-color: var(--road-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--road-accent1);
    border-radius: var(--road-radius);
    transition: all var(--road-transition);
}

.just-around-the-bend .event-item:hover {
    background-color: var(--road-layer3);
    transform: translateX(3px);
}

.just-around-the-bend .event-time {
    font-family: 'Wanderlust', sans-serif;
    color: var(--road-accent1);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
    letter-spacing: 0.03em;
}

.just-around-the-bend .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--road-text);
    font-family: 'Wanderlust', sans-serif;
}

.just-around-the-bend .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--road-text);
    opacity: 0.9;
    font-family: 'Wanderlust', sans-serif;
}

.just-around-the-bend .modal-content button {
    background-color: var(--road-accent1);
    color: var(--road-primary);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--road-transition);
    letter-spacing: 0.5px;
    font-family: 'Wanderlust', sans-serif;
    border-radius: var(--road-radius);
}

.just-around-the-bend .modal-content button:hover {
    background-color: var(--road-hover);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.2);
}

/* Close Button */
.just-around-the-bend .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--road-primary);
    color: var(--road-text);
    border: 1px solid var(--road-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--road-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.just-around-the-bend .modal .close-button:hover {
    background-color: var(--road-text);
    color: var(--road-accent1);
    border-color: var(--road-text);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.just-around-the-bend .button,
.just-around-the-bend .transparent-button {
    border: 1px solid var(--road-accent1);
    color: var(--road-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Wanderlust', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--road-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--road-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.just-around-the-bend .button:hover,
.just-around-the-bend .transparent-button:hover {
    background-color: var(--road-accent1);
    color: var(--road-primary);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.15);
}

.just-around-the-bend .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.just-around-the-bend #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.just-around-the-bend #theme-switcher {
    background-color: var(--road-primary);
    color: var(--road-text) !important;
    border: 1px solid var(--road-accent1);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Wanderlust', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233A3226'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    cursor: pointer;
    transition: all var(--road-transition);
    border-radius: var(--road-radius);
}

.just-around-the-bend #theme-switcher option {
    background-color: var(--road-primary) !important;
    color: var(--road-text) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 12px !important;
}

.just-around-the-bend #theme-switcher:focus {
    outline: none;
    border-color: var(--road-accent1);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.just-around-the-bend #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 1rem 1.7rem;
    font-size: 0.95rem;
    font-family: 'Wanderlust', sans-serif;
    font-weight: 600;
    color: var(--road-primary);
    background-color: var(--road-accent1);
    cursor: pointer;
    transition: all var(--road-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--road-radius);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.just-around-the-bend #backToTopBtn:hover {
    background-color: var(--road-hover);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.just-around-the-bend footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--road-accent4);
    color: var(--road-text);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Road Rage', serif;
    letter-spacing: 0.05em;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .just-around-the-bend .container {
        padding: 1.5rem;
    }

    .just-around-the-bend #calendar-title {
        font-size: 2.2rem;
    }

    .just-around-the-bend #current-date {
        font-size: 1.7rem;
    }

    .just-around-the-bend #today-weather {
        font-size: 1.1rem;
    }

    .just-around-the-bend .modal-date {
        font-size: 1.3rem;
    }

    .just-around-the-bend .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .just-around-the-bend {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .just-around-the-bend .clock-face {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }

    .just-around-the-bend th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .just-around-the-bend th span.full-day-name {
        display: none;
    }

    .just-around-the-bend th abbr {
        display: inline;
    }

    .just-around-the-bend td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .just-around-the-bend td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .just-around-the-bend td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .just-around-the-bend #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .just-around-the-bend #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .just-around-the-bend .modal-content {
        padding: 20px;
    }

    .just-around-the-bend .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .just-around-the-bend .container {
        padding: 1rem;
    }

    .just-around-the-bend #calendar-title {
        font-size: 1.9rem;
    }

    .just-around-the-bend #current-date {
        font-size: 1.5rem;
    }

    .just-around-the-bend #today-weather {
        font-size: 1rem;
    }

    .just-around-the-bend .clock-face {
        width: 130px;
        height: 130px;
        border-width: 2px;
    }

    .just-around-the-bend th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .just-around-the-bend td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .just-around-the-bend td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .just-around-the-bend #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .just-around-the-bend .modal-content {
        padding: 15px;
    }

    .just-around-the-bend .modal-date {
        font-size: 1.2rem;
    }

    .just-around-the-bend .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .just-around-the-bend th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .just-around-the-bend td {
        height: 60px;
    }

    .just-around-the-bend td .date-number {
        font-size: 0.9rem;
    }

    .just-around-the-bend #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}