/*
Theme Name: Ultra Child
Template: themify-ultra
Version: 1.0
*/


@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,400&display=swap');

/* ════════════════════════════════════════════════════════════
   Reefkeepingtoday — Single Post Styles
   ════════════════════════════════════════════════════════════ */
/* ── 1. NAV: lifted out of flow so it overlays the gradient ── */

.single #headerwrap {
    position:      absolute !important;
    top:           0 !important;
    left:          0 !important;
    width:         100% !important;
    z-index:       100 !important;
    background:    transparent !important;
    box-shadow:    none !important;
    border-bottom: none !important;
}

.single #headerwrap a,
.single #headerwrap #main-nav a,
.single #headerwrap #site-logo a,
.single #headerwrap .site-description span {
    color: #ffffff !important;
}

/* Orange on hover for nav menu items only */
.single #headerwrap #main-nav a:hover {
    color: #ff8103 !important;
}


/* ── 2. GRADIENT BANNER ───────────────────────────────────── */

.single-post .featured-area {
    background: linear-gradient(
        135deg,
        rgb(12,  26,  43)  0%,
        rgb(13,  59,  92)  50%,
        rgb(46, 160, 168)  100%
    ) !important;

    margin-top:     0 !important;
    padding-top:    80px !important;
    padding-right:  5% !important;
    padding-bottom: 50px !important;
    padding-left:   5% !important;
    text-align:     center;
}


/* ── 3. POST TITLE — unlinked appearance ─────────────────────*/

.single-post .featured-area .entry-title {
    font-size:       clamp(1.3rem, 3.2vw, 2.6rem);
    line-height:     1.3;
    max-width:       820px;
    margin:          0 auto;
    font-weight:     700;
    word-break:      break-word;
    overflow-wrap:   break-word;
}

.single-post .featured-area .entry-title a {
    color:           #ffffff !important;
    text-decoration: none !important;
    text-shadow:     0 2px 14px rgba(0, 0, 0, 0.35);
    cursor:          default !important;
    pointer-events:  none !important;
}


/* ── 4. DATE ──────────────────────────────────────────────── */

.single-post .featured-area .post-date {
    color:         rgba(255, 255, 255, 0.5);
    font-size:     0.78rem;
    margin-bottom: 10px;
}


/* ── 5. META BLOCK (author, category, tags) ───────────────── */

.single-post .featured-area p.post-meta.entry-meta {
    display:         flex;
    flex-wrap:       wrap;
    justify-content: center;
    align-items:     center;
    gap:             4px 10px;
    margin-top:      14px;
font-size:       0;
}

.single-post .featured-area .post-author,
.single-post .featured-area .post-category,
.single-post .featured-area .post-tag {
    font-size: 0.8rem;
    color:     rgba(255, 255, 255, 0.55);
}

.single-post .featured-area .post-author a,
.single-post .featured-area .post-category a,
.single-post .featured-area .post-tag a {
    color:           rgba(255, 255, 255, 0.6) !important;
    text-decoration: none;
    font-size:       0.8rem;
    cursor:          pointer !important;
    pointer-events:  auto !important;
}

.single-post .featured-area .post-author a:hover,
.single-post .featured-area .post-category a:hover,
.single-post .featured-area .post-tag a:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.single-post .featured-area .edit-button {
    display: none;
}


/* ── 6. POST CONTENT — Roboto + justified ─────────────────── */

.single-post .entry-content,
.single-post .post-content {
    font-family:     'Roboto', sans-serif;
    font-size:       1rem;
    line-height:     1.8;
    text-align:      justify;
    hyphens:         auto;
    -webkit-hyphens: auto;
}

.single-post .entry-content p,
.single-post .post-content p {
    margin-bottom:   1.4em;
    hyphens:         auto;
    -webkit-hyphens: auto;
}


/* ── 7. RESPONSIVE ────────────────────────────────────────── */

@media (max-width: 768px) {

    .single-post .featured-area {
        padding-top:    60px !important;
        padding-bottom: 40px !important;
    }

    .single-post .featured-area .entry-title,
    .single-post .featured-area .entry-title a {
        font-size: clamp(1.1rem, 5.5vw, 1.7rem);
    }
}

/* ── 8. META TAGS —
   Give the meta row more row-gap so wrapped lines don't collide. */

.single-post .featured-area p.post-meta.entry-meta {
    gap:          8px 10px;
    line-height:  1.6;
}


.single-post .featured-area p.post-meta.entry-meta {
    justify-content: center;
    text-align:      center;
}


.single-post .featured-area .post-author a,
.single-post .featured-area .post-category a,
.single-post .featured-area .post-tag a {
    font-size: 0.8rem; /* restore only on the actual links */
}

/* Tighter title line-height on mobile */
@media (max-width: 768px) {
    .single-post .featured-area .entry-title,
    .single-post .featured-area .entry-title a {
        line-height: 0.75;
    }
	/* ──  MOBILE MENU — black text on open sidemenu ────────────
   The hamburger icon stays white (covered by rule 1 above).
   Once tapped, #mobile-menu slides in with a light background
   so we switch the nav links inside it to black.              */

.single #mobile-menu a,
.single #mobile-menu #main-nav a {
    color: #000000 !important;
}

.single #mobile-menu #main-nav a:hover {
    color: #ff8103 !important;
}
}
@media (max-width: 768px) {
    .single #mobile-menu #searchform.tf_rel {
        position: relative;
    }

   .tf_icon_wrap.icon-search {
       display: none; /*Hide search field looking glass icon */
    }

    .single #mobile-menu #searchform #s {
        padding-left: 36px; /* push text right so it doesn't sit under the icon */
    }
}

/* ============================================================
   SEARCH RESULTS PAGE — 3-column grid layout
   Matches frontpage post alignment
   ============================================================ */
/* ── 1. OVERRIDE MASONRY — replace with flex grid ── */
.search-results #loops-wrapper.loops-wrapper {
    display:         flex !important;
    flex-wrap:       wrap !important;
    column-gap:      2% !important;
    row-gap:         30px !important;
    width:           100% !important;
    height:          auto !important;
    position:        static !important;
    box-sizing:      border-box !important;
    font-family:     playfair-display !important;
}
/* ── 2. RESET MASONRY ABSOLUTE POSITIONING on articles ── */
.search-results #loops-wrapper article.post {
    position:       relative !important;
    left:           auto !important;
    top:            auto !important;
    flex:           0 0 32% !important;
    max-width:      32% !important;
    width:          32% !important;
    margin:         0 !important;
    box-sizing:     border-box !important;
    display:        flex !important;
    flex-direction: column !important;
}
/* ── 3. HIDE MASONRY GUTTER SIZER ── */
.search-results #loops-wrapper .gutter-sizer {
    display: none !important;
}
/* ── 4. FEATURED IMAGE — 2:1 aspect ratio ── */
.search-results .post-image a {
    display:      block !important;
    width:        100% !important;
    aspect-ratio: 2 / 1 !important;
    overflow:     hidden !important;
}
.search-results .post-image img {
    width:            100% !important;
    height:           100% !important;
    object-fit:       cover !important;
    display:          block !important;
    image-rendering:  -webkit-optimize-contrast !important;
    image-rendering:  crisp-edges !important;
    transform:        translateZ(0) !important;
}
/* ── 5. FLEX CHAIN — image stays top, meta anchors to bottom ── */
.search-results .post-content {
    display:        flex !important;
    flex-direction: column !important;
    flex:           1 !important;
}
.search-results .post-content-inner {
    padding:        10px 0 0 0 !important;
    display:        flex !important;
    flex-direction: column !important;
    flex:           1 !important;
}
/* ── 6. SEARCH PAGE TITLE ── */
.search-results h1.page-title {
    width:           100% !important;
    margin-bottom:   24px !important;
    font-family:     playfair-display !important;
    letter-spacing:  -.03em !important;
    line-height:     1.2em !important;
}
/* --7. POST TITLE */
.search-results h2.post-title.entry-title {
    font-family:    "Playfair Display", serif;
    font-size:      27.2px;
    letter-spacing: -.03em;
    line-height:    1.2em;
    margin:         0 0 .4em;
    padding:        0;
    text-transform: none;
    font-weight:    700;
}
.search-results h2.post-title.entry-title a {
    font-family:     "Playfair Display", serif;
    color:           rgb(0, 0, 0);
    text-decoration: none;
    font-weight:     700;
}
/* -- 8. POST META */
.search-results .post-meta.entry-meta {
    font-family: "Playfair Display", serif;
    font-size:   15px;
    margin-top:  auto !important;
}
.search-results .post-meta.entry-meta a:hover {
    color: #ff8103; /*Orange font on hover */
}
/* ── 9. MOBILE — single column ── */
@media (max-width: 768px) {
    .search-results #loops-wrapper article.post {
        flex:      0 0 100% !important;
        max-width: 100% !important;
        width:     100% !important;
    }
    .search-results #loops-wrapper.loops-wrapper {
        row-gap: 20px !important;
    }
}

/* ============================================================
   TAG PAGES — 3-column grid layout
   Matches search results page
   ============================================================ */
/* ── 1. OVERRIDE MASONRY — replace with flex grid ── */
.tag #loops-wrapper.loops-wrapper {
    display:         flex !important;
    flex-wrap:       wrap !important;
    column-gap:      2% !important;
    row-gap:         30px !important;
    width:           100% !important;
    height:          auto !important;
    position:        static !important;
    box-sizing:      border-box !important;
    font-family:     playfair-display !important;
}
/* ── 2. RESET MASONRY ABSOLUTE POSITIONING on articles ── */
.tag #loops-wrapper article.post {
    position:       relative !important;
    left:           auto !important;
    top:            auto !important;
    flex:           0 0 32% !important;
    max-width:      32% !important;
    width:          32% !important;
    margin:         0 !important;
    box-sizing:     border-box !important;
    display:        flex !important;
    flex-direction: column !important;
}
/* ── 3. HIDE MASONRY GUTTER SIZER ── */
.tag #loops-wrapper .gutter-sizer {
    display: none !important;
}
/* ── 4. FEATURED IMAGE — 2:1 aspect ratio ── */
.tag .post-image a {
    display:      block !important;
    width:        100% !important;
    aspect-ratio: 2 / 1 !important;
    overflow:     hidden !important;
}
.tag .post-image img {
    width:            100% !important;
    height:           100% !important;
    object-fit:       cover !important;
    display:          block !important;
    image-rendering:  -webkit-optimize-contrast !important;
    image-rendering:  crisp-edges !important;
    transform:        translateZ(0) !important;
}
/* ── 5. FLEX CHAIN — image stays top, meta anchors to bottom ── */
.tag .post-content {
    display:        flex !important;
    flex-direction: column !important;
    flex:           1 !important;
}
.tag .post-content-inner {
    padding:        10px 0 0 0 !important;
    display:        flex !important;
    flex-direction: column !important;
    flex:           1 !important;
}
/* ── 6. TAG PAGE TITLE ── */
.tag h1.page-title {
    width:           100% !important;
    margin-bottom:   24px !important;
    font-family:     playfair-display !important;
    letter-spacing:  -.03em !important;
    line-height:     1.2em !important;
}
/* -- POST TITLE */
.tag h2.post-title.entry-title {
    font-family:    "Playfair Display", serif;
    font-size:      27.2px;
    letter-spacing: -.03em;
    line-height:    1.2em;
    margin:         0 0 .4em;
    padding:        0;
    text-transform: none;
    font-weight:    700;
}
.tag h2.post-title.entry-title a {
    font-family:     "Playfair Display", serif;
    color:           rgb(0, 0, 0);
    text-decoration: none;
    font-weight:     700;
}
/* -- POST META */
.tag .post-meta.entry-meta {
    font-family: "Playfair Display", serif;
    font-size:   15px;
    margin-top:  auto !important;
}
.tag .post-meta.entry-meta a:hover {
    color: #ff8103;
}
/* ── 7. MOBILE — single column ── */
@media (max-width: 768px) {
    .tag #loops-wrapper article.post {
        flex:      0 0 100% !important;
        max-width: 100% !important;
        width:     100% !important;
    }
    .tag #loops-wrapper.loops-wrapper {
        row-gap: 20px !important;
    }
}
/* ═══════════════════════════════════════════════════════════════════
   ZWN Newsletter Slide-in Panel
   Desktop: slides in from the right at bottom-right corner
   Mobile:  rises up from the bottom as a full-width drawer
   ═══════════════════════════════════════════════════════════════════ */

/* ── Panel base (off-screen by default) ─────────────────────────── */
#zwn-newsletter-panel {
    position: fixed;           /* stays in viewport regardless of scroll */
    bottom: 24px;
    right: -420px;             /* hidden off the right edge */
    width: 380px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    z-index: 9999;             /* above everything else on the page */
    overflow: hidden;

    /* Smooth spring-like slide animation */
    transition: right 0.45s cubic-bezier(0.34, 1.20, 0.64, 1);
}

/* ── Slide into view ─────────────────────────────────────────────── */
#zwn-newsletter-panel.zwn-panel--visible {
    right: 24px;
}

/* ── Decorative top accent bar (adjust colour to match your brand) ─ */
#zwn-newsletter-panel::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #0077b6, #00b4d8);
}

/* ── Inner content padding ───────────────────────────────────────── */
.zwn-panel-inner {
    padding: 20px 24px 24px;
}

/* ── Close (×) button ────────────────────────────────────────────── */
#zwn-panel-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    z-index: 1;
}
#zwn-panel-close:hover { color: #111; }

/* ── Envelope icon ───────────────────────────────────────────────── */
.zwn-panel-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

/* ── Heading ─────────────────────────────────────────────────────── */
.zwn-panel-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111;
    padding-right: 20px;   /* prevent text running under the × button */
    line-height: 1.3;
}

/* ── Subtext ─────────────────────────────────────────────────────── */
.zwn-panel-subtext {
    font-size: 0.88rem;
    color: #555;
    margin: 0 0 14px;
    line-height: 1.5;
}

/* ── Form layout ─────────────────────────────────────────────────── */
.zwn-panel-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Email input */
#zwn-email-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#zwn-email-input:focus { border-color: #0077b6; }

/* Honeypot field — completely invisible to real users */
#zwn-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

/* Submit button */
#zwn-submit-btn {
    width: 100%;
    padding: 10px;
    background: #0077b6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
#zwn-submit-btn:hover:not(:disabled) { background: #005f92; }
#zwn-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── Privacy fine print ──────────────────────────────────────────── */
.zwn-panel-legal {
    font-size: 0.75rem;
    color: #999;
    margin: 10px 0 0;
    line-height: 1.4;
}
.zwn-panel-legal a { color: #0077b6; }

/* ── Feedback message (success / error) ──────────────────────────── */
.zwn-panel-message          { font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }
.zwn-panel-message--success { color: #1a7f37; font-weight: 600; }
.zwn-panel-message--error   { color: #c0392b; }

/* ── Mobile: full-width bottom drawer ───────────────────────────── */
@media (max-width: 480px) {
    #zwn-newsletter-panel {
        bottom: 0;
        right: -100%;          /* hidden off the right edge at full width */
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;  /* rounded top corners only */
        transition: right 0.4s cubic-bezier(0.34, 1.10, 0.64, 1);
    }
    #zwn-newsletter-panel.zwn-panel--visible {
        right: 0;
    }
}