/* =============================================================
   Custom Styles — Dustin Massingale Homepage
   Replaces Bootstrap with W3.CSS + Custom CSS
   ============================================================= */

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

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

body {
    background-color: azure;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
    margin: 0;
    color: #222;
}

/* ── Fade-in Animation ── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-in both;
}

/* =============================================================
   HEADER & NAVIGATION
   ============================================================= */

.site-header {
    background-color: #000;
    color: #fff;
}

.nav-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 5%;
    border-bottom: 1px solid #333;
    gap: 8px;
}

.site-name {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
}

.site-name:hover {
    color: #ccc;
}

/* ── Nav Link List ── */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 0.95rem;
    text-decoration: none;
    transition:
        background 0.2s,
        color 0.2s;
    user-select: none;
}

.nav-link:hover {
    background-color: #333;
    color: #fff;
}

.nav-link.nav-active {
    background-color: #4caf50;
    color: #fff;
    font-weight: 600;
}

/* =============================================================
   CONTENT SECTIONS
   ============================================================= */

.site-section {
    padding: 20px 5%;
}

/* =============================================================
   CARDS
   ============================================================= */

.custom-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.motd-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.about-section-card {
    background: #e8f4f8;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 16px;
}

/* =============================================================
   SKILL / INFO LISTS  (replaces Bootstrap list-group)
   ============================================================= */

.skill-list {
    list-style: none;
    margin: 8px 0 16px;
    padding: 0;
}

.skill-list > li {
    border: 1px solid #ddd;
    padding: 10px 14px;
    margin-bottom: -1px;
    background: #fff;
}

.skill-list > li:first-child {
    border-radius: 6px 6px 0 0;
}
.skill-list > li:last-child {
    border-radius: 0 0 6px 6px;
    margin-bottom: 12px;
}

.skill-list > li > ul {
    margin: 6px 0 0 0;
    padding-left: 20px;
}

.source-links {
    padding-left: 20px;
    margin: 8px 0 16px;
}

/* =============================================================
   PRODUCTS SECTION
   ============================================================= */

.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.product-card {
    flex: 1 1 220px;
    max-width: 320px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.product-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
    display: block;
}

.product-card h2 {
    font-size: 1.1rem;
    margin: 0 0 10px;
}

.product-card ul {
    padding-left: 18px;
    margin: 8px 0 0;
}

.video-card {
    flex: 2 1 300px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.video-card h2 {
    font-size: 1.1rem;
    margin: 0 0 12px;
}

.video-card iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 4px;
    display: block;
}

/* =============================================================
   DIGITAL APPS SECTION (Products page)
   ============================================================= */

.apps-section-header {
    margin: 32px 0 12px;
    border-top: 2px solid #ddd;
    padding-top: 24px;
}

.apps-section-header h2 {
    margin: 0 0 4px;
}

.apps-section-header p {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}

.pwa-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwa-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #444;
    flex: 1;
}

.pwa-card--sbible {
    border-top: 3px solid #0066cc;
}

.pwa-card--bible-kids {
    border-top: 3px solid #C44569;
}

.pwa-icon {
    width: 72px;
    height: 72px;
}

.pwa-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.pwa-icon--emoji {
    font-size: 3.2rem;
    line-height: 72px;
    text-align: center;
}

.pwa-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.pwa-launch-btn,
.pwa-install-btn {
    font-size: 0.9rem;
    padding: 8px 14px;
}

/* =============================================================
   SBIBLE GREEK CALLOUT
   ============================================================= */

.sbible-callout {
    background: #e8f0fe;
    border: 1px solid #93b4f5;
    border-left: 4px solid #0066cc;
    border-radius: 0 6px 6px 0;
    padding: 18px 20px;
    margin: 24px 0 20px;
    max-width: 860px;
}

.sbible-callout-header {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0044aa;
    margin-bottom: 8px;
}

.sbible-callout p {
    margin: 0 0 14px;
    font-size: 0.925rem;
    line-height: 1.6;
}

/* =============================================================
   GREEK SECTION LAYOUT
   ============================================================= */

.greek-intro {
    max-width: 860px;
}

.greek-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    margin-top: 16px;
}

.greek-image-col {
    flex: 1 1 280px;
}

.greek-image-wrapper {
    position: relative;
    display: block;
    line-height: 0; /* removes gap below img */
}

.greek-image-col img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* ── Expand button overlaid on the image ── */
.expand-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    z-index: 10;
    transition: background 0.2s;
    line-height: 1.4;
}

.expand-btn:hover {
    background: rgba(0, 0, 0, 0.88);
}

.greek-accordion-col {
    flex: 2 1 380px;
}

/* ── Expanded state: image goes full-width, accordion reflows below ── */
.greek-layout.expanded {
    flex-direction: column;
}

.greek-layout.expanded .greek-image-col {
    flex: 1 1 100%;
    max-width: 100%;
}

.greek-layout.expanded .greek-accordion-col {
    flex: 1 1 100%;
}

/* =============================================================
   ACCORDION
   ============================================================= */

.accordion-group {
    margin-bottom: 16px;
}

.accordion-wrapper {
    margin-bottom: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-trigger {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 48px 12px 16px;
    background: #f7f7f7;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
    position: relative;
    color: #333;
    line-height: 1.4;
}

.accordion-trigger::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    line-height: 1;
}

.accordion-trigger.accordion-open {
    background: #e8f5e9;
}

.accordion-trigger.accordion-open::after {
    content: "\2212"; /* minus sign */
}

.accordion-trigger:hover {
    background: #efefef;
}

[data-accordion-content] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    background: #fff;
}

[data-accordion-content].open {
    max-height: 3000px;
    transition: max-height 0.5s ease-in;
}

.accordion-body-inner {
    padding: 14px 16px;
}

/* =============================================================
   BIOGRAPHY SECTION (Dr. W. Larry Richards)
   ============================================================= */

.biography-toggle-bar {
    text-align: right;
    padding: 8px 0 16px;
}

#LarryBiography {
    display: none;
}

/* =============================================================
   BUTTONS
   ============================================================= */

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background-color: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary-custom:hover {
    background-color: #0b5ed7;
    color: #fff;
}

.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background-color: transparent;
    color: #0d6efd;
    border: 2px solid #0d6efd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-outline-custom:hover {
    background-color: #0d6efd;
    color: #fff;
}

.btn-outline-custom:disabled,
.btn-outline-custom[data-installed] {
    border-color: #28a745;
    color: #28a745;
    cursor: default;
    opacity: 0.8;
}

.btn-outline-custom:disabled:hover,
.btn-outline-custom[data-installed]:hover {
    background-color: transparent;
    color: #28a745;
}

/* =============================================================
   TABLES
   ============================================================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

th,
td {
    border: 1px solid #999;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #e9e9e9;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* =============================================================
   UTILITY
   ============================================================= */

#msg_box {
    display: block;
    padding: 0 5%;
    color: #c00;
    min-height: 0;
}

/* =============================================================
   "YOU ALREADY KNOW" INTRO CALLOUT
   ============================================================= */

.you-know-callout {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.you-know-header {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 8px;
}

.you-know-callout p {
    margin: 0 0 12px;
    font-size: 0.925rem;
    line-height: 1.6;
}

.roots-table {
    font-size: 0.875rem;
}

.roots-table td:first-child {
    font-size: 1rem;
    letter-spacing: 0.02em;
}

/* =============================================================
   LANGUAGE BRIDGE CALLOUT BOXES
   ============================================================= */

.lang-bridge {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    margin: 0 0 14px;
    font-size: 0.875rem;
    line-height: 1.6;
}

.lang-bridge-label {
    display: block;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 5px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-bridge p {
    margin: 4px 0 0;
}

.lang-bridge ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.lang-bridge li {
    margin-bottom: 3px;
}

/* =============================================================
   JARGON TOOLTIPS
   ============================================================= */

/* Underline style on any term that carries a tooltip */
.term {
    border-bottom: 1px dotted #555;
    cursor: help;
    white-space: nowrap;
}

/* The floating tooltip box — appended to <body> by TooltipModule */
.js-tooltip {
    display: none;
    position: absolute;
    background: #1f2937;
    color: #f9fafb;
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    max-width: 260px;
    line-height: 1.55;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* =============================================================
   RESPONSIVE — mobile / tablet
   ============================================================= */

/* On small screens the layout is already stacked, so hide the button */
@media (max-width: 768px) {
    .expand-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-wrap: wrap;
        width: 100%;
        gap: 4px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.875rem;
    }

    .products-grid {
        flex-direction: column;
    }

    .product-card,
    .video-card {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .greek-layout {
        flex-direction: column;
    }

    .greek-image-col,
    .greek-accordion-col {
        flex: 1 1 100%;
    }

    .video-card iframe {
        height: 220px;
    }
}
