/*
Theme Name: Admired Modern
Theme URI: https://wordpress.org/
Description: A clean, PHP 8.3+ compatible classic WordPress theme recreating the traditional Admired aesthetic: boxed layout, customizable header banner, dual dark/accent navigation bars, two-column content with right sidebar, and full WCAG 2.1 AA accessibility compliance.
Author: Custom Classic Build
Version: 2.0.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: admired-modern
*/

:root {
    --admired-bg: #e8ecef;
    --admired-header-bg: #1e293b;
    --admired-nav-bg: #0f172a;
    --admired-accent: #1d6fa5;
    --admired-accent-hover: #15527a;
    --admired-card-bg: #ffffff;
    --admired-text: #1f2937;
    --admired-muted: #4b5563;
    --admired-border: #d1d5db;
    --admired-widget-header: #334155;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--admired-bg);
    color: var(--admired-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: var(--admired-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover, a:focus {
    color: var(--admired-accent-hover);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--admired-accent);
    outline-offset: 2px;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: #000000;
    color: #ffffff;
    padding: 10px 16px;
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    top: 16px;
    color: #ffffff;
}

/* Top Utility Bar */
.top-utility-bar {
    background-color: var(--admired-nav-bg);
    color: #f8fafc;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.top-utility-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-utility-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.top-utility-bar a {
    color: #e2e8f0;
    text-decoration: none;
}

.top-utility-bar a:hover, .top-utility-bar a:focus {
    color: #ffffff;
    text-decoration: underline;
}

/* Header & Branding (Classic Admired Style) */
.site-header {
    background-color: var(--admired-header-bg);
    color: #ffffff;
    border-bottom: 4px solid var(--admired-accent);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-branding {
    flex: 1 1 auto;
}

.site-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.45);
}

.site-title a:hover, .site-title a:focus {
    color: #e2e8f0;
}

.site-description {
    margin: 6px 0 0;
    font-size: 1rem;
    color: #cbd5e1;
    font-style: italic;
}

.header-banner-image {
    max-width: 1120px;
    margin: 0 auto;
    line-height: 0;
}

.header-banner-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Primary Navigation Bar */
.main-navigation {
    background-color: var(--admired-nav-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 12px 18px;
    color: #f8fafc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.15s ease;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background-color: var(--admired-accent);
    color: #ffffff;
}

/* Dropdown Submenus */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background-color: var(--admired-nav-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 999;
    flex-direction: column;
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
}

/* Main Boxed Wrapper */
.site-container {
    max-width: 1120px;
    margin: 28px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

body.layout-left-sidebar .site-container {
    grid-template-columns: 320px minmax(0, 1fr);
}

body.layout-left-sidebar .content-area {
    order: 2;
}

body.layout-left-sidebar .widget-area {
    order: 1;
}

body.layout-full-width .site-container {
    grid-template-columns: minmax(0, 1fr);
}

/* Posts & Articles (Classic Admired Card Box Look) */
.post-card {
    background: var(--admired-card-bg);
    border: 1px solid var(--admired-border);
    border-radius: 4px;
    padding: 26px 30px;
    margin-bottom: 26px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.entry-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.entry-title {
    margin: 0 0 8px 0;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.75rem;
    line-height: 1.3;
    color: #0f172a;
}

.entry-title a {
    color: #0f172a;
    text-decoration: none;
}

.entry-title a:hover, .entry-title a:focus {
    color: var(--admired-accent);
    text-decoration: underline;
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--admired-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.entry-meta a {
    color: var(--admired-accent);
    text-decoration: none;
    font-weight: 500;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.post-thumbnail {
    margin-bottom: 18px;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    border: 1px solid var(--admired-border);
}

.entry-content, .entry-summary {
    overflow-wrap: break-word;
}

.entry-content img, .entry-content figure {
    max-width: 100%;
    height: auto;
}

.read-more-link {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 15px;
    background-color: var(--admired-accent);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 600;
}

.read-more-link:hover, .read-more-link:focus {
    background-color: var(--admired-accent-hover);
}

.entry-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: var(--admired-muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Sidebar Widgets (Classic Admired Boxed Title Bar) */
.widget-area .widget {
    background: var(--admired-card-bg);
    border: 1px solid var(--admired-border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.widget-title {
    margin: -20px -20px 16px -20px;
    padding: 11px 18px;
    background-color: var(--admired-widget-header);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-bottom: 3px solid var(--admired-accent);
}

.widget ul {
    list-style: disc;
    margin: 0;
    padding-left: 20px;
}

.widget li {
    margin-bottom: 8px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    font-size: 0.95rem;
}

.search-submit {
    padding: 8px 16px;
    background-color: var(--admired-accent);
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
}

.search-submit:hover {
    background-color: var(--admired-accent-hover);
}

/* Pagination */
.pagination, .posts-navigation {
    margin: 24px 0;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid var(--admired-border);
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    color: var(--admired-text);
}

.page-numbers.current, .page-numbers:hover {
    background: var(--admired-accent);
    color: #ffffff;
    border-color: var(--admired-accent);
}

/* Comments Area */
.comments-area {
    background: var(--admired-card-bg);
    border: 1px solid var(--admired-border);
    border-radius: 4px;
    padding: 26px 30px;
    margin-bottom: 26px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.comment-body {
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    margin-bottom: 14px;
    font-family: inherit;
}

.comment-form .submit {
    background-color: var(--admired-accent);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
}

/* Footer & 3-Column Footer Widgets */
.site-footer {
    background-color: var(--admired-header-bg);
    color: #e2e8f0;
    border-top: 4px solid var(--admired-accent);
    margin-top: 40px;
}

.footer-widgets-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-widget-col .widget-title {
    margin: 0 0 14px 0;
    padding: 0 0 8px 0;
    background: transparent;
    border-bottom: 2px solid var(--admired-accent);
    color: #ffffff;
}

.footer-widget-col a {
    color: #cbd5e1;
}

.footer-widget-col a:hover {
    color: #ffffff;
}

.site-info {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #cbd5e1;
}

.site-info a {
    color: #ffffff;
}

/* WordPress Core Alignment Classes */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
    border: 1px solid var(--admired-border);
    background: #f8fafc;
    padding: 6px;
    text-align: center;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--admired-muted);
    margin: 6px 0 0;
}

.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .site-container,
    body.layout-left-sidebar .site-container {
        grid-template-columns: 1fr;
    }
    body.layout-left-sidebar .content-area,
    body.layout-left-sidebar .widget-area {
        order: initial;
    }
    .footer-widgets-inner {
        grid-template-columns: 1fr;
    }
}
