/*
 * MyDog Theme - Global Styles (all pages)
 * FORCE centered layout overriding Trellis defaults
 */

/* ===== GLOBAL CENTERING - FORCE OVERRIDE ===== */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f9f9f7 !important;
}

/* Force ALL major containers to center */
body > .before-content,
body > .content,
body > footer.footer,
body .before-content,
body .content,
body .footer,
.before-content,
.content,
.footer {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

.wrapper,
.wrapper-header,
.wrapper-content,
.wrapper-footer {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== HEADER - FORCE CENTER ===== */
header.header {
    background: white !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border-bottom: 1px solid #eee !important;
}

header.header > .wrapper.wrapper-header {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 15px 20px !important;
    box-sizing: border-box !important;
}

header.header .header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* Logo centering and sizing */
header.header .site-title-wrapper,
header.header .site-title,
header.header .custom-logo-link,
.header .site-title-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 auto !important;
}

header.header .custom-logo,
header.header .site-logo img,
header.header img,
header.header .header-container img {
    max-height: 65px !important;
    width: auto !important;
    height: auto !important;
    max-width: 170px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* ===== SOCIAL BAR - FORCE CENTER ===== */
.mydog-social-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 22px !important;
    padding: 8px 20px !important;
    background: #f5f5f3 !important;
    border-bottom: 1px solid #e8e8e8 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.mydog-social-bar a {
    color: #666 !important;
    transition: color 0.2s, transform 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
}

.mydog-social-bar a:hover {
    color: #e87e24 !important;
    transform: scale(1.2) !important;
}

/* ===== CATEGORIES BAR - FORCE CENTER ===== */
.mydog-categories-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 30px !important;
    padding: 14px 20px !important;
    background: white !important;
    border-bottom: 2px solid #f0f0f0 !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.mydog-categories-bar a {
    color: #333 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 4px 2px !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s !important;
}

.mydog-categories-bar a:hover {
    color: #e87e24 !important;
    border-bottom-color: #e87e24 !important;
}

/* ===== REMOVE BLUE FROM LINKS ===== */
a, a:visited, a:link {
    color: #333 !important;
    text-decoration: none !important;
}

a:hover {
    color: #e87e24 !important;
}

.entry-title a,
.entry-title a:visited,
.entry-title a:link,
h1 a, h2 a, h3 a, h4 a,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited {
    color: #222 !important;
    text-decoration: none !important;
}

.entry-title a:hover,
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover {
    color: #e87e24 !important;
}

.meta-cats a,
.meta-cats a:visited {
    color: white !important;
}

.read-more a,
a.read-more,
.more-link {
    color: #e87e24 !important;
    font-weight: 600 !important;
}

/* ===== CONTENT AREA CENTER ===== */
.wrapper-content {
    display: flex !important;
    gap: 30px !important;
    padding: 30px 20px !important;
    flex-wrap: wrap !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.content-container {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* ===== ARCHIVE / CATEGORY PAGES ===== */
.archive .page-header,
.category .page-header,
.archive .archive-header,
.category .archive-header {
    text-align: center !important;
    padding: 40px 20px 25px !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
}

.archive .page-title,
.category .page-title,
.archive .archive-title,
.category .archive-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 34px !important;
    color: #222 !important;
    border-bottom: 3px solid #e87e24 !important;
    display: inline-block !important;
    padding-bottom: 12px !important;
    text-align: center !important;
}

.archive .archive-description,
.category .archive-description {
    text-align: center !important;
    color: #666 !important;
    max-width: 600px !important;
    margin: 10px auto 0 !important;
}

.content-header {
    text-align: center !important;
    padding: 30px 0 !important;
}

.content-header .entry-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 34px !important;
    color: #222 !important;
    border-bottom: 3px solid #e87e24 !important;
    display: inline-block !important;
    padding-bottom: 12px !important;
}

/* ===== RECIPE CARDS ===== */
article.excerpt {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06) !important;
    margin-bottom: 30px !important;
    transition: transform 0.25s, box-shadow 0.25s !important;
    display: block !important;
    border: none !important;
}

article.excerpt:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

article.excerpt .excerpt-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Card images */
article.excerpt .excerpt-photo {
    width: 280px !important;
    height: 200px !important;
    max-width: 280px !important;
    min-width: 280px !important;
    flex-shrink: 0 !important;
    margin: 15px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: block !important;
}

article.excerpt .excerpt-photo a.excerpt-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

article.excerpt .excerpt-photo img,
article.excerpt .wp-post-image,
article.excerpt img[class*="attachment-"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px !important;
}

/* Card content */
article.excerpt .excerpt-post-data {
    flex: 1 1 auto !important;
    padding: 20px 25px 20px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: left !important;
}

article.excerpt .excerpt-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.35 !important;
}

article.excerpt .excerpt-title a {
    color: #222 !important;
    text-decoration: none !important;
}

article.excerpt .excerpt-title a:hover {
    color: #e87e24 !important;
    color: var(--mydog-primary, #e87e24) !important;
}

article.excerpt .excerpt-excerpt {
    font-size: 15px !important;
    line-height: 1.65 !important;
    color: #555 !important;
    margin: 0 0 15px 0 !important;
}

article.excerpt .excerpt-excerpt p {
    margin: 0 !important;
    color: #555 !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

/* Read More button */
article.excerpt .article-read-more {
    display: inline-block !important;
    background: #e87e24 !important;
    background: var(--mydog-primary, #e87e24) !important;
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    margin: 0 !important;
    border: none !important;
    cursor: pointer !important;
}

article.excerpt .article-read-more:hover {
    background: #c96a1a !important;
    background: var(--mydog-secondary, #c96a1a) !important;
    color: white !important;
}

/* Card meta */
article.excerpt .post-meta-wrapper {
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
    font-size: 13px !important;
    color: #888 !important;
}

article.excerpt .post-meta-wrapper p {
    margin: 0 !important;
}

article.excerpt .meta-cats a {
    background: #e87e24 !important;
    background: var(--mydog-primary, #e87e24) !important;
    color: white !important;
    padding: 3px 12px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
    article.excerpt .excerpt-container {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    article.excerpt .excerpt-photo {
        width: 100% !important;
        height: 200px !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        border-radius: 12px 12px 0 0 !important;
    }

    article.excerpt .excerpt-photo img {
        border-radius: 12px 12px 0 0 !important;
    }

    article.excerpt .excerpt-post-data {
        padding: 20px !important;
    }
}

/* ===== PAGINATION ===== */
.pagination,
.nav-links,
.posts-navigation {
    text-align: center !important;
    padding: 30px 0 50px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.nav-links a,
.page-numbers {
    display: inline-block !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    color: #e87e24 !important;
    background: white !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08) !important;
    transition: all 0.2s !important;
}

.nav-links a:hover,
.page-numbers:hover {
    background: #e87e24 !important;
    color: white !important;
}

.nav-links .current,
.page-numbers.current {
    background: #e87e24 !important;
    color: white !important;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 320px !important;
    flex-shrink: 0 !important;
}

.sidebar .widget,
.sidebar .widget-container {
    background: white !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
}

.sidebar .widget-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 18px !important;
    color: #222 !important;
    border-bottom: 2px solid #e87e24 !important;
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
}

/* Recent Posts / Recent Recipes Widget */
.sidebar .widget_recent_entries ul,
.sidebar .widget ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar .widget_recent_entries li,
.sidebar .widget ul li {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.sidebar .widget_recent_entries li:last-child,
.sidebar .widget ul li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.sidebar .widget_recent_entries li a,
.sidebar .widget ul li a {
    color: #222 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    display: block !important;
}

.sidebar .widget_recent_entries li a:hover,
.sidebar .widget ul li a:hover {
    color: #e87e24 !important;
}

/* Fix widget images - Recent Posts with Thumbnails using CSS Grid */
.sidebar .widget ul li:has(img) {
    display: grid !important;
    grid-template-columns: 80px 1fr !important;
    gap: 4px 14px !important;
    align-items: start !important;
    overflow: visible !important;
}

.sidebar .widget li img,
.sidebar .widget .post-thumbnail img,
.sidebar .widget .wp-post-image {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    float: none !important;
    margin: 0 !important;
    display: block !important;
}

/* Hide Pinterest and social share overlays on sidebar images */
.sidebar .widget .pin-it-btn,
.sidebar .widget .social-share,
.sidebar .widget [class*="pinterest"],
.sidebar .widget [class*="share"],
.sidebar .widget .sharedaddy,
.sidebar .widget a[data-pin-do],
.sidebar .widget img + a[href*="pinterest"],
.sidebar .widget .pin-it-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Author text in sidebar */
.sidebar .widget li .post-author,
.sidebar .widget li span {
    font-size: 12px !important;
    color: #999 !important;
    font-weight: 400 !important;
    display: block !important;
    clear: none !important;
    margin-left: 0 !important;
}

/* Image container/link spans both columns */
.sidebar .widget ul li:has(img) > a:first-child,
.sidebar .widget ul li:has(img) > img:first-child,
.sidebar .widget ul li:has(img) > .post-thumbnail:first-child {
    grid-column: 1 !important;
    grid-row: 1 / span 10 !important;
}

/* Other siblings stack in the right column */
.sidebar .widget ul li:has(img) > *:not(:first-child) {
    grid-column: 2 !important;
}

/* Clearfix for float - disabled when using grid */
.sidebar .widget li::after {
    content: none !important;
}

/* Category widget */
.sidebar .widget_categories li {
    padding: 8px 0 !important;
}

.sidebar .widget_categories li a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Search widget */
.sidebar .widget_search .search-form {
    display: flex !important;
    gap: 0 !important;
}

.sidebar .widget_search .search-field {
    flex: 1 !important;
    padding: 10px 14px !important;
    border: 2px solid #e8e8e8 !important;
    border-radius: 8px 0 0 8px !important;
    font-size: 14px !important;
    outline: none !important;
}

.sidebar .widget_search .search-submit {
    background: #e87e24 !important;
    color: white !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 0 8px 8px 0 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

/* ===== FOOTER ===== */
footer.footer {
    background: white !important;
    border-top: 2px solid #f0f0f0 !important;
    padding: 30px 20px !important;
    text-align: center !important;
    color: #888 !important;
    font-size: 14px !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .wrapper-content {
        flex-direction: column !important;
    }

    .sidebar {
        width: 100% !important;
    }

    .mydog-categories-bar {
        gap: 15px !important;
        padding: 10px 15px !important;
    }

    .mydog-categories-bar a {
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    header.header .header-container {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .mydog-categories-bar {
        gap: 10px !important;
        padding: 10px !important;
    }

    .mydog-categories-bar a {
        font-size: 11px !important;
        letter-spacing: 0 !important;
    }

    .mydog-social-bar {
        gap: 15px !important;
    }

    .article-excerpt .post-thumbnail img,
    .article-excerpt .wp-post-image,
    .article-excerpt img[class*="attachment-"] {
        height: 200px !important;
    }

    .article-excerpt .entry-content,
    .article-excerpt .excerpt-content,
    .article-excerpt .article-content {
        padding: 18px !important;
    }

    .article-excerpt .entry-title,
    .article-excerpt h2 {
        font-size: 18px !important;
    }

    body > .before-content,
    body > .content,
    .before-content,
    .content {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .archive .page-title,
    .category .page-title,
    .archive .archive-title,
    .category .archive-title {
        font-size: 26px !important;
    }
}

@media (max-width: 480px) {
    .mydog-categories-bar {
        gap: 8px !important;
    }

    .mydog-categories-bar a {
        font-size: 10px !important;
        padding: 3px 0 !important;
    }

    .article-excerpt .post-thumbnail img,
    .article-excerpt .wp-post-image,
    .article-excerpt img[class*="attachment-"] {
        height: 180px !important;
    }
}

/* ===== PREMIUM DOG STYLE CUSTOMIZATION ===== */
.hr-section-title::before,
.sidebar .widget-title::before,
.cat-header h1::before,
.single .entry-title::before,
.single .article-post h1::before {
    content: "🐾";
    margin-right: 8px;
    color: var(--mydog-primary, #e87e24) !important;
    display: inline-block;
    transform: rotate(-10deg);
}
.hr-badge::before,
.cat-card-badge::before,
.meta-cats a::before {
    content: "🐾";
    margin-right: 4px;
    font-size: 0.9em;
}

