/*
Theme Name: WifeShareTube
Theme URI:  https://wifesharetube.com
Author:      WifeShareTube
Author URI:  https://wifesharetube.com
Description: Amateur couples & wife sharing video tube. Playful light theme with cartoon couples vibe, rounded cards, and pastel accents.
Version:     1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.2
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wifesharetube
Tags:        video, grid, couples, light, pastel, rounded, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================================
   1. Reset & Base — Light, playful palette
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fdf6f0;
  color: #3d2c2e;
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: #e86a92; text-decoration: none; transition: color .2s; }
a:hover { color: #d4517a; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}

/* =========================================================================
   2. Header — playful top bar
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 245, .95);
  border-bottom: 2px solid #fce4ec;
  box-shadow: 0 2px 12px rgba(232, 106, 146, .08);
}
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: clamp(8px, 2vw, 20px);
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.site-title { font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 800; margin: 0; letter-spacing: -.5px; }
.site-title a { color: #3d2c2e; }
.site-title .heart { color: #e86a92; }
.site-tagline { font-size: clamp(.65rem, 1.4vw, .75rem); color: #b8a0a4; letter-spacing: 1px; text-transform: uppercase; }

.main-nav ul { list-style: none; display: flex; gap: clamp(10px, 2vw, 22px); margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { color: #5a4447; font-weight: 600; font-size: clamp(.9rem, 1.6vw, 1rem); padding: 4px 0; border-bottom: 2px solid transparent; transition: all .2s; }
.main-nav a:hover { color: #e86a92; border-bottom-color: #e86a92; text-decoration: none; }

.site-content { max-width: 1320px; margin: 0 auto; padding: clamp(14px, 3vw, 24px) clamp(10px, 3vw, 20px) 60px; }

/* =========================================================================
   3. Fun mascot / couple illustration area
   ========================================================================= */
.site-mascot {
  text-align: center;
  margin: 0 0 10px;
  padding: 8px 0;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: 4px;
  user-select: none;
}
.site-mascot .emoji-couple { display: inline-block; animation: float 3s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* =========================================================================
   4. Video Grid
   ========================================================================= */
.grid-head { 
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; 
  margin: 6px 0 20px; padding: 14px 18px; background: #fff; border-radius: 16px;
  box-shadow: 0 2px 8px rgba(232, 106, 146, .08);
}
.grid-head h1 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 800; margin: 0; color: #3d2c2e; }
.grid-head h1::before { content: "💕 "; font-size: 1.1em; }
.grid-count { color: #b8a0a4; font-size: .88rem; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: clamp(14px, 2.5vw, 24px);
}

/* Card — soft, rounded, light */
.video-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(232, 106, 146, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(232, 106, 146, .15);
}

.thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #fce4ec; border-radius: 18px 18px 0 0; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video-card:hover .thumb-wrap img { transform: scale(1.05); }

/* Hover preview video */
.thumb-wrap video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #fee; opacity: 0; transition: opacity .25s ease;
}
.thumb-wrap:hover video { opacity: 1; }

/* Duration badge */
.badge-duration {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(61, 44, 46, .8); color: #fff;
  font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 8px;
}

/* Card content */
.video-card .card-body { padding: 14px 16px 16px; }
.video-card h2 {
  margin: 0; font-size: clamp(.95rem, 1.8vw, 1.08rem); line-height: 1.25; font-weight: 700;
}
.video-card h2 a { color: #3d2c2e; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card h2 a:hover { color: #e86a92; text-decoration: none; }
.meta {
  color: #b8a0a4; font-size: .8rem; margin-top: 6px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* Pagination */
.pagination { margin-top: 34px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block; padding: 8px 16px; border-radius: 12px;
  background: #fff; color: #5a4447; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.05); transition: all .2s;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: #e86a92; color: #fff; box-shadow: 0 4px 12px rgba(232,106,146,.3); text-decoration: none; }

/* =========================================================================
   5. Single Video Page
   ========================================================================= */
.video-player { margin-bottom: 20px; }
.video-player video { width: 100%; max-height: 76vh; background: #fce4ec; border-radius: 16px; }
.video-panel { background: #fff; border-radius: 18px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(232,106,146,.06); }
.video-panel h1 { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 800; margin: 0 0 10px; color: #3d2c2e; }
.video-panel .entry-meta { color: #b8a0a4; display: flex; gap: clamp(8px, 2vw, 16px); flex-wrap: wrap; font-weight: 600; }
.tags-list { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags-list a { 
  background: #fce4ec; color: #d4517a; padding: 4px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  transition: all .2s;
}
.tags-list a:hover { background: #e86a92; color: #fff; text-decoration: none; }
.video-desc { margin-top: 20px; border-top: 1px solid #f0e0e4; padding-top: 18px; color: #6a5558; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 20px; }
.related-grid h3 { grid-column: 1 / -1; font-size: 1.25rem; margin: 0 0 4px; color: #3d2c2e; }
.related-grid h3::before { content: "💞 "; }

/* =========================================================================
   6. Two-column video layout (player + ads)
   ========================================================================= */
.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 300px);
  gap: clamp(16px, 3vw, 26px);
  align-items: start;
  margin-bottom: 28px;
}
.video-main { min-width: 0; }
.video-ads {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 90px;
}
.video-ads .ad-slot { margin: 0; }
.video-layout .video-panel { margin-bottom: 0; }
.video-layout .video-player { margin-bottom: 20px; }

/* =========================================================================
   7. Advertisements
   ========================================================================= */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  text-align: center;
  overflow: hidden;
  background: #fff5f2;
  border-radius: 14px;
  padding: 8px;
}
.ad-label {
  display: block;
  font-size: .65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #d4bcbf;
  margin-bottom: 6px;
}
.ad-slot img, .ad-slot iframe, .ad-slot ins, .ad-slot video { max-width: 100%; }

/* Header leaderboard */
.ad-ad_top_728 { padding: 4px 0 14px; }
/* Side-by-side 300x250 pair */
.ad-row {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin: 0 0 28px;
}
.ad-row .ad-slot { margin: 0; }

/* =========================================================================
   8. Footer
   ========================================================================= */
.site-footer {
  border-top: 2px solid #fce4ec; color: #b8a0a4; font-size: .85rem;
  background: #fffaf7;
}
.site-footer .footer-inner {
  max-width: 1320px; margin: 0 auto; padding: 26px clamp(12px, 3vw, 20px) 40px;
  display: grid; gap: 18px;
}
.footer-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; }
.footer-legal a { color: #b8a0a4; }
.footer-legal a:hover { color: #e86a92; }
.footer-note { color: #d4bcbf; font-size: .78rem; }

/* =========================================================================
   9. Pages & General
   ========================================================================= */
.single-page { max-width: 860px; }
.single-page h1 { font-size: 1.8rem; font-weight: 800; margin: 0 0 18px; color: #3d2c2e; }
.legal-note { font-size: .82rem; color: #b8a0a4; border-left: 3px solid #e86a92; padding-left: 12px; margin: 26px 0; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content code { background: #fce4ec; padding: 2px 6px; border-radius: 6px; font-size: .9em; color: #d4517a; }
.entry-content a { text-decoration: underline; }

/* Search */
.search-form { display: flex; gap: 6px; }
.search-form input[type=search] {
  padding: 8px 14px; border-radius: 12px; border: 2px solid #f0e0e4; background: #fff; color: #3d2c2e; min-width: 200px;
  font-size: .9rem; transition: border-color .2s;
}
.search-form input[type=search]:focus { outline: none; border-color: #e86a92; }
.search-form button { background: #e86a92; color: #fff; border: 0; border-radius: 12px; padding: 8px 18px; font-weight: 700; cursor: pointer; transition: background .2s; }
.search-form button:hover { background: #d4517a; }

/* Section titles */
.section-title { font-size: 1.35rem; font-weight: 800; margin: 28px 0 16px; color: #3d2c2e; }
.no-results { text-align: center; color: #b8a0a4; padding: 60px 0; }

/* =========================================================================
   10. Responsive
   ========================================================================= */
@media (max-width: 1024px) {
  .video-layout { grid-template-columns: minmax(0, 1fr); }
  .video-ads { position: static; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .video-ads .ad-slot { margin: 0 auto; }
  .video-layout .video-player video { max-height: none; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; justify-content: center; text-align: center; }
  .site-header .search-form { width: 100%; justify-content: center; }
  .search-form input[type=search] { min-width: 140px; width: 100%; }
  .site-mascot { font-size: 1.8rem; }
  .video-card { border-radius: 14px; }
  .video-panel { padding: 16px; }
  .grid-head { flex-wrap: wrap; }
  .video-grid { gap: 12px; }
  .pagination { gap: 6px; }
  .pagination .page-numbers { padding: 6px 12px; font-size: .85rem; }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .video-card h2 { font-size: .88rem; }
  .video-card .meta { font-size: .72rem; }
  .video-card .card-body { padding: 10px 12px 14px; }
  .site-title { font-size: 1.1rem; }
  .site-tagline { font-size: .6rem; letter-spacing: 1px; }
  .site-mascot { font-size: 1.4rem; }
  .main-nav ul { gap: 6px; justify-content: center; }
  .main-nav a { font-size: .8rem; padding: 2px 6px; }
  .video-panel { padding: 14px; border-radius: 14px; }
  .related-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .single-page { padding: 0 4px; }
  .entry-content { font-size: .9rem; }
}

@media (max-width: 360px) {
  .video-grid { grid-template-columns: 1fr; }
  .video-card h2 { font-size: .95rem; }
  .search-form input[type=search] { min-width: 0; }
  .ad-row { gap: 12px; }
}

@media (min-width: 1600px) {
  .site-content, .header-inner, .footer-inner { max-width: 1500px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .video-card h2 { font-size: 1.15rem; }
  .site-title { font-size: 2.1rem; }
}

@media (min-width: 2200px) {
  .site-content, .header-inner, .footer-inner { max-width: 1800px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 26px; }
  body { font-size: 18px; }
  .video-panel { padding: 32px; }
}