/*
Theme Name: Daddy's Digest
Theme URI: https://daddysdigest.com
Author: Daddy's Digest Inc.
Author URI: https://daddysdigest.com
Description: A high-performance custom theme for Daddy's Digest — the internet's leading publication for dads. Built for speed, SEO, and monetization.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: daddysdigest
*/

/* ============================================================
   DESIGN SYSTEM — Daddy's Digest Custom Theme
   Target: < 50KB total CSS. Zero frameworks. Zero dependencies.
   ============================================================ */

/* --- Reset & Base --- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:'Segoe UI',system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif;color:#555;line-height:1.7;background:#f7f7f7;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:#7eb73d;text-decoration:none;transition:color .2s}
a:hover{color:#5a8a28}
h1,h2,h3,h4,h5,h6{color:#242424;line-height:1.3;font-weight:700}
h1{font-size:2.25rem}
h2{font-size:1.75rem}
h3{font-size:1.35rem}
h4{font-size:1.1rem}
p{margin-bottom:1rem}
ul,ol{padding-left:1.5rem;margin-bottom:1rem}
blockquote{border-left:4px solid #7eb73d;padding:1rem 1.5rem;margin:1.5rem 0;background:#f9f9f9;font-style:italic;color:#666}
table{width:100%;border-collapse:collapse;margin:1.5rem 0}
th,td{padding:.75rem 1rem;border:1px solid #e0e0e0;text-align:left}
th{background:#333;color:#fff;font-weight:600}
pre,code{font-family:'Courier New',monospace;background:#f4f4f4;border-radius:3px}
pre{padding:1rem;overflow-x:auto;margin:1.5rem 0}
code{padding:2px 6px;font-size:.9em}
hr{border:none;border-top:1px solid #e0e0e0;margin:2rem 0}

/* --- Layout --- */
.dd-container{max-width:1200px;margin:0 auto;padding:0 1.5rem}
.dd-row{display:flex;gap:2rem}
.dd-content-area{flex:1;min-width:0}
.dd-sidebar{width:320px;flex-shrink:0}

/* --- Header --- */
.dd-header{background:#222;color:#fff;position:sticky;top:0;z-index:1000;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.dd-header-inner{display:flex;align-items:center;justify-content:space-between;padding:.75rem 0}
.dd-logo{display:flex;flex-direction:column;text-decoration:none;color:#fff;flex-shrink:0}
.dd-logo-text{font-size:1.4rem;font-weight:800;letter-spacing:2px;text-transform:uppercase;border:2px solid #fff;padding:4px 12px;line-height:1.2}
.dd-logo-tagline{font-size:.75rem;color:#aaa;margin-top:4px;font-style:italic}

/* Navigation */
.dd-nav{display:flex;align-items:center;gap:.25rem}
.dd-nav a{color:#ddd;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:1px;padding:.5rem .75rem;transition:color .2s,background .2s;border-radius:3px}
.dd-nav a:hover,.dd-nav a[aria-current="page"]{color:#fff;background:rgba(255,255,255,.1)}
.dd-nav .dd-dropdown{position:relative}
.dd-nav .dd-dropdown-menu{display:none;position:absolute;top:100%;left:0;background:#333;border-radius:4px;min-width:180px;padding:.5rem 0;box-shadow:0 4px 16px rgba(0,0,0,.3);z-index:100}
.dd-nav .dd-dropdown:hover .dd-dropdown-menu{display:block}
.dd-nav .dd-dropdown-menu a{display:block;padding:.5rem 1rem;font-size:.75rem;white-space:nowrap}
.dd-nav .dd-dropdown-menu a:hover{background:rgba(255,255,255,.1)}

/* Header social & search */
.dd-header-actions{display:flex;align-items:center;gap:.75rem}
.dd-header-actions a{color:#aaa;font-size:1rem;transition:color .2s}
.dd-header-actions a:hover{color:#fff}
.dd-header-actions svg{width:18px;height:18px;fill:currentColor}

/* Mobile menu */
.dd-menu-toggle{display:none;background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer;padding:.5rem}
.dd-mobile-nav{display:none;background:#333;padding:1rem 0}
.dd-mobile-nav.is-open{display:block}
.dd-mobile-nav a{display:block;color:#ddd;padding:.75rem 1.5rem;font-size:.9rem;font-weight:600;text-transform:uppercase;letter-spacing:1px;border-bottom:1px solid #444}
.dd-mobile-nav a:hover{background:#444;color:#fff}

/* --- Category Tag --- */
.dd-cat-tag{display:inline-block;background:#7eb73d;color:#fff;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:1px;padding:3px 10px;border-radius:3px;transition:background .2s}
.dd-cat-tag:hover{background:#5a8a28;color:#fff}

/* --- Homepage --- */
.dd-home-main{padding:2rem 0}
.dd-section-title{background:#333;color:#fff;font-size:.9rem;font-weight:700;text-transform:uppercase;letter-spacing:2px;padding:.75rem 1.25rem;margin-bottom:1.5rem}

/* Recent posts list */
.dd-post-card{background:#fff;border-radius:6px;margin-bottom:1.5rem;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.06);transition:box-shadow .2s}
.dd-post-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.1)}
.dd-post-card-img{position:relative;aspect-ratio:16/9;overflow:hidden}
.dd-post-card-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.dd-post-card:hover .dd-post-card-img img{transform:scale(1.03)}
.dd-post-card-body{padding:1.25rem 1.5rem}
.dd-post-card-meta{display:flex;align-items:center;gap:.75rem;font-size:.8rem;color:#999;margin-bottom:.5rem}
.dd-post-card-title{font-size:1.25rem;margin-bottom:.5rem;line-height:1.4}
.dd-post-card-title a{color:#242424;transition:color .2s}
.dd-post-card-title a:hover{color:#7eb73d}
.dd-post-card-excerpt{color:#666;font-size:.95rem;line-height:1.6;margin-bottom:.75rem}
.dd-read-more{font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#7eb73d}
.dd-read-more:hover{color:#5a8a28}

/* Highlight cards (sidebar) */
.dd-highlight-card{position:relative;border-radius:6px;overflow:hidden;margin-bottom:1rem}
.dd-highlight-card-img{position:relative;aspect-ratio:4/3;overflow:hidden}
.dd-highlight-card-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.dd-highlight-card:hover .dd-highlight-card-img img{transform:scale(1.05)}
.dd-highlight-overlay{position:absolute;bottom:0;left:0;right:0;padding:1.25rem;background:linear-gradient(transparent,rgba(0,0,0,.75));color:#fff}
.dd-highlight-overlay h3,.dd-highlight-title{font-size:1rem;line-height:1.4;color:#fff;margin:0}
.dd-highlight-overlay a,.dd-highlight-title a{color:#fff}
.dd-highlight-overlay a:hover,.dd-highlight-title a:hover{color:#7eb73d}
.dd-highlight-no-img{background:#333;aspect-ratio:4/3;display:flex;align-items:flex-end}

/* --- Single Article --- */
.dd-article-hero{position:relative;min-height:400px;display:flex;align-items:flex-end;background:#2a2a2a;margin-bottom:2rem;overflow:hidden}
.dd-article-hero--no-img{min-height:280px;background:linear-gradient(135deg,#222 0%,#333 50%,#2a3a1e 100%)}
.dd-article-hero-img{position:absolute;inset:0}
.dd-article-hero-img img{width:100%;height:100%;object-fit:cover}
.dd-article-hero-overlay{position:absolute;inset:0;background:linear-gradient(transparent 30%,rgba(0,0,0,.7))}
.dd-article-hero-content{position:relative;z-index:2;padding:2rem;max-width:900px}
.dd-article-hero-meta{color:rgba(255,255,255,.85);font-size:.9rem;display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.dd-article-hero-meta a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.4)}
.dd-article-hero-meta a:hover{text-decoration-color:#fff}
.dd-article-hero-content .dd-cat-tag{margin-bottom:.75rem}
.dd-article-hero-content h1{color:#fff;font-size:2.25rem;margin-bottom:.75rem;text-shadow:0 2px 4px rgba(0,0,0,.3)}
.dd-article-hero-meta{color:rgba(255,255,255,.85);font-size:.9rem;display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.dd-article-hero-meta a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.4)}
.dd-article-hero-meta a:hover{text-decoration-color:#fff}

/* Article body */
.dd-article-content{background:#fff;border-radius:6px;padding:2.5rem;margin-bottom:2rem;box-shadow:0 1px 4px rgba(0,0,0,.06);overflow:hidden}
.dd-article-content h2{font-size:1.6rem;margin:2rem 0 1rem;padding-top:1rem;border-top:1px solid #eee}
.dd-article-content h2:first-child{border-top:none;padding-top:0}
.dd-article-content h3{font-size:1.25rem;margin:1.5rem 0 .75rem}
.dd-article-content p{font-size:1.05rem;color:#444;line-height:1.8}
.dd-article-content img,.dd-article-content iframe,.dd-article-content video,.dd-article-content embed{max-width:100%!important;height:auto;border-radius:6px;margin:1.5rem 0}
.dd-article-content .wp-block-image img,.dd-article-content figure img{max-width:100%!important;width:auto;height:auto}
.dd-article-content a{text-decoration:underline;text-decoration-color:rgba(126,183,61,.4)}
.dd-article-content a:hover{text-decoration-color:#7eb73d}

/* Breadcrumbs */
.dd-breadcrumbs{padding:.75rem 0;font-size:.8rem;color:#999}
.dd-breadcrumbs a{color:#777}
.dd-breadcrumbs a:hover{color:#7eb73d}
.dd-breadcrumbs .sep{margin:0 .5rem;color:#ccc}

/* Author box */
.dd-author-box{display:flex;gap:1.25rem;background:#fff;border-radius:6px;padding:1.5rem;margin-bottom:2rem;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.dd-author-box img{width:80px;height:80px;border-radius:50%;flex-shrink:0}
.dd-author-box-info h4{margin-bottom:.25rem}
.dd-author-box-info p{font-size:.9rem;color:#666;margin-bottom:0}

/* Related posts */
.dd-related-posts{background:#fff;border-radius:6px;padding:1.5rem;margin-bottom:2rem;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.dd-related-posts h3{font-size:1.1rem;margin-bottom:1rem;text-transform:uppercase;letter-spacing:1px}
.dd-related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.dd-related-item{border-radius:6px;overflow:hidden}
.dd-related-item img{aspect-ratio:16/10;object-fit:cover;width:100%}
.dd-related-item h4{font-size:.85rem;padding:.75rem;line-height:1.4}
.dd-related-item h4 a{color:#242424}
.dd-related-item h4 a:hover{color:#7eb73d}

/* Table of Contents */
.dd-toc{background:#f9f9f9;border:1px solid #e8e8e8;border-radius:6px;padding:1.25rem 1.5rem;margin-bottom:2rem}
.dd-toc-title{font-size:.9rem;font-weight:700;text-transform:uppercase;letter-spacing:1px;margin-bottom:.75rem;color:#333}
.dd-toc ol{counter-reset:toc;padding-left:0;list-style:none;margin-bottom:0}
.dd-toc li{counter-increment:toc;padding:.3rem 0}
.dd-toc li::before{content:counter(toc) ".";margin-right:.5rem;color:#7eb73d;font-weight:600}
.dd-toc a{color:#555;font-size:.9rem}
.dd-toc a:hover{color:#7eb73d}

/* --- Archive / Category Pages --- */
.dd-archive-header{background:#333;color:#fff;padding:2.5rem 0;margin-bottom:2rem}
.dd-archive-header h1{font-size:2rem;margin-bottom:.5rem}
.dd-archive-header p{color:#aaa;font-size:1rem;max-width:600px}
.dd-archive-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem}

/* --- Pagination --- */
.dd-pagination{display:flex;justify-content:center;gap:.5rem;padding:2rem 0}
.dd-pagination a,.dd-pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 .75rem;border-radius:4px;font-size:.9rem;font-weight:600;background:#fff;color:#333;box-shadow:0 1px 3px rgba(0,0,0,.08);transition:all .2s}
.dd-pagination a:hover{background:#7eb73d;color:#fff;box-shadow:0 2px 8px rgba(126,183,61,.3)}
.dd-pagination .current{background:#333;color:#fff}

/* --- Sidebar Widgets --- */
.dd-widget{background:#fff;border-radius:6px;padding:1.5rem;margin-bottom:1.5rem;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.dd-widget-title{font-size:.85rem;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;color:#333;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:2px solid #7eb73d}
.dd-widget ul{list-style:none;padding:0;margin:0}
.dd-widget li{padding:.5rem 0;border-bottom:1px solid #f0f0f0}
.dd-widget li:last-child{border-bottom:none}
.dd-widget a{color:#555;font-size:.9rem}
.dd-widget a:hover{color:#7eb73d}

/* Search widget */
.dd-search-form{display:flex;gap:.5rem}
.dd-search-form input[type="search"]{flex:1;padding:.6rem 1rem;border:1px solid #ddd;border-radius:4px;font-size:.9rem;outline:none;transition:border-color .2s}
.dd-search-form input[type="search"]:focus{border-color:#7eb73d}
.dd-search-form button{background:#333;color:#fff;border:none;padding:.6rem 1rem;border-radius:4px;cursor:pointer;font-weight:600;font-size:.85rem;transition:background .2s}
.dd-search-form button:hover{background:#7eb73d}

/* --- Ad Slots --- */
.dd-ad-slot{text-align:center;padding:1rem 0;margin:1.5rem 0}
.dd-ad-slot::before{content:'Advertisement';display:block;font-size:.7rem;text-transform:uppercase;letter-spacing:1px;color:#bbb;margin-bottom:.5rem}

/* --- Footer --- */
.dd-footer{background:#222;color:#aaa;padding:3rem 0 0}
.dd-footer-inner{display:grid;grid-template-columns:1fr 1fr 1fr;gap:2rem;padding-bottom:2rem}
.dd-footer h4{color:#fff;font-size:.85rem;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:1rem}
.dd-footer a{color:#aaa;transition:color .2s}
.dd-footer a:hover{color:#7eb73d}
.dd-footer ul{list-style:none;padding:0}
.dd-footer li{padding:.3rem 0}
.dd-footer-brand .dd-logo-text{font-size:1.1rem}
.dd-footer-brand .dd-logo-tagline{color:#777}
.dd-footer-social{display:flex;gap:.75rem;margin-top:1rem}
.dd-footer-social a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#333;color:#aaa;transition:all .2s}
.dd-footer-social a:hover{background:#7eb73d;color:#fff}
.dd-footer-social svg{width:16px;height:16px;fill:currentColor}
.dd-footer-bottom{border-top:1px solid #333;padding:1.25rem 0;text-align:center;font-size:.8rem;color:#666}
.dd-footer-bottom a{color:#888}

/* --- WordPress Defaults --- */
.dd-article-content .aligncenter{display:block;margin:1.5rem auto}
.dd-article-content .alignleft{float:left;margin:0 1.5rem 1rem 0}
.dd-article-content .alignright{float:right;margin:0 0 1rem 1.5rem}
.dd-article-content .wp-caption{max-width:100%;margin:1.5rem 0}
.dd-article-content .wp-caption-text{font-size:.85rem;color:#999;text-align:center;padding:.5rem 0}
.dd-article-content .gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.5rem;margin:1.5rem 0}
.wp-block-embed{max-width:100%;overflow:hidden;margin:1.5rem 0}

/* Social icon sizing in header */
.dd-social-icons{display:flex;align-items:center;gap:.5rem}
.dd-social-icon{color:#aaa;transition:color .2s;display:inline-flex;align-items:center}
.dd-social-icon:hover{color:#fff}
.dd-social-icon svg{width:20px;height:20px}

/* Search toggle */
.dd-search-toggle{background:none;border:none;color:#aaa;cursor:pointer;padding:.25rem;display:inline-flex;align-items:center;transition:color .2s}
.dd-search-toggle:hover{color:#fff}
.dd-search-toggle svg{width:20px;height:20px}

/* Mobile menu toggle */
.dd-mobile-menu-toggle{display:none;background:none;border:none;color:#fff;cursor:pointer;padding:.5rem}
.dd-mobile-menu-toggle svg{width:24px;height:24px}

/* Footer content grid */
.dd-footer-content{display:grid;grid-template-columns:1fr 1fr 1fr;gap:2rem;padding-bottom:2rem}
.dd-footer-column h4{color:#fff;font-size:.85rem;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:1rem}
.dd-footer-brand .dd-footer-logo{margin-bottom:.5rem}
.dd-footer-brand .dd-footer-logo a{color:#fff;font-size:1.2rem;font-weight:800;letter-spacing:2px;text-transform:uppercase;text-decoration:none}
.dd-footer-tagline{color:#777;font-style:italic;font-size:.85rem;margin-bottom:.75rem}
.dd-footer-social-icons{display:flex;gap:.75rem;margin-top:.75rem}
.dd-footer-social-icons a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#333;color:#aaa;transition:all .2s}
.dd-footer-social-icons a:hover{background:#7eb73d;color:#fff}
.dd-footer-social-icons svg{width:16px;height:16px;fill:currentColor}
.dd-footer-bottom{border-top:1px solid #333;padding:1.25rem 0;text-align:center;font-size:.8rem;color:#666}
.dd-footer-bottom a{color:#888}

/* Post card missing image fallback */
.dd-post-card--no-img .dd-post-card-body{padding:1.5rem}

/* --- Utility --- */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.dd-scroll-top,.dd-scroll-to-top{position:fixed;bottom:2rem;right:2rem;width:44px;height:44px;background:#333;color:#fff;border:none;border-radius:50%;cursor:pointer;font-size:1.2rem;display:none;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.2);transition:all .2s;z-index:999}
.dd-scroll-top.is-visible,.dd-scroll-to-top.is-visible{display:flex}
.dd-scroll-top:hover,.dd-scroll-to-top:hover{background:#7eb73d}
.dd-scroll-to-top svg{width:20px;height:20px}

/* --- Page template --- */
.dd-page-content{background:#fff;border-radius:6px;padding:2.5rem;margin:2rem 0;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.dd-page-content h1{margin-bottom:1.5rem}

/* --- 404 --- */
.dd-404{text-align:center;padding:4rem 2rem}
.dd-404 h1{font-size:5rem;color:#ddd;margin-bottom:.5rem}
.dd-404 h2{margin-bottom:1rem}
.dd-404 p{color:#777;margin-bottom:2rem}
.dd-404 .dd-search-form{max-width:400px;margin:0 auto}

/* --- Responsive --- */
@media(max-width:1024px){
  .dd-row{flex-direction:column}
  .dd-sidebar{width:100%}
  .dd-archive-grid{grid-template-columns:1fr}
  .dd-related-grid{grid-template-columns:repeat(2,1fr)}
  .dd-footer-inner{grid-template-columns:1fr 1fr}
}
@media(max-width:768px){
  html{font-size:15px}
  .dd-nav,.dd-nav-desktop{display:none}
  .dd-menu-toggle,.dd-mobile-menu-toggle{display:block}
  .dd-header-inner{flex-wrap:wrap}
  .dd-social-icons{display:none}
  .dd-article-hero{min-height:300px}
  .dd-article-hero-content h1{font-size:1.6rem}
  .dd-article-content{padding:1.5rem}
  .dd-post-card-body{padding:1rem}
  .dd-author-box{flex-direction:column;text-align:center}
  .dd-related-grid{grid-template-columns:1fr}
  .dd-footer-inner,.dd-footer-content{grid-template-columns:1fr}
  .dd-container{padding:0 1rem}
}
@media(max-width:480px){
  .dd-article-hero-content h1{font-size:1.35rem}
  .dd-logo-text{font-size:1.1rem}
}

/* --- Print --- */
@media print{
  .dd-header,.dd-footer,.dd-sidebar,.dd-ad-slot,.dd-scroll-top,.dd-related-posts,.dd-pagination{display:none!important}
  .dd-article-content{box-shadow:none;padding:0}
  body{color:#000;background:#fff}
  a{color:#000;text-decoration:underline}
}
