/* ============================================================
   Saint of the Day — Frontend Styles
   Brand: #008bc9 (blue) / #feeb41 (gold)
   ============================================================ */

.sotd-widget {
    --sotd-blue: #008bc9;
    --sotd-blue-dark: #00648f;
    --sotd-gold: #feeb41;
    --sotd-gold-deep: #d9b800;
    --sotd-ink: #1c2b33;
    --sotd-paper: #fffdf6;
    max-width: 1200px;
    width: 100%;
    margin: 32px auto;
    padding: 0 40px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--sotd-ink);
    position: relative;
}

.sotd-page-wrap {
    padding: 20px 16px 60px;
}

/* ── Card shell ─────────────────────────────────────── */
.sotd-card {
    background: var(--sotd-paper);
    position: relative;
    animation: sotd-fade-in 0.35s ease;
}

@keyframes sotd-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Eyebrow row ────────────────────────────────────── */
.sotd-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 24px;
    flex-wrap: wrap;
}

.sotd-eyebrow-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--sotd-blue);
}

.sotd-feast-badge {
    background: var(--sotd-gold);
    color: #4a3d00;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
}

/* ── Photo ──────────────────────────────────────────── */
.sotd-photo {
    margin: 18px 0 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.sotd-photo img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center top;
}

/* ── Title & date ───────────────────────────────────── */
.sotd-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1.25;
    font-weight: 700;
    margin: 26px 0 4px;
    color: var(--sotd-blue-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sotd-date {
    margin: 0 0 22px;
    font-size: 14px;
    color: #7a8a92;
    font-style: italic;
}

/* ── Story body ─────────────────────────────────────── */
.sotd-story {
    margin: 0;
    font-size: 17px;
    line-height: 1.85;
    color: #2c3b42;
}

.sotd-story p { margin: 0 0 14px; }
.sotd-story p:last-child { margin-bottom: 0; }
.sotd-story em, .sotd-story i { color: #46565e; }

.sotd-source {
    margin: 14px 0 0;
    font-size: 12.5px;
    color: #8a9aa2;
}
.sotd-source a { color: var(--sotd-blue); text-decoration: none; }
.sotd-source a:hover { text-decoration: underline; }

/* ── Reflection panel ───────────────────────────────── */
.sotd-reflection {
    margin: 40px 0 0;
    padding: 32px 36px;
    background: linear-gradient(135deg, rgba(0,139,201,0.06), rgba(254,235,65,0.10));
    border-radius: 14px;
}

.sotd-reflection-label {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sotd-blue);
}

.sotd-reflection-text {
    margin: 0;
    font-size: 20px;
    line-height: 1.7;
    font-style: italic;
    color: #263840;
}

/* ── Hashtags ───────────────────────────────────────── */
.sotd-hashtags {
    margin: 22px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sotd-pill {
    font-size: 12px;
    color: var(--sotd-blue-dark);
    background: rgba(0,139,201,0.08);
    padding: 4px 10px;
    border-radius: 999px;
}

/* ── CTA block ──────────────────────────────────────── */
.sotd-cta {
    margin: 32px 0 0;
    padding: 26px 30px;
    border-radius: 14px;
    background: var(--sotd-blue);
    background: linear-gradient(160deg, var(--sotd-blue), var(--sotd-blue-dark));
    color: #fff;
}

.sotd-cta-heading {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 14.5px;
    line-height: 1.4;
}

.sotd-cta-body {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
}

.sotd-cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.sotd-cta-btn {
    display: inline-block;
    background: var(--sotd-gold);
    color: #4a3d00;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sotd-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sotd-cta-resource {
    color: #fff;
    font-size: 12.5px;
    text-decoration: underline;
    opacity: 0.9;
}
.sotd-cta-resource:hover { opacity: 1; }

.sotd-cta-handle {
    margin: 12px 0 0;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}

/* ── Author + share ─────────────────────────────────── */
.sotd-author {
    margin: 18px 0 0;
    font-size: 12.5px;
    color: #8a9aa2;
    font-style: italic;
}

.sotd-share {
    margin: 10px 0 0;
    padding-bottom: 32px;
    font-size: 12.5px;
}
.sotd-share a { color: var(--sotd-blue); text-decoration: none; }
.sotd-share a:hover { text-decoration: underline; }

/* ── Empty / fallback states ────────────────────────── */
.sotd-empty {
    padding: 30px;
    text-align: center;
    color: #7a8a92;
    background: #f4f7f8;
    border-radius: 14px;
    font-family: Georgia, serif;
}

.sotd-fallback-note {
    text-align: center;
    font-size: 13px;
    color: var(--sotd-blue-dark);
    background: rgba(254,235,65,0.25);
    padding: 8px 14px;
    border-radius: 8px;
    margin: 0 0 14px;
}

/* ── Navigation controls ────────────────────────────── */
.sotd-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 139, 201, 0.15);
    flex-wrap: wrap;
}

.sotd-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid var(--sotd-blue);
    color: var(--sotd-blue);
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sotd-nav-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sotd-nav-btn:hover:not(:disabled) {
    background: var(--sotd-blue);
    color: #fff;
}

.sotd-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sotd-date-jump {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 140px;
}

.sotd-date-input {
    border: 1.5px solid #d7e2e6;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--sotd-ink);
    background: #fff;
    max-width: 170px;
}

/* ── Loading indicator ──────────────────────────────── */
.sotd-loading {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
.sotd-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sotd-blue);
    animation: sotd-bounce 0.9s infinite ease-in-out;
}
.sotd-loading span:nth-child(2) { animation-delay: 0.15s; background: var(--sotd-gold-deep); }
.sotd-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes sotd-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.sotd-widget.is-loading .sotd-card-slot { opacity: 0.4; pointer-events: none; }
.sotd-widget.is-loading .sotd-loading { display: flex; }

/* ── Responsive ──────────────────────────────────────── */
.sotd-eyebrow,
.sotd-name,
.sotd-date,
.sotd-story,
.sotd-source,
.sotd-reflection,
.sotd-hashtags,
.sotd-cta,
.sotd-author,
.sotd-share {
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
}

@media (max-width: 700px) {
    .sotd-widget { margin: 20px auto; padding: 0 20px; }
    .sotd-name { font-size: 30px; }
    .sotd-story { font-size: 16px; }
    .sotd-photo img { height: 280px; }
    .sotd-reflection-text { font-size: 18px; }
}

@media (max-width: 480px) {
    .sotd-widget { padding: 0 16px; }
    .sotd-name { font-size: 24px; letter-spacing: 0; }
    .sotd-date { font-size: 12.5px; }
    .sotd-story { font-size: 15.5px; }
    .sotd-photo img { height: 200px; }
    .sotd-reflection { padding: 20px 18px; margin-top: 28px; }
    .sotd-reflection-text { font-size: 16.5px; }
    .sotd-cta { padding: 18px; }
    .sotd-nav { justify-content: center; gap: 8px; }
    .sotd-nav-btn { padding: 8px 12px; font-size: 12.5px; }
    .sotd-date-jump { order: 3; flex-basis: 100%; }
    .sotd-eyebrow { gap: 8px; }
}

@media (max-width: 360px) {
    .sotd-nav-btn span,
    .sotd-nav-btn { font-size: 12px; padding: 7px 10px; }
    .sotd-name { font-size: 21px; }
}
