/*
 * SilverThrive shared site styles
 * Version 3.0
 *
 * Site-wide visual foundation shared by calculators, legal pages,
 * contact pages, and existing SilverThrive content.
 */

:root {
    --st-bg: #07111d;
    --st-bg-2: #0b1d2f;
    --st-text: #ffffff;
    --st-text-soft: #d7e8f7;
    --st-muted: #bdd5ea;
    --st-link: #98C0E4;
    --st-link-strong: #b8e5ff;
    --st-panel: rgba(8, 14, 22, 0.64);
    --st-panel-border: rgba(152, 192, 228, 0.28);
    --st-footer-bg: #000000;
    --st-footer-text: #c8d4de;
    --st-rule: rgba(255, 255, 255, 0.12);
    --st-focus: #b8e5ff;
    --st-max-content: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: url('images/background1.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--st-text);
    text-align: center;
}

/* ===== Shared header / logo ===== */

header,
.site-header {
    width: 100%;
    text-align: center;
    padding: 20px;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== Shared typography / links ===== */

.hero {
    padding: 7px;
}

h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

p {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

a {
    color: var(--st-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--st-focus);
    outline-offset: 3px;
}

hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* ===== Shared home / content controls ===== */

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.button-wrapper {
    text-align: center;
}

.icon-button {
    width: 100px;
    height: 100px;
    transition: transform 0.2s ease;
}

.icon-button:hover {
    transform: scale(1.1);
}

.button-label {
    margin-top: 5px;
    font-size: 16px;
    font-weight: bold;
}

/* ===== Shared article / blog presentation ===== */

.alt-blog-posts {
    padding: 40px 20px;
}

.alt-blog-posts h2 {
    text-align: center;
    color: #fff;
    margin: 20px 0 10px;
}

.alt-post {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.post-image {
    flex: 0 0 40%;
    max-width: 40%;
    padding-right: 30px;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-content {
    flex: 1;
    text-align: left;
}

.post-content h3 {
    margin-top: 0;
    color: var(--st-link);
    text-align: left;
}

.post-content .date {
    font-size: 0.8em;
    font-style: italic;
    color: #fff;
    margin: 0 0 15px;
    text-align: left;
}

.post-content p {
    max-width: none;
    font-size: 1em;
    color: #fff;
    margin: 0;
    text-align: left;
}

.post-content p a,
.post-text p a {
    color: var(--st-link);
    text-decoration: none;
}

.post-content p a:hover,
.post-text p a:hover {
    text-decoration: underline;
}

.alt-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px;
}

.alt-blog-posts hr {
    border-top: 1px solid #888;
    width: 50%;
}

.post-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.alt-post-card {
    padding: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.post-card img,
.alt-post-card img {
    width: 100%;
    max-width: 350px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.post-text h3 {
    color: var(--st-link);
    margin-top: 0;
}

.post-text .date {
    font-size: 0.9em;
    font-style: italic;
    color: #ccc;
    margin: 5px 0 15px;
}

.post-text p {
    color: #fff;
}

/* ===== Shared footer =====
   Supports both the legacy <footer> markup and the legal-page .site-footer
   markup so footer appearance is identical across page families.
*/

footer,
.site-footer {
    margin-top: 50px;
    padding: 20px;
    background: var(--st-footer-bg);
    border-top: 1px solid var(--st-rule);
    color: var(--st-footer-text);
    font-size: 0.82rem;
    text-align: center;
}

footer p,
.site-footer p {
    margin: 0 auto 8px;
    max-width: 1100px;
    font-size: inherit;
    text-align: center;
}

.footer-legal-links,
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
}

.footer-legal-links a,
.footer-links a {
    color: var(--st-link);
    text-decoration: none;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus,
.footer-links a:hover,
.footer-links a:focus {
    color: #fff;
    text-decoration: underline;
}

.footer-legal-links span,
.footer-links span {
    color: #777;
}

/* ===== Accessibility helpers ===== */

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 10000;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fff;
    color: #07111d;
    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Registered trademark mark ===== */

.trademark {
    font-size: 0.38em;
    vertical-align: super;
    line-height: 0;
    margin-left: 2px;
    font-weight: normal;
}

@media (max-width: 640px) {
    .icon-button {
        width: 88px;
        height: 88px;
    }

    .footer-legal-links,
    .footer-links {
        gap: 5px 7px;
        line-height: 1.6;
    }
}
