/* LITURGIA.CSS - Stili unificati, Dark Mode, Stepper & Accessibilità */

:root {
    --bg-color: #f4f4f9;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #666666;
    --primary-color: #2980b9;
    --primary-hover: #1f6696;
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --progress-bg: #e0e0e0;
    --progress-fill: #3498db;
    --font-scale: 1rem;
}

[data-theme="dark"] {
    --bg-color: #121214;
    --card-bg: #1e1e24;
    --text-color: #e4e6eb;
    --text-muted: #a0a0a8;
    --primary-color: #3498db;
    --primary-hover: #5dade2;
    --border-color: #33333d;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    --progress-bg: #2d2d38;
    --progress-fill: #3498db;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 15px;
    font-size: var(--font-scale);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    touch-action: pan-y;
    overscroll-behavior-x: none;
}

/* Toolbar preferenze (Dark Mode & Dimensione Font) */
.toolbar-top {
    max-width: 650px;
    margin: 0 auto 15px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tool-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.home-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Container principale */
.container {
    max-width: 650px;
    margin: auto;
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

h1, h2, h3 {
    color: var(--text-color);
    text-align: center;
}

h2 {
    font-size: 1.35em;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Stepper */
.step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.progress-container {
    width: 100%;
    background-color: var(--progress-bg);
    height: 8px;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background-color: var(--progress-fill);
    width: 0%;
    transition: width 0.35s ease;
}

/* Pulsanti Navigazione */
.buttons {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 18px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s, opacity 0.2s;
    text-align: center;
}

.btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn:disabled {
    background-color: #bdc3c7;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Audio Player */
audio {
    margin: 15px auto;
    width: 100%;
    max-width: 450px;
    display: block;
    border-radius: 30px;
}

/* Scheda Santo del Giorno */
.santo-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: left;
}

[data-theme="dark"] .santo-card {
    background: rgba(255, 255, 255, 0.05);
}

.santo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.santo-info {
    font-size: 0.88rem;
    color: var(--text-color);
}

.santo-info strong {
    display: block;
    font-size: 0.95rem;
}
