/* Enhanced Accessibility Dark Theme */
:root {
    --bg-color: #121212;
    --card-bg: #2b2b2b;
    --text-primary: #f0f0f0;
    --text-secondary: #c0c0c0;
    --accent-color: #7fbfff;
    --focus-outline: 3px solid var(--accent-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h1 {
    color: var(--accent-color);
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 2rem;
    text-align: center;
}

#search-bar {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid #404040;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-bar:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(127, 191, 255, 0.3);
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card:focus-within {
    outline: var(--focus-outline);
    outline-offset: 2px;
    transform: translateY(-2px);
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #404040;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.pin-button, .unpin-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.pin-button:hover, .unpin-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.pin-button svg {
    fill: none;
    stroke: var(--text-secondary);
}

.unpin-button svg {
    fill: var(--accent-color);
    stroke: var(--accent-color);
}

.card a {
    color: var(--accent-color); /* Accessible light blue */
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.card a:visited {
    color: #be9eff;            /* Accessible light purple for visited */
}

.card a:hover {
    border-bottom-color: currentColor;
    text-decoration-thickness: 2px;
    filter: brightness(1.2); /* Brighter on hover */
}

.card a:focus {
    outline: var(--focus-outline); /* Use consistent focus outline */
    outline-offset: 2px;
}

.card a:active {
    filter: brightness(0.9); /* Dim on active */
    transition: none;
}

/* Email specific styling */
a[href^="mailto:"] {
    /* Color is inherited from .card a */
    text-decoration: underline;
    text-decoration-color: rgba(127, 191, 255, 0.4); /* Adjusted alpha for accent color */
}

/* Phone specific styling */
a[href^="tel:"] {
    color: #6fcf97; /* Accessible light green */
    text-decoration: underline;
    text-decoration-color: rgba(111, 207, 151, 0.4);
}

/* Visited state differentiation */
a[href^="mailto:"]:visited,
a[href^="tel:"]:visited {
    color: #be9eff; /* Consistent visited color */
}

h2 {
    color: var(--accent-color);
    margin: 0 0 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #404040;
    padding-bottom: 0.5rem;
}

.content {
    color: var(--text-secondary);
    font-size: clamp(.9rem, 2.5vw, 1rem);
}

.timestamp {
    color: #888;
    font-size: 0.9rem;
    text-align: right;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #404040;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: var(--card-bg); /* Ensure table bg matches card */
}

.hours-table th {
    background: #3c3c3c;
    color: var(--text-primary);
    padding: 0.75rem;
    text-align: left;
}

.hours-table td {
    color: var(--text-secondary);
    padding: 0.75rem;
    border-bottom: 1px solid #404040;
}

.hours-table tr:nth-child(odd) {
    background-color: var(--card-bg);
}

.hours-table tr:nth-child(even) {
    background-color: #333333;
}

.hours-table tr:last-child td {
    border-bottom: none;
}

.hours-note {
    color: #d35400;
    margin-top: 1rem;
    font-size: 0.9em;
    padding: 0.5rem;
    border-left: 3px solid #d35400;
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
}

@media print {
    body {
        background: white !important;
        color: black !important;
        max-width: 100%;
    }
    
    .card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
    
    .timestamp {
        color: #555;
    }
}