/* ==========================================================================
   Work of Art Theme - Gallery Elegance
   Version: 1.3
   Updated: 2024-06-08
   Features:
   - Museum-inspired color palette
   - Artistic typography and textures
   - Canvas-like design elements
   - Curated visual hierarchy
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Proza+Libre:wght@400;600&display=swap');

:root {
    /* Gallery Color Palette */
    --art-bg: #F8F5F0;
    --art-text: #3A3A3A;
    --art-primary: #FFFFFF;
    --art-secondary: #F0EDE8;
    --art-date-number: #8B5A2B;

    /* Artistic Texture Colors */
    --art-texture1: #E8E5E0;
    --art-texture2: #E0DDD8;
    --art-texture3: #D8D5D0;
    --art-texture4: #D0CDC8;
    --art-texture5: #C8C5C0;

    /* Artistic Accent Colors */
    --art-gold: #B38B6D;
    --art-maroon: #8B5A2B;
    --art-ivory: #FFFFF8;
    --art-accent1: #D4B483;
    --art-accent2: #A67C52;
    --art-accent3: #C19A6B;
    --art-accent4: rgba(179, 139, 109, 0.3);
    --art-accent5: rgba(139, 90, 43, 0.1);

    /* Theme Variables */
    --art-shadow: rgba(0, 0, 0, 0.08);
    --art-radius: 0px;
    /* Sharp edges like canvas frames */
    --art-transition: 0.25s ease-out;
    --art-hover: #A67C52;
    --art-glow: 0 0 0 2px rgba(179, 139, 109, 0.3);
    --art-pattern: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%238B5A2B" stroke-width="0.5" stroke-dasharray="5,5"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes art-fadein {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes art-stroke {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes art-highlight {

    0%,
    100% {
        box-shadow: var(--art-glow);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(179, 139, 109, 0.2);
    }
}

/* ==================== BASE STYLES ==================== */
.work-of-art {
    font-family: 'Proza Libre', sans-serif;
    color: var(--art-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--art-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"><rect width="1" height="1" x="10" y="10" fill="%238B5A2B" opacity="0.05"/><rect width="1" height="1" x="30" y="70" fill="%238B5A2B" opacity="0.05"/><rect width="1" height="1" x="70" y="30" fill="%238B5A2B" opacity="0.05"/><rect width="1" height="1" x="90" y="90" fill="%238B5A2B" opacity="0.05"/></svg>');
}

.work-of-art .container {
    background-color: var(--art-primary);
    padding: 2.5rem;
    border: 1px solid var(--art-texture3);
    box-shadow: 0 2px 10px var(--art-shadow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--art-radius);
}

.work-of-art .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--art-maroon),
            transparent);
}

.work-of-art .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--art-maroon),
            transparent);
}

/* ==================== HEADER & TITLE ==================== */
.work-of-art #calendar-title {
    font-family: 'Cormorant Garamond', serif;
    color: var(--art-maroon);
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
}

.work-of-art #calendar-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background-color: var(--art-gold);
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.work-of-art #date-weather-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--art-primary);
    border: 1px solid var(--art-texture3);
    position: relative;
    box-shadow: 0 1px 3px var(--art-shadow);
}

.work-of-art #date-weather-container::before {
    content: "EXHIBITION";
    position: absolute;
    top: -12px;
    left: 20px;
    background-color: var(--art-primary);
    padding: 0 10px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--art-maroon);
    font-weight: 600;
    font-family: 'Proza Libre', sans-serif;
    text-transform: uppercase;
}

.work-of-art #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--art-gold),
            transparent);
}

.work-of-art #current-date {
    font-family: 'Cormorant Garamond', serif;
    color: var(--art-text);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.work-of-art #today-weather {
    font-family: 'Proza Libre', sans-serif;
    color: var(--art-text);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    font-style: italic;
}

/* ==================== ANALOG CLOCK ==================== */
.work-of-art #analog-watch {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    position: relative;
}

.work-of-art .clock-face {
    width: 180px;
    height: 180px;
    border: 1px solid var(--art-maroon);
    border-radius: 50%;
    position: relative;
    background-color: var(--art-primary);
    box-shadow: 0 1px 3px var(--art-shadow);
}

.work-of-art .clock-face::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed var(--art-gold);
    border-radius: 50%;
    opacity: 0.5;
}

.work-of-art .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);
}

.work-of-art .hour-hand {
    width: 35%;
    left: 15%;
    height: 3px;
    background: var(--art-maroon);
    margin-top: -1.5px;
}

.work-of-art .minute-hand {
    width: 45%;
    left: 5%;
    height: 2px;
    background: var(--art-text);
    margin-top: -1px;
}

.work-of-art .second-hand {
    width: 45%;
    left: 5%;
    height: 1px;
    background: var(--art-accent3);
    margin-top: -0.5px;
}

.work-of-art .clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: var(--art-maroon);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* ==================== CALENDAR TABLE ==================== */
.work-of-art table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
    margin: 2rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.work-of-art th {
    background-color: var(--art-primary);
    color: var(--art-maroon) !important;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    padding: 1rem 0.5rem;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 1rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--art-gold);
    text-transform: uppercase;
}

.work-of-art th span.full-day-name {
    display: inline;
}

.work-of-art th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.work-of-art td {
    background-color: var(--art-primary);
    color: var(--art-text);
    padding: 1.2rem;
    border: 1px solid var(--art-texture3);
    height: 120px;
    vertical-align: top;
    transition: all var(--art-transition);
    position: relative;
    box-shadow: 0 1px 2px var(--art-shadow);
}

.work-of-art td .date-number {
    color: var(--art-maroon) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: 'Cormorant Garamond', serif;
}

.work-of-art td:hover {
    background-color: var(--art-secondary);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px var(--art-shadow);
}

/* Current date highlight */
.work-of-art td.current-day {
    background-color: var(--art-secondary);
    border-left: 3px solid var(--art-maroon);
    animation: art-highlight 3s infinite;
}

.work-of-art td.current-day .date-number {
    color: var(--art-text) !important;
    font-weight: 700;
}

.work-of-art td.current-day::before {
    content: "🖌️";
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    font-size: 1rem;
}

/* ==================== EVENT MARKERS ==================== */
.work-of-art .event-marker {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--art-maroon);
    margin: 0 2px;
    transition: all var(--art-transition);
}

.work-of-art .event-marker:hover {
    transform: scale(1.5);
    background-color: var(--art-accent3);
}

/* ==================== MODAL STYLES ==================== */
.work-of-art .modal-content {
    position: relative;
    background-color: var(--art-primary);
    border: 1px solid var(--art-texture3);
    padding: 2rem;
    color: var(--art-text);
    box-shadow: 0 5px 15px var(--art-shadow);
    animation: art-fadein 0.3s ease-out;
}

.work-of-art .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--art-maroon),
            transparent);
}

.work-of-art .modal-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--art-maroon),
            transparent);
}

.work-of-art .modal-content h2 {
    color: var(--art-maroon);
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2em;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Modal date display */
.work-of-art .modal-date {
    font-family: 'Cormorant Garamond', serif;
    color: var(--art-text);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--art-texture3);
}

/* Event list */
.work-of-art .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.work-of-art .event-item {
    background-color: var(--art-primary);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border-left: 3px solid var(--art-gold);
    transition: all var(--art-transition);
    position: relative;
}

.work-of-art .event-item:hover {
    background-color: var(--art-secondary);
    transform: translateX(5px);
}

.work-of-art .event-time {
    font-family: 'Proza Libre', sans-serif;
    color: var(--art-maroon);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
    letter-spacing: 0.05em;
}

.work-of-art .event-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--art-text);
    font-family: 'Cormorant Garamond', serif;
}

.work-of-art .event-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--art-text);
}

.work-of-art .modal-content button {
    background-color: var(--art-maroon);
    color: var(--art-ivory);
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--art-transition);
    letter-spacing: 0.05em;
    font-family: 'Proza Libre', sans-serif;
    margin-top: 1rem;
    text-transform: uppercase;
}

.work-of-art .modal-content button:hover {
    background-color: var(--art-accent2);
}

/* Close Button */
.work-of-art .modal .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: transparent;
    color: var(--art-text);
    border: 1px solid var(--art-texture3);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--art-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.work-of-art .modal .close-button:hover {
    background-color: var(--art-secondary);
    color: var(--art-maroon);
    border-color: var(--art-maroon);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.work-of-art .button,
.work-of-art .transparent-button {
    border: 1px solid var(--art-maroon);
    color: var(--art-ivory);
    background-color: var(--art-maroon);
    padding: 0.8rem 1.5rem;
    font-family: 'Proza Libre', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--art-transition);
    margin: 0.4rem;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.work-of-art .transparent-button {
    background-color: transparent;
    color: var(--art-text);
    border-color: var(--art-texture4);
}

.work-of-art .button:hover,
.work-of-art .transparent-button:hover {
    background-color: var(--art-accent2);
    color: var(--art-ivory);
    border-color: var(--art-accent2);
}

.work-of-art .transparent-button:hover {
    color: var(--art-maroon);
    background-color: var(--art-secondary);
    border-color: var(--art-maroon);
}

.work-of-art .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.work-of-art #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.work-of-art #theme-switcher {
    background-color: var(--art-primary);
    color: var(--art-text) !important;
    border: 1px solid var(--art-texture3);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Proza Libre', 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='%238B5A2B'%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(--art-transition);
}

.work-of-art #theme-switcher option {
    background-color: var(--art-primary) !important;
    color: var(--art-text) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 12px !important;
}

.work-of-art #theme-switcher:focus {
    outline: none;
    border-color: var(--art-maroon);
    box-shadow: var(--art-glow);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.work-of-art #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-family: 'Proza Libre', sans-serif;
    font-weight: 600;
    color: var(--art-ivory);
    background-color: var(--art-maroon);
    cursor: pointer;
    transition: all var(--art-transition);
    opacity: 0.9;
    display: none;
    text-transform: uppercase;
}

.work-of-art #backToTopBtn:hover {
    background-color: var(--art-accent2);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.work-of-art footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--art-texture3);
    color: var(--art-text);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 1200px) {
    .work-of-art .container {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .work-of-art #calendar-title {
        font-size: 2.5rem;
    }

    .work-of-art #current-date {
        font-size: 1.8rem;
    }

    .work-of-art .clock-face {
        width: 160px;
        height: 160px;
    }

    .work-of-art td {
        height: 110px;
    }
}

@media (max-width: 768px) {
    .work-of-art {
        font-size: 0.95rem;
    }

    .work-of-art .container {
        padding: 1.5rem;
    }

    .work-of-art #calendar-title {
        font-size: 2rem;
    }

    .work-of-art #current-date {
        font-size: 1.5rem;
    }

    .work-of-art #today-weather {
        font-size: 1rem;
    }

    .work-of-art .clock-face {
        width: 140px;
        height: 140px;
    }

    .work-of-art th {
        font-size: 0.9rem;
        padding: 0.8rem 0.3rem;
    }

    .work-of-art td {
        padding: 1rem;
        height: 100px;
    }

    .work-of-art td .date-number {
        font-size: 1.1rem;
    }

    .work-of-art #backToTopBtn {
        right: 20px;
        bottom: 20px;
    }

    .work-of-art #theme-switcher {
        min-width: 180px;
    }
}

@media (max-width: 576px) {
    .work-of-art .container {
        padding: 1.2rem;
    }

    .work-of-art #calendar-title {
        font-size: 1.8rem;
    }

    .work-of-art #current-date {
        font-size: 1.3rem;
    }

    .work-of-art .clock-face {
        width: 120px;
        height: 120px;
    }

    .work-of-art td {
        height: 90px;
        padding: 0.8rem;
    }

    .work-of-art #theme-switcher {
        min-width: 160px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .work-of-art #calendar-title {
        font-size: 1.5rem;
    }

    .work-of-art .clock-face {
        width: 100px;
        height: 100px;
    }

    .work-of-art td {
        height: 80px;
    }

    .work-of-art #theme-switcher {
        min-width: 140px;
    }
}