/*
Theme Name:  Trusted Deal Guide
Theme URI:   https://trusteddealguide.com
Author:      Trusted Deal Guide Team
Author URI:  https://trusteddealguide.com
Description: Independent Reviews & Deals Guide Theme - A clean, editorial-style WordPress theme built for product review sites, deal aggregators, and consumer guides. Features a modern layout with Tailwind CSS, Merriweather serif typography, and a professional blue-and-white color scheme.
Version:     1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trusted-deal-guide
Tags: blog, news, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, wide-blocks
*/

/*
 * === THEME STYLE NOTES ===
 *
 * This theme uses Tailwind CSS (loaded via CDN in functions.php) as its
 * primary styling framework. The styles defined below serve as:
 *
 *  1. WordPress Theme Declaration (the comment header above is REQUIRED).
 *  2. Global CSS custom properties and base overrides.
 *  3. Custom utility classes that extend Tailwind's design tokens.
 *
 * All component-level styling is handled via Tailwind utility classes
 * directly in the template files (header.php, footer.php, front-page.php).
 */

/* ================================================
   SECTION 1: CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ================================================ */
:root {
    /* Brand Colors */
    --color-brand-blue:       #1E3A8A;
    --color-brand-blue-hover: #1e40af;
    --color-brand-accent:     #3B82F6;

    /* Text Colors */
    --color-text-dark:   #121212;
    --color-text-light:  #555555;
    --color-text-muted:  #6B7280;

    /* Background Colors */
    --color-bg-white:       #ffffff;
    --color-bg-light:       #f7f7f7;
    --color-bg-gray:        #F9FAFB;

    /* Border Colors */
    --color-border-light: #E5E7EB;
    --color-border-edit:  #e2e2e2;

    /* Typography */
    --font-serif:  'Merriweather', Georgia, 'Times New Roman', serif;
    --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
    --font-header: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --container-max: 80rem; /* 1280px = Tailwind's max-w-7xl */

    /* Transitions */
    --transition-fast:   150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow:   500ms ease;
}

/* ================================================
   SECTION 2: GLOBAL BASE RESET & DEFAULTS
   ================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    background-color: var(--color-bg-white);
    color: var(--color-text-dark);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Ensure WordPress admin bar doesn't cover sticky header */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ================================================
   SECTION 3: TYPOGRAPHY
   ================================================ */
h1, h2, h3, h4, h5, h6 {
    color: inherit;
    line-height: 1.3;
    margin-top: 0;
}

p {
    color: inherit;
    margin-top: 0;
}

a {
    color: var(--color-brand-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-brand-blue-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================================================
   SECTION 4: CUSTOM UTILITY CLASSES
   (Complement Tailwind's built-in utilities)
   ================================================ */

/* --- Font Family Helpers --- */
.font-serif-logo {
    font-family: var(--font-serif);
}

.header-font {
    font-family: var(--font-header);
}

/* --- Brand Color Helpers --- */
.text-deep-blue    { color: var(--color-brand-blue); }
.bg-deep-blue      { background-color: var(--color-brand-blue); }
.border-deep-blue  { border-color: var(--color-brand-blue); }
.text-slate-gray   { color: var(--color-text-muted); }
.border-light-gray { border-color: var(--color-border-light); }
.border-editorial  { border-color: var(--color-border-edit); }

/* --- Navigation Underline Animation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-brand-blue);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

/* ================================================
   SECTION 5: WORDPRESS-SPECIFIC HELPERS
   ================================================ */

/* Screen-reader text (WordPress accessibility standard) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-bg-light);
    clip: auto !important;
    clip-path: none;
    color: var(--color-text-dark);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* WordPress Alignment Classes */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter, .alignfull { display: block; margin-left: auto; margin-right: auto; }

/* WordPress Caption */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 0.5rem; }

/* Sticky Post */
.sticky { border-left: 3px solid var(--color-brand-blue); padding-left: 1rem; }

/* ================================================
   SECTION 6: HIDE CONFLICTING DEFAULT THEME ELEMENTS
   (Safety net when used as child theme or after activation)
   ================================================ */
.sinatra-header,
.sinatra-footer,
#colophon,
#masthead,
.site-footer.default-wp-footer {
    display: none !important;
}

/* Force card images to respect container height and use cover fit */
.overflow-hidden img,
.overflow-hidden a img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* ================================================
   SECTION 7: WORDPRESS PAGINATION STYLING
   ================================================ */
nav.pagination,
.pagination,
ul.page-numbers {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 2rem auto !important;
}

ul.page-numbers li {
    display: inline-flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-numbers,
ul.page-numbers li a,
ul.page-numbers li span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0 0.85rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    text-decoration: none !important;
    transition: all 150ms ease !important;
}

ul.page-numbers li a:hover,
a.page-numbers:hover {
    color: #1e3a8a !important;
    background-color: #eff6ff !important;
    border-color: #2563eb !important;
}

ul.page-numbers li span.current,
span.page-numbers.current {
    color: #ffffff !important;
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

ul.page-numbers li span.dots,
span.page-numbers.dots {
    border: none !important;
    background: transparent !important;
    color: #9ca3af !important;
}

