/* ==========================================================================
   Strong and Free Theme - Patriotic Celebration-Inspired Calendar
   Version: 1.2
   Updated: 2024-06-08
   Changes:
   - Patriotic red, white, and blue color palette inspired by national pride
   - Bold, confident design with celebratory elements
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Patriotic+Display:wght@400;500;600;700&family=Liberty+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Patriotic Color Palette */
    --patriotic-bg: #F0F8FF;
    --patriotic-text: #2C3E50;
    --patriotic-primary: #FFFFFF;
    --patriotic-secondary: #E8F4FF;
    --patriotic-date-number: #B22234;

    /* Flag Texture Colors */
    --patriotic-texture1: #E6F0FA;
    --patriotic-texture2: #DCE8F5;
    --patriotic-texture3: #D2E0F0;
    --patriotic-texture4: #C8D8EB;
    --patriotic-texture5: #BED0E6;

    /* Patriotic Accent Colors */
    --patriotic-accent1: #B22234;
    --patriotic-accent2: #9B1C2C;
    --patriotic-accent3: #841624;
    --patriotic-accent4: rgba(178, 34, 52, 0.7);
    --patriotic-accent5: rgba(178, 34, 52, 0.5);

    /* Blue Accents */
    --patriotic-blue1: #3C3B6E;
    --patriotic-blue2: #2A295E;
    --patriotic-blue3: #18174E;

    /* Theme Variables */
    --patriotic-shadow: rgba(178, 34, 52, 0.15);
    --patriotic-radius: 6px;
    --patriotic-transition: 0.25s ease;
    --patriotic-hover: #9B1C2C;
    --patriotic-glow: 0 0 12px rgba(178, 34, 52, 0.2);
    --patriotic-pattern: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".15" fill="%23B22234"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".3" fill="%23B22234"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" opacity=".4" fill="%23B22234"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes patriotic-fade {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }
}

@keyframes patriotic-slide {
    from {
        transform: translateY(5px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes patriotic-pulse {

    0%,
    100% {
        box-shadow: 0 0 3px var(--patriotic-shadow);
    }

    50% {
        box-shadow: var(--patriotic-glow);
    }
}

@keyframes patriotic-flag {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes progress-bar {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

/* ==================== BASE STYLES ==================== */
.strong-and-free {
    font-family: 'Liberty Sans', sans-serif;
    color: var(--patriotic-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--patriotic-bg);
    min-height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%23B22234" opacity="0.1"/><circle cx="70" cy="30" r="1" fill="%233C3B6E" opacity="0.1"/><circle cx="30" cy="70" r="1" fill="%23B22234" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="%233C3B6E" opacity="0.1"/></svg>');
}

.strong-and-free .container {
    background-color: var(--patriotic-primary);
    padding: 2rem;
    border: 1px solid var(--patriotic-accent4);
    box-shadow: var(--patriotic-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--patriotic-radius);
}

.strong-and-free .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--patriotic-blue1) 0%,
            var(--patriotic-accent1) 50%,
            var(--patriotic-blue1) 100%);
    animation: patriotic-flag 3s ease-in-out infinite;
}

.strong-and-free .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background-image: var(--patriotic-pattern);
    background-size: 1200px 100%;
    opacity: 0.1;
}

/* ==================== HEADER & TITLE ==================== */
.strong-and-free #calendar-title {
    font-family: 'Patriotic Display', serif;
    color: var(--patriotic-blue1);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    position: relative;
    font-weight: 700;
    text-transform: uppercase;
}

.strong-and-free #calendar-title::after {
    content: "✭";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    opacity: 0.8;
    color: var(--patriotic-accent1);
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.strong-and-free #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--patriotic-primary);
    border: 1px solid var(--patriotic-accent4);
    border-radius: var(--patriotic-radius);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.strong-and-free #date-weather-container::before {
    content: "LIBERTY VIEW";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--patriotic-primary);
    padding: 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--patriotic-blue1);
    font-weight: 600;
    font-family: 'Liberty Sans', sans-serif;
}

.strong-and-free #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--patriotic-accent1), transparent);
}

.strong-and-free #current-date {
    font-family: 'Patriotic Display', serif;
    color: var(--patriotic-blue1);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.strong-and-free #today-weather {
    font-family: 'Liberty Sans', sans-serif;
    color: var(--patriotic-text);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* ==================== ANALOG CLOCK ==================== */
.strong-and-free #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.strong-and-free .clock-face {
    width: 180px;
    height: 180px;
    border: 6px solid var(--patriotic-blue1);
    border-radius: 50%;
    position: relative;
    background-color: var(--patriotic-primary);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.strong-and-free .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);
}

.strong-and-free .hour-hand {
    width: 40%;
    left: 10%;
    height: 5px;
    background: var(--patriotic-blue1);
    margin-top: -2.5px;
    border-radius: 2px;
}

.strong-and-free .minute-hand {
    width: 48%;
    left: 2%;
    height: 3px;
    background: var(--patriotic-accent1);
    margin-top: -1.5px;
    border-radius: 1.5px;
}

.strong-and-free .second-hand {
    width: 48%;
    left: 2%;
    height: 1px;
    background: var(--patriotic-blue2);
    margin-top: -0.5px;
}

/* ==================== CALENDAR TABLE ==================== */
.strong-and-free table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.strong-and-free th {
    background: linear-gradient(135deg, var(--patriotic-blue1) 0%, var(--patriotic-accent1) 100%);
    color: var(--patriotic-primary) !important;
    font-family: 'Patriotic Display', serif;
    font-weight: 600;
    padding: 0.8rem 0.4rem;
    border-radius: var(--patriotic-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.strong-and-free th span.full-day-name {
    display: inline;
}

.strong-and-free th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.strong-and-free td {
    background-color: var(--patriotic-primary);
    color: var(--patriotic-text);
    padding: 1rem;
    border: 1px solid var(--patriotic-accent4);
    height: 90px;
    vertical-align: top;
    transition: all var(--patriotic-transition);
    position: relative;
    border-radius: var(--patriotic-radius);
    box-shadow: inset 0 0 0 1px rgba(178, 34, 52, 0.1);
}

.strong-and-free td .date-number {
    color: var(--patriotic-date-number) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Patriotic Display', serif;
}

.strong-and-free td:hover {
    background-color: var(--patriotic-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Current date highlight */
.strong-and-free td.current-day {
    background-color: rgba(178, 34, 52, 0.1);
    border: 2px solid var(--patriotic-accent1);
    animation: patriotic-pulse 3s infinite;
}

.strong-and-free td.current-day .date-number {
    color: var(--patriotic-date-number) !important;
    font-weight: 700;
}

.strong-and-free td.current-day::before {
    content: "⚔";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--patriotic-accent1);
    font-weight: bold;
}

/* ==================== EVENT MARKERS ==================== */
.strong-and-free .event-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--patriotic-accent1);
    margin: 0 1px;
    transition: all var(--patriotic-transition);
}

.strong-and-free .event-marker:hover {
    transform: scale(1.4);
    background-color: var(--patriotic-accent1);
    box-shadow: 0 0 6px rgba(178, 34, 52, 0.2);
}

/* ==================== MODAL STYLES ==================== */
.strong-and-free .modal-content {
    position: relative;
    background-color: var(--patriotic-primary);
    border: 1px solid var(--patriotic-accent4);
    padding: 25px;
    color: var(--patriotic-text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--patriotic-radius);
    animation: patriotic-slide 0.2s ease-out;
}

.strong-and-free .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--patriotic-blue1) 0%,
            var(--patriotic-accent1) 50%,
            var(--patriotic-blue1) 100%);
}

.strong-and-free .modal-content h2 {
    color: var(--patriotic-blue1);
    font-family: 'Patriotic Display', serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Modal date display */
.strong-and-free .modal-date {
    font-family: 'Patriotic Display', serif;
    color: var(--patriotic-blue1);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--patriotic-accent4);
}

/* Event list */
.strong-and-free .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.strong-and-free .event-item {
    background-color: var(--patriotic-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--patriotic-accent1);
    border-radius: var(--patriotic-radius);
    transition: all var(--patriotic-transition);
}

.strong-and-free .event-item:hover {
    background-color: var(--patriotic-texture3);
    transform: translateX(3px);
}

.strong-and-free .event-time {
    font-family: 'Liberty Sans', sans-serif;
    color: var(--patriotic-text);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.strong-and-free .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--patriotic-text);
}

.strong-and-free .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--patriotic-text);
    opacity: 0.9;
}

.strong-and-free .modal-content button {
    background-color: var(--patriotic-accent1);
    color: var(--patriotic-primary);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--patriotic-transition);
    letter-spacing: 0.5px;
    font-family: 'Liberty Sans', sans-serif;
    border-radius: var(--patriotic-radius);
}

.strong-and-free .modal-content button:hover {
    background-color: var(--patriotic-hover);
    box-shadow: 0 3px 10px rgba(178, 34, 52, 0.1);
}

/* Close Button */
.strong-and-free .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--patriotic-primary);
    color: var(--patriotic-text);
    border: 1px solid var(--patriotic-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--patriotic-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.strong-and-free .modal .close-button:hover {
    background-color: var(--patriotic-text);
    color: var(--patriotic-accent1);
    border-color: var(--patriotic-text);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.strong-and-free .button,
.strong-and-free .transparent-button {
    border: 1px solid var(--patriotic-accent1);
    color: var(--patriotic-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Liberty Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--patriotic-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--patriotic-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.strong-and-free .button:hover,
.strong-and-free .transparent-button:hover {
    background-color: var(--patriotic-accent1);
    color: var(--patriotic-primary);
    box-shadow: 0 3px 10px rgba(178, 34, 52, 0.1);
}

.strong-and-free .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.strong-and-free #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.strong-and-free #theme-switcher {
    background-color: var(--patriotic-primary);
    color: var(--patriotic-text) !important;
    border: 1px solid var(--patriotic-accent1);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Liberty Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    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='%232C3E50'%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(--patriotic-transition);
    border-radius: var(--patriotic-radius);
}

.strong-and-free #theme-switcher option {
    background-color: var(--patriotic-primary) !important;
    color: var(--patriotic-text) !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px !important;
}

.strong-and-free #theme-switcher:focus {
    outline: none;
    border-color: var(--patriotic-accent1);
    box-shadow: 0 0 0 2px rgba(178, 34, 52, 0.1);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.strong-and-free #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 1rem 1.7rem;
    font-size: 0.95rem;
    font-family: 'Liberty Sans', sans-serif;
    font-weight: 500;
    color: var(--patriotic-primary);
    background-color: var(--patriotic-accent1);
    cursor: pointer;
    transition: all var(--patriotic-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--patriotic-radius);
    box-shadow: 0 2px 8px rgba(178, 34, 52, 0.2);
}

.strong-and-free #backToTopBtn:hover {
    background-color: var(--patriotic-hover);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.strong-and-free footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--patriotic-accent4);
    color: var(--patriotic-text);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .strong-and-free .container {
        padding: 1.5rem;
    }

    .strong-and-free #calendar-title {
        font-size: 2rem;
    }

    .strong-and-free #current-date {
        font-size: 1.5rem;
    }

    .strong-and-free #today-weather {
        font-size: 1.1rem;
    }

    .strong-and-free .modal-date {
        font-size: 1.3rem;
    }

    .strong-and-free .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .strong-and-free {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .strong-and-free .clock-face {
        width: 150px;
        height: 150px;
        border-width: 5px;
    }

    .strong-and-free th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .strong-and-free th span.full-day-name {
        display: none;
    }

    .strong-and-free th abbr {
        display: inline;
    }

    .strong-and-free td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .strong-and-free td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .strong-and-free td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .strong-and-free #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .strong-and-free #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .strong-and-free .modal-content {
        padding: 20px;
    }

    .strong-and-free .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .strong-and-free .container {
        padding: 1rem;
    }

    .strong-and-free #calendar-title {
        font-size: 1.7rem;
    }

    .strong-and-free #current-date {
        font-size: 1.3rem;
    }

    .strong-and-free #today-weather {
        font-size: 1rem;
    }

    .strong-and-free .clock-face {
        width: 130px;
        height: 130px;
        border-width: 4px;
    }

    .strong-and-free th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .strong-and-free td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .strong-and-free td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .strong-and-free #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .strong-and-free .modal-content {
        padding: 15px;
    }

    .strong-and-free .modal-date {
        font-size: 1.2rem;
    }

    .strong-and-free .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .strong-and-free th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .strong-and-free td {
        height: 60px;
    }

    .strong-and-free td .date-number {
        font-size: 0.9rem;
    }

    .strong-and-free #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}