/* ===========================
   GLOBAL BASE STYLES
   =========================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Georgia", "Times New Roman", serif;
    background: #f2fbff;
    color: #1f2933;
    line-height: 1.6;
}

/* Smooth basic typography */
h1, h2, h3, h4 {
    margin-top: 0;
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: 600;
    color: #111827;
}

p {
    margin: 0 0 1rem;
}

a {
    color: #0b7285;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===========================
   HEADER & TOP NAV (header.php)
   =========================== */

.site-header {
    background: #0b1621;
    color: #f9fafb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-branding {
    min-width: 240px;
}

.site-title {
    margin: 0 0 4px;
    font-size: 1.4rem;
}

.site-title-link {
    color: #f9fafb;
    text-decoration: none;
}

.site-title-link:hover {
    text-decoration: underline;
}

.site-tagline {
    margin: 0;
    font-size: 0.9rem;
    color: #e5e7eb;
}

/* Navigation inside header.php */
.site-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #e5e7eb;
    border: 1px solid transparent;
}

.nav-menu a:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.7);
}

/* Share button in header nav */
.nav-share-button {
    padding: 6px 14px;
    font-size: 0.9rem;
    border-radius: 999px;
    border: 1px solid #f9fafb;
    background: transparent;
    color: #f9fafb;
    cursor: pointer;
}

.nav-share-button:hover {
    background: #f9fafb;
    color: #111827;
}

/* ===========================
   HERO SECTIONS
   (about.php + read-devotional.php)
   =========================== */

.hero {
    position: relative;
    padding: 64px 16px 56px;
    color: #f9fafb;
    text-align: left;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Default gentle overlay if background is set elsewhere */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(15, 118, 143, 0.55), rgba(15, 23, 42, 0.9));
    opacity: 0.95;
    pointer-events: none;
}

/* About page hero */
.hero.home {
    background-image:
        linear-gradient(to bottom right, rgba(15, 118, 143, 0.6), rgba(15, 23, 42, 0.9)),
        url("images/hero-coffee-bible-surf.jpg");
}

/* Devotional reading hero */
.hero.devotional {
    background-image:
        linear-gradient(to bottom right, rgba(15, 118, 143, 0.6), rgba(15, 23, 42, 0.9)),
        url("images/ocean-waves-soft.jpg");
}

/* Inner hero content */
.hero > nav,
.hero-inner {
    position: relative;
    z-index: 1;
}

.hero > nav {
    max-width: 1000px;
    margin: 0 auto 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero > nav a {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(249, 250, 251, 0.45);
    color: #f9fafb;
}

.hero > nav a:hover {
    background: rgba(249, 250, 251, 0.15);
}

.hero-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-inner h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.hero-inner p {
    max-width: 620px;
    font-size: 1rem;
    color: #e5e7eb;
}

/* ===========================
   MAIN CONTENT LAYOUT
   =========================== */

.site-main,
.content-area,
.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* When header.php wraps <main class="site-main"> */
.site-main {
    padding-top: 28px;
}

/* Simple page wrapper for about + devotional */
.page-wrapper {
    padding-top: 32px;
}

/* ===========================
   DEVOTIONAL LIST & CARDS
   (index.php, view-all-devotionals.php, read-devotional.php)
   =========================== */

.devotional-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: #0f172a;
}

.devotional-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* Card shell (also used on about page card) */
.devotional-card,
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 18px 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

/* For read-devotional.php body */
.devotional-body {
    font-size: 1rem;
    line-height: 1.7;
}

.devotional-title {
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: #111827;
}

.devotional-title a {
    color: inherit;
}

.devotional-title a:hover {
    text-decoration: underline;
}

.devotional-date {
    margin: 0 0 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.devotional-snippet {
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 12px;
}

/* Meta line under titles in index/view-all if needed */
.devotional-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
}

/* "Read this devotional" link */
.read-more-link {
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0b7285;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Secondary nav link (e.g., back link) */
.secondary-link {
    font-size: 0.9rem;
    color: #0f172a;
}

.secondary-link:hover {
    text-decoration: underline;
}

/* ===========================
   BUTTONS
   =========================== */

.button,
button,
input[type="submit"],
input[type="button"] {
    font-family: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #0b7285;
    color: #f9fafb;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    background: #0a6474;
}

/* ===========================
   SHARE SECTION – DEVOTIONAL PAGE
   (read-devotional.php share panel)
   =========================== */

.share-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.share-intro {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 10px;
}

/* Popup panel near the button */
.share-panel {
    position: relative;
    margin-top: 12px;
    padding: 14px 14px 12px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    display: none;
}

.share-panel.is-open {
    display: block;
}

.share-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.share-panel-header {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #111827;
}

.share-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
}

.share-list li {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 6px;
}

.share-list a {
    font-size: 0.9rem;
    color: #0b7285;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-actions button {
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    cursor: pointer;
}

.share-actions button:hover {
    background: #f3f4f6;
}

/* ===========================
   SHARE MODAL – HEADER NAV
   (footer.php markup)
   =========================== */

.share-modal[hidden] {
    display: none;
}

.share-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.share-modal-content {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px 20px 18px;
    max-width: 420px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    position: relative;
}

.share-modal-content h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.share-modal-content p {
    font-size: 0.95rem;
    color: #4b5563;
}

.share-options {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-options a,
.share-options button {
    font-size: 0.9rem;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    cursor: pointer;
}

.share-options a:hover,
.share-options button:hover {
    background: #e5f4f7;
}

.share-modal .share-close {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.2rem;
}

/* ===========================
   ABOUT PAGE CARD (about.php)
   =========================== */

.card p {
    font-size: 1rem;
    color: #1f2933;
}

/* Lists in about text */
.card ul {
    margin: 0 0 1rem 1.2rem;
    padding: 0;
}

.card li {
    margin-bottom: 0.4rem;
}

/* ===========================
   FOOTER
   =========================== */

.site-footer,
footer {
    text-align: center;
    padding: 18px 16px 20px;
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
    background: #f9fafb;
}

/* ===========================
   UTILITIES
   =========================== */

.text-center {
    text-align: center;
}

/* ===========================
   RESPONSIVE ADJUSTMENTS
   =========================== */

@media (max-width: 768px) {
    .site-header-inner {
        align-items: flex-start;
    }

    .site-branding {
        flex: 1 0 100%;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .hero {
        text-align: left;
        padding: 48px 16px 40px;
    }

    .hero-inner h1 {
        font-size: 1.6rem;
    }

    .devotional-card,
    .card {
        padding: 16px 14px 18px;
    }

    .share-modal-content {
        max-width: 360px;
    }
}

@media (max-width: 480px) {
    .hero-inner h1 {
        font-size: 1.4rem;
    }

    .hero-inner p {
        font-size: 0.95rem;
    }
}
