/*
 Theme Name: OceanWP Child
 Theme URI: https://oceanwp.org/
 Description: Child theme for OceanWP
 Author: Your Name
 Author URI: https://yourwebsite.com
 Template: oceanwp
 Version: 1.0.0
*/

/* =========================================================
   HERO / BANNER
   ========================================================= */
.twh-header__banner {
    background: url('https://trustworthyhomeadvice.com/wp-content/uploads/2025/08/TWHA-Background-Banner.png')
               center center / cover no-repeat;
    color: #fff;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(16px, 2vw, 40px) 20px;
}

/* Logo pinned left on desktop */
.twh-logo {
    position: absolute;
    left: clamp(16px, 4vw, 60px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.twh-logo img {
    height: clamp(100px, 20vw, 200px);
    width: auto;
    display: block;
}

/* Inner content (currently just social icons) */
.twh-header__inner {
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 200px;
}

/* Social icons sit in the tan band on desktop */
.twh-social-icons {
    position: absolute;
    bottom: 10px;
    right: clamp(24px, 6vw, 100px);
    display: flex;
    gap: 16px;
}
.twh-social-icons a svg {
    width: 36px;
    height: 36px;
    transition: transform .2s ease, opacity .2s ease, fill .2s ease;
    opacity: .95;
    fill: #fff; /* White icons */
}
.twh-social-icons a:hover svg { 
    transform: translateY(-2px); 
    opacity: 1; 
    fill: #d4b08c; /* Tan on hover */
}

/* =========================================================
   MAIN NAV (desktop default)
   ========================================================= */
.twh-main-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background-color: #fff;
    padding: 16px clamp(16px, 3vw, 40px);
    display: flex;
    justify-content: center;
    border-top: 0;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    box-sizing: border-box;
    border-bottom: 4px solid #d4b08c; /* Tan line under menu */
}

/* hamburger default hidden on desktop */
.twh-menu-toggle { display: none; }
.twh-burger { display: none; }

/* nav list across full row without wrapping */
.twh-nav-wrap { width: 100%; }
.twh-nav-list {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 2vw, 40px);
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Allow scroll if too many items */
    -webkit-overflow-scrolling: touch;
}
.twh-nav-list li { margin: 0; }

.twh-nav-list li a {
    font-family: Georgia, serif;
    font-weight: 800;
    font-size: clamp(18px, 2vw, 30px);
    color: #000;
    text-decoration: none;
    padding: 8px 10px;
    transition: color .25s ease, background-color .25s ease;
    border-radius: 4px;
    white-space: nowrap; /* Keep each item on one line */
}
.twh-nav-list li a:hover { color: #444; }

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

/* Tablet-ish */
@media (max-width: 1024px) {
    .twh-logo img { height: clamp(100px, 22vw, 240px); }
    .twh-social-icons { right: clamp(16px, 4vw, 40px); }
}

/* Mobile */
@media (max-width: 768px) {
    .twh-header__banner {
        min-height: 260px;
        padding: 24px 12px 16px;
    }
    .twh-logo {
        position: static;
        transform: none;
        margin-bottom: 10px;
        text-align: center;
    }
    .twh-logo img {
        height: clamp(200px, 35vw, 200px);
        margin: 0 auto;
    }
    .twh-header__inner {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        min-height: unset;
    }
    .twh-social-icons {
        position: static;
        order: 3;
        justify-content: center;
    }

    /* NAV: show hamburger, hide list by default */
    .twh-main-nav {
        padding: 12px 14px;
    }
    .twh-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 36px;
        height: 30px;
        margin-left: auto;
        cursor: pointer;
        position: relative;
        z-index: 3;
    }
    .twh-burger span {
        display: block;
        height: 3px;
        width: 100%;
        background: #000;
        border-radius: 2px;
        transition: transform .25s ease, opacity .25s ease;
    }

    .twh-nav-wrap { width: 100%; }
    .twh-nav-list {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 0 6px;
        margin-top: 8px;
        border-top: 1px solid #eee;
        overflow-x: visible; /* reset scroll for mobile */
    }
    .twh-nav-list li a {
        font-size: clamp(16px, 4.5vw, 20px);
        font-weight: 700;
        padding: 10px 4px;
        width: 100%;
    }

    /* Toggle: when checked, show menu */
    .twh-menu-toggle:checked ~ .twh-nav-wrap .twh-nav-list {
        display: flex;
    }

    /* Animate burger into X */
    .twh-menu-toggle:checked + .twh-burger span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .twh-menu-toggle:checked + .twh-burger span:nth-child(2) {
        opacity: 0;
    }
    .twh-menu-toggle:checked + .twh-burger span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Optional: remove any thin grey lines from theme wrappers */
#site-header, #main, #content-wrap, #content, #wrap {
    border: none !important;
    box-shadow: none !important;
}

/* === Wrapper width helper (shared) === */
.twh-wrap{
  width:min(95vw,1200px);
  margin-inline:auto;
}

/* === Topics bar under the header === */
.twh-topicsbar{
  background:#d7b492;
  border-top:2px solid rgba(0,0,0,.08);
  border-bottom:2px solid rgba(0,0,0,.08);
}
.twh-topics{
  display:flex;
  gap:18px;
  padding:10px 0;
  flex-wrap:wrap;
  justify-content:center;
}
.twh-topics a{
  font:600 14px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
  color:#fff;
  text-decoration:none;
  padding:6px 10px;
  background:rgba(255,255,255,.12);
  border-radius:6px;
  transition:.2s ease background, .2s ease transform;
}
.twh-topics a:hover{
  background:rgba(255,255,255,.22);
  transform:translateY(-1px);
}

/* === Home layout (content + sidebar) === */
.twh-home__grid{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:32px;
  padding:28px 0 10px;
}
@media (max-width: 980px){
  .twh-home__grid{ grid-template-columns:1fr; }
}

/* === Post card grid === */
.twh-postgrid{
  --cols: 3;
  display:grid;
  grid-template-columns: repeat(var(--cols),minmax(0,1fr));
  gap:22px;
}
@media (max-width: 1200px){ .twh-postgrid{ --cols: 3; } }
@media (max-width: 1024px){ .twh-postgrid{ --cols: 2; } }
@media (max-width: 620px){  .twh-postgrid{ --cols: 1; } }

.twh-card{
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease;
}
.twh-card:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 24px rgba(0,0,0,.08);
}

.twh-card__thumb{
  display:block;
  aspect-ratio: 4 / 3;
  overflow:hidden;
  background:#f2f2f2;
}
.twh-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.twh-card__thumb--placeholder{
  width:100%;
  height:100%;
  background:linear-gradient(135deg,#f2f2f2,#e6e6e6);
}

.twh-card__body{
  padding:14px 14px 18px;
}
.twh-card__meta{ margin-bottom:6px; }
.twh-card__cat{
  font:700 12px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  color:#7b5b3a;
  background:#f2e3d0;
  padding:3px 8px;
  border-radius:999px;
}
.twh-card__title{
  font:800 20px/1.2 Georgia, "Times New Roman", Times, serif;
  margin:6px 0 8px;
}
.twh-card__title a{ color:#111; text-decoration:none; }
.twh-card__title a:hover{ color:#333; }
.twh-card__excerpt{
  color:#555;
  font:400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  margin:0;
}

/* === Sidebar box (fallback About) === */
.twh-home__aside .widget,
.twh-aboutbox{
  background:#fff;
  border-radius:12px;
  padding:16px;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.twh-aboutbox h3{ margin-top:0; }

/* Subtle off-white background for the home page content area */
.home #content-wrap {
    background-color: #f8f8f8; /* light gray/off-white */
}

/* Keep your post cards and widgets clean on top of it */
.home #content-wrap .elementor-widget,
.home #content-wrap .widget,
.home #content-wrap .entry {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 15px;
}
