/**
 * Global Editorial Styles
 *
 * Applies the editorial design system site-wide to create visual consistency
 * with the homepage. Overrides parent theme defaults (Open Sans, #289dcc).
 *
 * @package TechEd_Colormag_Pro_Child
 * @since 2.10.0
 */

/* ==========================================================================
   ROOT VARIABLES (shared design tokens)
   ========================================================================== */

:root {
    --teched-primary: #2563eb;
    --teched-primary-hover: #1d4ed8;
    --teched-primary-soft: rgba(37, 99, 235, 0.08);
    --teched-coral: #f97f7f;
    --teched-coral-hover: #f56565;
    --teched-dark: #1e293b;
    --teched-gray: #6b7280;
    --teched-gray-light: #9ca3af;
    --teched-gray-lighter: #e5e7eb;
    --teched-white: #ffffff;
    --teched-off-white: #f8f9fa;
    --teched-heading-color: #1e293b;
    --teched-font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --teched-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --teched-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --teched-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --teched-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --teched-radius: 6px;
    --teched-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BODY & BASE TYPOGRAPHY
   Override parent theme Open Sans with system sans-serif
   ========================================================================== */

body {
    font-family: var(--teched-font-sans);
    color: #374151;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* All headings get the serif editorial font */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--teched-font-serif);
    color: var(--teched-heading-color);
    line-height: 1.3;
}

/* General link styling */
a {
    transition: color var(--teched-transition);
}

/* ==========================================================================
   PARENT THEME PRIMARY COLOR OVERRIDES (#289dcc → #2563eb)
   ========================================================================== */

/* Widget titles — the parent uses a blue background bar */
.widget-title span,
.widget-title {
    border-bottom-color: var(--teched-primary) !important;
}

.widget-title span {
    background-color: var(--teched-primary) !important;
}

/* Category color fallback — parent uses #289dcc as default */
.category-color-1,
.colormag-header-clean .category-color-1,
.below-entry-meta .category-color-1 {
    background-color: var(--teched-primary);
}

/* Breaking news bar */
.breaking-news-latest {
    background-color: var(--teched-primary);
}

/* Breadcrumbs */
.breadcrumb-trail a:hover,
.entry-breadcrumb a:hover {
    color: var(--teched-primary);
}

/* Tag links */
.tags a:hover,
.tag-links a:hover {
    background-color: var(--teched-primary);
    color: var(--teched-white);
}

/* Comments */
.comment-reply-link,
#respond #submit {
    background-color: var(--teched-primary);
}

.comment-reply-link:hover,
#respond #submit:hover {
    background-color: var(--teched-primary-hover);
}

/* Post navigation */
.default-wp-page .next a,
.default-wp-page .previous a {
    color: var(--teched-primary);
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */

#masthead {
    box-shadow: var(--teched-shadow-sm);
    position: relative;
    z-index: 100;
}

/* Site title / logo */
#site-title a {
    font-family: var(--teched-font-serif);
    letter-spacing: -0.01em;
}

/* ==========================================================================
   PRIMARY NAVIGATION
   ========================================================================== */

.main-navigation {
    border-top: none;
    border-bottom: none;
}

.main-navigation .inner-wrap {
    border-top: none;
}

/* Nav bar background — clean dark instead of parent default */
.main-navigation,
.main-navigation ul.sub-menu,
.main-navigation ul.children {
    background-color: var(--teched-dark);
}

/* Nav links */
.main-navigation a {
    font-family: var(--teched-font-sans);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    transition: color var(--teched-transition), background-color var(--teched-transition);
}

.main-navigation ul li:hover > a,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-ancestor > a,
.main-navigation ul li.current_page_ancestor > a,
.main-navigation ul li.current_page_item > a {
    background-color: var(--teched-primary);
}

/* Submenu polish */
.main-navigation ul.sub-menu,
.main-navigation ul.children {
    border-top: 2px solid var(--teched-coral);
    box-shadow: var(--teched-shadow-md);
}

.main-navigation ul.sub-menu li a,
.main-navigation ul.children li a {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Search in header */
.main-navigation .search-wrap button,
.main-navigation .random-post a {
    transition: background-color var(--teched-transition);
}

.main-navigation .search-wrap button:hover,
.main-navigation .random-post a:hover {
    background-color: var(--teched-primary);
}

/* ==========================================================================
   CONTENT AREA
   ========================================================================== */

/* Main content area base rhythm */
#primary {
    font-family: var(--teched-font-sans);
}

#primary article .entry-title,
#primary article .entry-title a {
    font-family: var(--teched-font-serif);
    color: var(--teched-heading-color);
    transition: color var(--teched-transition);
}

#primary article .entry-title a:hover {
    color: var(--teched-primary);
}

/* Entry content readability */
.entry-content,
.type-page .entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #374151;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: var(--teched-font-serif);
    margin-top: 1.75em;
    margin-bottom: 0.75em;
}

/* Entry meta */
.below-entry-meta span,
.below-entry-meta a,
.entry-meta span,
.entry-meta a {
    font-family: var(--teched-font-sans);
}

.below-entry-meta a:hover,
.entry-meta a:hover {
    color: var(--teched-primary);
}

/* Read more links */
.entry-content .more-link,
.read-more a {
    color: var(--teched-coral);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--teched-transition);
}

.entry-content .more-link:hover,
.read-more a:hover {
    color: var(--teched-coral-hover);
}

/* ==========================================================================
   SIDEBAR / WIDGETS
   ========================================================================== */

#secondary .widget {
    margin-bottom: 30px;
}

/* Widget titles — serif, coral accent bar */
#secondary .widget-title,
.teched-above-footer .widget-title,
.widget-title {
    font-family: var(--teched-font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* Widget links */
#secondary .widget a {
    transition: color var(--teched-transition);
}

#secondary .widget a:hover {
    color: var(--teched-primary);
}

/* Widget lists — cleaner spacing */
#secondary .widget ul li {
    border-bottom: 1px solid var(--teched-gray-lighter);
    padding: 8px 0;
}

#secondary .widget ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   PARENT THEME POST CARDS / WIDGETS
   Matches the editorial card treatment from the homepage
   ========================================================================== */

/* Featured post widget thumbnails */
.widget_featured_posts .single-article {
    transition: transform var(--teched-transition), box-shadow var(--teched-transition);
}

.widget_featured_posts .single-article:hover {
    transform: translateY(-2px);
}

.widget_featured_posts .article-content .entry-title {
    font-family: var(--teched-font-serif);
}

.widget_featured_posts .article-content .entry-title a {
    color: var(--teched-heading-color);
    transition: color var(--teched-transition);
}

.widget_featured_posts .article-content .entry-title a:hover {
    color: var(--teched-primary);
}

/* Category labels on parent theme post cards */
.below-entry-meta .cat-links a,
.category-color-1 {
    font-family: var(--teched-font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumb-trail,
.entry-breadcrumb {
    font-size: 0.875rem;
    color: var(--teched-gray);
    padding: 12px 0;
}

.breadcrumb-trail a,
.entry-breadcrumb a {
    color: var(--teched-primary);
    text-decoration: none;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination .page-numbers,
.default-wp-page a,
.default-wp-page span {
    border-radius: var(--teched-radius);
    transition: background-color var(--teched-transition), color var(--teched-transition);
}

.pagination .page-numbers.current,
.default-wp-page span.current {
    background-color: var(--teched-primary);
    border-color: var(--teched-primary);
}

.pagination .page-numbers:hover,
.default-wp-page a:hover {
    background-color: var(--teched-primary);
    border-color: var(--teched-primary);
    color: var(--teched-white);
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */

.comments-area .comment-author {
    font-family: var(--teched-font-serif);
}

.comment-list .comment {
    border-bottom: 1px solid var(--teched-gray-lighter);
}

/* ==========================================================================
   FORMS (global — search, contact, etc.)
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
    border-radius: var(--teched-radius);
    border: 1px solid var(--teched-gray-lighter);
    font-family: var(--teched-font-sans);
    transition: border-color var(--teched-transition), box-shadow var(--teched-transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--teched-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Submit buttons */
input[type="submit"],
button[type="submit"] {
    background-color: var(--teched-primary);
    color: var(--teched-white);
    border: none;
    border-radius: var(--teched-radius);
    font-family: var(--teched-font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--teched-transition), transform var(--teched-transition);
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--teched-primary-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   COLORMAG SPECIFIC WIDGET OVERRIDES
   ========================================================================== */

/* Tabbed widget */
.widget_tabbed_widget .article-content .entry-title {
    font-family: var(--teched-font-serif);
}

/* Category widget count badges */
.widget_categories ul li .count,
.widget_archive ul li .count {
    background-color: var(--teched-primary-soft);
    color: var(--teched-primary);
    border-radius: 4px;
}

/* Recent Posts widget */
.widget_recent_entries li a {
    font-family: var(--teched-font-serif);
    color: var(--teched-heading-color);
}

.widget_recent_entries li a:hover {
    color: var(--teched-primary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .entry-content,
    .type-page .entry-content {
        font-size: 1rem;
        line-height: 1.7;
    }
}
