/**
 * @file plugins/themes/lumina/styles/components/static-page.css
 *
 * Copyright (c) 2026 Lumina Project contributors
 * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
 *
 * @brief Universal static page styling framework for Lumina theme.
 *        Applies unified typography, custom lists, striped tables, blockquotes,
 *        auto-scaling images, CTA elements, and structured contact directories.
 */

/* =========================================================
   UNIVERSAL WRAPPER & CONTAINER
   ========================================================= */
.lm-static-page {
    width: 100%;
    box-sizing: border-box;
    min-height: 480px; /* Spacing fix: prevents footer from floating on short content */
}


.lm-static-hero {
    margin-bottom: 2.5rem;
    border-bottom: 1.5px solid var(--lm-border, #e2e8f0);
    padding-bottom: 1.25rem;
}

.lm-static-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--lm-text-primary, #0f172a);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
}

.lm-static-content {
    color: var(--lm-text-secondary, #334155);
    font-size: 1.05rem;
    line-height: 1.75;
    font-weight: 400;
}

/* =========================================================
   TYPOGRAPHY SYSTEM
   ========================================================= */
.lm-static-content h1,
.lm-static-content h2,
.lm-static-content h3,
.lm-static-content h4,
.lm-static-content h5,
.lm-static-content h6 {
    color: var(--lm-text-primary, #0f172a);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.lm-static-content h1 { font-size: 1.85rem; }
.lm-static-content h2 { font-size: 1.5rem; }
.lm-static-content h3 { font-size: 1.25rem; }
.lm-static-content h4 { font-size: 1.15rem; }
.lm-static-content h5, .lm-static-content h6 { font-size: 1rem; }

.lm-static-content > *:first-child {
    margin-top: 0;
}

.lm-static-content p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--lm-text-secondary, #334155);
}

.lm-static-content hr {
    border: 0;
    height: 1px;
    background-color: var(--lm-border, #e2e8f0);
    margin: 2rem 0;
}

/* =========================================================
   LIST STYLES (Unordered, Ordered, and Nested)
   ========================================================= */
.lm-static-content ul,
.lm-static-content ol {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

.lm-static-content ul {
    list-style-type: disc;
}

.lm-static-content ol {
    list-style-type: decimal;
}

.lm-static-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.lm-static-content ul ul,
.lm-static-content ol ol,
.lm-static-content ul ol,
.lm-static-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.lm-static-content ul ul {
    list-style-type: circle;
}

/* =========================================================
   TABLE STYLES (Responsive, Striped, Bordered)
   ========================================================= */
.lm-static-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.lm-static-content th,
.lm-static-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--lm-border, #e2e8f0);
    box-sizing: border-box;
}

.lm-static-content th {
    background-color: var(--lm-surface-muted, #f8fafc);
    color: var(--lm-text-primary, #0f172a);
    font-weight: 700;
    border-top: 1px solid var(--lm-border, #e2e8f0);
    border-bottom: 2px solid var(--lm-border, #e2e8f0);
    white-space: nowrap;
}

.lm-static-content tr:nth-child(even) {
    background-color: var(--lm-surface-muted, #f8fafc);
}

.lm-static-content tr:hover {
    background-color: #f1f5f9;
}

/* =========================================================
   BLOCKQUOTE STYLE
   ========================================================= */
.lm-static-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--lm-surface-muted, #f8fafc);
    border-left: 4px solid var(--lm-link, #2563eb);
    border-radius: 0 8px 8px 0;
    color: var(--lm-text-secondary, #475569);
    font-style: italic;
}

.lm-static-content blockquote p {
    margin-bottom: 0;
}

.lm-static-content blockquote p + p {
    margin-top: 0.75rem;
}

/* =========================================================
   IMAGE SYSTEM
   ========================================================= */
.lm-static-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.75rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   REUSABLE CTA COMPONENT
   ========================================================= */
.lm-static-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2.5rem 0;
    padding: 1.75rem;
    background-color: var(--lm-surface-muted, #f8fafc);
    border: 1px solid var(--lm-border, #e2e8f0);
    border-radius: 12px;
    align-items: center;
    justify-content: space-between;
}

.lm-static-cta-content {
    flex: 1;
    min-width: 250px;
}

.lm-static-cta-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--lm-text-primary, #0f172a);
    margin: 0 0 0.25rem 0;
}

.lm-static-cta-description {
    font-size: 0.95rem;
    color: var(--lm-text-secondary, #475569);
    margin: 0;
}

.lm-static-cta-action {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--lm-link, #2563eb);
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lm-static-cta-action:hover {
    background-color: var(--lm-link-hover, #1d4ed8);
    transform: translateY(-1px);
}

/* =========================================================
   CONTACT DIRECTORY LAYOUT (Type B)
   ========================================================= */
.page_contact .contact_section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .page_contact .contact_section {
        grid-template-columns: 1fr 1fr;
    }
    .page_contact .address {
        grid-column: span 2;
    }
}

@media (min-width: 992px) {
    .page_contact .contact_section {
        grid-template-columns: 320px 1fr;
        align-items: start;
    }
    .page_contact .address {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
    }
    .page_contact .contact.primary {
        grid-column: 2;
        grid-row: 1;
    }
    .page_contact .contact.support {
        grid-column: 2;
        grid-row: 2;
    }
}


.page_contact .address {
    padding: 1.5rem;
    background-color: var(--lm-surface-muted, #f8fafc);
    border: 1px solid var(--lm-border, #e2e8f0);
    border-radius: 12px;
    line-height: 1.6;
    color: var(--lm-text-secondary, #334155);
}

.page_contact .contact {
    padding: 1.75rem;
    background-color: var(--lm-surface, #ffffff);
    border: 1px solid var(--lm-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page_contact .contact h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lm-text-primary, #0f172a);
    margin: 0 0 0.5rem 0;
    border-bottom: 1.5px solid var(--lm-border, #f1f5f9);
    padding-bottom: 0.5rem;
}

.page_contact .contact .name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--lm-text-primary, #0f172a);
}

.page_contact .contact .title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--lm-text-secondary, #475569);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.page_contact .contact .affiliation {
    font-size: 0.95rem;
    color: var(--lm-text-secondary, #64748b);
}

.page_contact .contact .phone {
    font-size: 0.95rem;
    color: var(--lm-text-secondary, #475569);
    display: flex;
    gap: 0.5rem;
}

.page_contact .contact .phone .label {
    font-weight: 600;
}

.page_contact .contact .email {
    margin-top: 0.5rem;
}

.page_contact .contact .email a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--lm-surface-muted, #f1f5f9);
    border: 1px solid var(--lm-border, #e2e8f0);
    color: var(--lm-link, #2563eb) !important;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.page_contact .contact .email a:hover {
    background-color: var(--lm-border-light, #e2e8f0);
    border-color: var(--lm-link-muted, #93c5fd);
}
