/*
Theme Name: Best Cat Water Fountain
Theme URI: https://bestcatwaterfountain.online/
Description: A clean, original theme built for Best Cat Water Fountain. White background, calm blue and teal accents, readable article layouts, and a homepage with a large featured guide beside recent guides.
Version: 1.3
Author: Best Cat Water Fountain
Text Domain: bestcat-theme
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --bestcat-teal: #0e7c7b;
  --bestcat-teal-dark: #0a5f5e;
  --bestcat-orange: #e8734a;
  --bestcat-text: #1c1c1c;
  --bestcat-muted: #5a5a5a;
  --bestcat-border: #e6e6e6;
  --bestcat-card: #ffffff;
  --bestcat-soft: #f6f8f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--bestcat-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--bestcat-teal); }
a:hover { color: var(--bestcat-teal-dark); }

h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: #111111;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; margin-top: 2rem; }
h3 { font-size: 1.3rem; margin-top: 1.6rem; }

img { max-width: 100%; height: auto; border-radius: 12px; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--bestcat-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
}
.site-brand { flex-shrink: 0; min-width: 0; }
.site-brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111111;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.site-brand img { max-height: 68px; width: auto; border-radius: 0; }
/* When a custom logo is present, the text stays in the HTML for
   accessibility but is visually hidden so the logo is shown alone. */
.site-brand.has-logo .site-brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.main-nav { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.primary-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: nowrap; align-items: center; }
.primary-menu a { text-decoration: none; color: #111111; font-weight: 600; font-size: 15px; white-space: nowrap; }
.primary-menu a:hover { color: var(--bestcat-teal); }
.primary-menu ul { list-style: none; }
/* Desktop dropdowns */
.primary-menu li { position: relative; }
.primary-menu li ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--bestcat-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px 0;
  margin: 0;
  z-index: 60;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul { display: flex; }
.primary-menu li ul li { width: 100%; }
.primary-menu li ul a { display: block; padding: 10px 16px; white-space: normal; }
.menu-toggle {
  display: none;
  background: var(--bestcat-teal);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Hero */
.hero { padding: 44px 0 28px; }
.hero h1 { margin: 0 0 12px; font-size: 2.6rem; }
.hero p { color: var(--bestcat-muted); font-size: 1.1rem; max-width: 760px; margin: 0; }

/* Homepage two-column section */
.home-top {
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: 28px;
  align-items: start;
  padding: 12px 0 36px;
}
.top-card { background: var(--bestcat-card); }
.top-card-image { position: relative; }
.top-card-image img { width: 100%; border-radius: 16px; display: block; }
.top-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--bestcat-orange);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 0 12px 0 16px;
  letter-spacing: 0.02em;
}
.category-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bestcat-muted);
  margin: 16px 0 6px;
}
.top-card h2 { margin: 0 0 10px; font-size: 1.9rem; }
.top-card h2 a, .recent-card h3 a, .post-card h3 a { color: #111111; text-decoration: none; }
.top-card h2 a:hover, .recent-card h3 a:hover, .post-card h3 a:hover { color: var(--bestcat-teal); }
.read-guide {
  display: inline-block;
  margin-top: 12px;
  background: var(--bestcat-teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
}
.read-guide:hover { background: var(--bestcat-teal-dark); color: #fff; }

.recent-heading {
  font-size: 1.9rem;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.recent-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  background: var(--bestcat-card);
  border: 1px solid var(--bestcat-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.recent-card img { width: 100%; height: 110px; object-fit: cover; }
.recent-card h3 { margin: 0; font-size: 1.05rem; }
.recent-card .category-label { margin-top: 0; }

/* Card grids */
.section-heading { font-size: 1.7rem; margin: 36px 0 16px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.type-card, .post-card {
  border: 1px solid var(--bestcat-border);
  border-radius: 14px;
  padding: 20px;
  background: var(--bestcat-card);
}
.type-card h3 { margin-top: 0; }
.type-card a, .post-card a { text-decoration: none; }
.post-card img { width: 100%; height: 190px; object-fit: cover; }
.post-card h3 { margin: 10px 0 8px; font-size: 1.15rem; }

/* Why trust */
.why-trust {
  background: var(--bestcat-soft);
  border-radius: 16px;
  padding: 28px;
  margin: 40px 0;
}

/* Single post / pages */
.single-wrap { max-width: 1140px; margin: 0 auto; padding: 36px 20px 60px; }
.page-wrap { max-width: 780px; margin: 0 auto; padding: 36px 20px 60px; }
/* Single post: 2-column article + right sidebar layout */
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
.single-main { min-width: 0; }
.single-main h1 { margin-top: 0; }
.single-sidebar { min-width: 0; }
.sidebar-widget {
  background: var(--bestcat-card);
  border: 1px solid var(--bestcat-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.sidebar-widget h3 { margin: 0 0 14px; font-size: 1.15rem; }
.sidebar-widget p { color: var(--bestcat-muted); font-size: 0.95rem; margin: 0; }
.sidebar-posts, .sidebar-categories { list-style: none; margin: 0; padding: 0; }
.sidebar-posts li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}
.sidebar-posts li:last-child { margin-bottom: 0; }
.sidebar-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.sidebar-title { color: #111111; text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.4; }
.sidebar-title:hover { color: var(--bestcat-teal); }
.sidebar-categories li { margin-bottom: 8px; }
.sidebar-categories li:last-child { margin-bottom: 0; }
.sidebar-categories a { color: #111111; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.sidebar-categories a:hover { color: var(--bestcat-teal); }
.sidebar-disclosure { background: var(--bestcat-soft); border-left: 4px solid var(--bestcat-teal); }
.sidebar-disclosure a { font-weight: 600; }
.single-featured img { width: 100%; border-radius: 16px; }
.entry-content { font-size: 17px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.entry-content th {
  background: var(--bestcat-teal);
  color: #fff;
  text-align: left;
  padding: 12px;
}
.entry-content td { padding: 11px 12px; border-bottom: 1px solid var(--bestcat-border); }
.entry-content tr:nth-child(even) td { background: var(--bestcat-soft); }
.entry-content figure { margin: 24px 0; }
.entry-content figcaption { color: var(--bestcat-muted); font-size: 0.9rem; text-align: center; margin-top: 8px; }
.entry-content a[href*="amazon.com"] {
  display: inline-block;
  background: var(--bestcat-teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  margin: 6px 0;
}
.entry-content a[href*="amazon.com"]:hover { background: var(--bestcat-teal-dark); color: #fff; }

/* Single post: breadcrumb, category, related guides */
.breadcrumb { color: var(--bestcat-muted); font-size: 0.9rem; margin-bottom: 12px; }
.breadcrumb a { color: var(--bestcat-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--bestcat-teal); }
.single-wrap h1 { margin-top: 0; }
.single-category-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bestcat-teal);
  margin-bottom: 8px;
}
.single-category-label a { color: var(--bestcat-teal); text-decoration: none; }
.entry-content img, .entry-content figure { max-width: 100%; }
.entry-content { overflow-wrap: break-word; }
.back-to-guides { display: inline-block; margin-top: 28px; font-weight: 700; text-decoration: none; }
.related-section { margin-top: 44px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.related-card {
  border: 1px solid var(--bestcat-border);
  border-radius: 14px;
  padding: 16px;
  background: var(--bestcat-card);
}
.related-card img { width: 100%; height: 150px; object-fit: cover; }
.related-card h3 { margin: 10px 0 8px; font-size: 1.05rem; }
.related-card h3 a { color: #111111; text-decoration: none; }
.related-card h3 a:hover { color: var(--bestcat-teal); }
.related-card p { color: var(--bestcat-muted); font-size: 0.95rem; margin: 0; }

/* Footer: dark teal, 4 columns */
.site-footer {
  background: var(--bestcat-teal-dark);
  color: #ffffff;
  padding: 40px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-bottom: 28px;
}
.site-footer h3 { color: #ffffff; margin-top: 0; font-size: 1.1rem; }
.site-footer p { color: #e8f3f3; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding: 16px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { margin: 0; }

/* Menu breakpoint: 1100px for the menu only */
@media (max-width: 1100px) {
  .menu-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; justify-content: flex-start; }
  .main-nav.open { display: block; }
  .main-nav.open .primary-menu { flex-direction: column; align-items: stretch; padding: 12px 0 18px; gap: 0; }
  .main-nav.open .primary-menu > li { width: 100%; }
  .main-nav.open .primary-menu > li > a { display: block; padding: 10px 0; white-space: normal; }
  /* Mobile submenus: always visible, indented, when the menu is open. */
  .main-nav.open .primary-menu li ul {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    border-left: 3px solid var(--bestcat-teal);
    padding: 0 0 0 16px;
    margin: 0 0 8px;
    min-width: 0;
  }
  .main-nav.open .primary-menu li ul a { padding: 8px 0; }
  .header-inner { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .single-layout { grid-template-columns: 1fr; }
  .single-sidebar { margin-top: 12px; }
}

@media (max-width: 800px) {
  h1, .hero h1 { font-size: 1.9rem; }
  .home-top { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .recent-card { grid-template-columns: 110px 1fr; }
}
