/*
Theme Name: Grill Guys
Theme URI: https://grill-guys.com
Author: Grill Guys
Author URI: https://grill-guys.com
Description: Custom theme for Grill Guys BBQ — recipes, reviews, and gear for backyard pitmasters.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: grill-guys
*/

/* === RESET & VARIABLES === */
:root {
    --charcoal: #1a1a1a;
    --deep-charcoal: #111111;
    --smoke: #2a2a2a;
    --ash: #3a3a3a;
    --ember: #c8102e;
    --ember-dark: #a00d24;
    --flame: #e8461e;
    --cream: #f5f0e8;
    --bone: #e8e0d4;
    --text-light: #d4cfc7;
    --text-muted: #8a8478;
    --white: #fafaf8;
    --success: #2d6a2e;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --max-width: 1200px;
    --content-width: 780px;
    --gap: 2rem;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--cream);
    background: var(--charcoal);
}

a {
    color: var(--ember);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--flame);
}

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

/* === LAYOUT === */
.site-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* === HEADER === */
.site-header {
    background: var(--deep-charcoal);
    border-bottom: 3px solid var(--ember);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: 1px;
    text-decoration: none;
}

.site-logo:hover {
    color: var(--white);
}

.site-logo span {
    color: var(--ember);
}

.site-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

@media (min-width: 768px) {
    .site-logo-img {
        height: 42px;
    }
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-nav a {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.current {
    color: var(--ember);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--deep-charcoal) 0%, var(--smoke) 100%);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--ash);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--cream);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === CARDS & POST GRID === */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--gap);
    padding: 3rem 0;
}

.post-card {
    background: var(--smoke);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--ash);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.post-card__image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.post-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.post-card__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ember);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-card__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--cream);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.post-card__title a {
    color: inherit;
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--ember);
}

.post-card__excerpt {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.post-card__meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ash);
}

/* === SINGLE POST / RECIPE === */
.single-header {
    padding: 3rem 0 1.5rem;
    text-align: center;
}

.single-header__category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ember);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.single-header h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--cream);
    line-height: 1.25;
    max-width: 700px;
    margin: 0 auto 1rem;
}

.single-header__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.single-featured-image {
    max-width: var(--content-width);
    margin: 0 auto 2.5rem;
    border-radius: 6px;
    overflow: hidden;
}

.single-featured-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Post content */
.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding-bottom: 3rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--cream);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ember);
}

.post-content h3 {
    font-size: 1.2rem;
    color: var(--bone);
    margin: 2rem 0 0.75rem;
    font-weight: 600;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.5rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.4rem;
}

.post-content img {
    border-radius: 6px;
    margin: 1.5rem 0;
}

.post-content blockquote {
    border-left: 3px solid var(--ember);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--smoke);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--bone);
}

/* YouTube embeds */
.wp-block-embed {
    margin: 2rem 0 2.5rem;
    clear: both;
}

.wp-block-embed .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--ash);
}

.wp-block-embed .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.post-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    margin: 1.5rem 0;
}

/* === RECIPE CARD (structured data target) === */
.recipe-box {
    background: var(--smoke);
    border: 1px solid var(--ash);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.recipe-box__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ember);
}

.recipe-box__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--cream);
}

.recipe-box__meta-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.recipe-box__meta-item {
    text-align: center;
}

.recipe-box__meta-item span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.recipe-box__meta-item strong {
    color: var(--cream);
    font-size: 1rem;
}

.recipe-box h3 {
    font-size: 1.1rem;
    color: var(--bone);
    margin: 1.5rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.recipe-box ul {
    list-style: none;
    padding: 0;
}

.recipe-box ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-light);
    font-size: 0.95rem;
}

.recipe-box ol {
    padding-left: 1.25rem;
}

.recipe-box ol li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === AFFILIATE PRODUCT BOX === */
.product-box {
    background: var(--smoke);
    border: 1px solid var(--ash);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: border-color 0.2s;
}

.product-box:hover {
    border-color: var(--ember);
}

.product-box__image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 6px;
    padding: 8px;
}

.product-box__info {
    flex: 1;
}

.product-box__name {
    font-weight: 600;
    color: var(--cream);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.product-box__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.product-box__link {
    display: inline-block;
    background: var(--ember);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.product-box__link:hover {
    background: var(--ember-dark);
    color: var(--white);
}

/* === PRODUCT REVIEW GRID === */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap);
    padding: 2rem 0;
}

.review-card {
    background: var(--smoke);
    border: 1px solid var(--ash);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding: 2rem 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.review-card:hover {
    transform: translateY(-2px);
    border-color: var(--ember);
}

.review-card__image {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin: 0 auto 1rem;
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
}

.review-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.review-card__excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.review-card__cta {
    display: inline-block;
    background: var(--ember);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.review-card__cta:hover {
    background: var(--ember-dark);
    color: var(--white);
}

/* === SIDEBAR (optional, for archives) === */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding: 3rem 0;
}

.sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
}

.sidebar-widget {
    background: var(--smoke);
    border: 1px solid var(--ash);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ember);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ash);
}

/* === FOOTER === */
.site-footer {
    background: var(--deep-charcoal);
    border-top: 3px solid var(--ember);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cream);
    margin-bottom: 0.75rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.4rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--cream);
}

.footer-col p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding: 1.5rem 1.5rem 0;
    border-top: 1px solid var(--ash);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--ember);
}

/* === AMAZON DISCLOSURE === */
.affiliate-disclosure {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid var(--ash);
    margin-top: 1rem;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination a {
    background: var(--smoke);
    color: var(--text-light);
    border: 1px solid var(--ash);
}

.pagination a:hover {
    border-color: var(--ember);
    color: var(--ember);
}

.pagination .current {
    background: var(--ember);
    color: var(--white);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .post-grid {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }

    .single-header h1 {
        font-size: 1.8rem;
    }

    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--deep-charcoal);
        flex-direction: column;
        border-top: 1px solid var(--ash);
        padding: 1rem 0;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 0.75rem 1.5rem;
    }

    .product-box {
        flex-direction: column;
        text-align: center;
    }

    .recipe-box__header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .single-header h1 {
        font-size: 1.5rem;
    }

    .recipe-box {
        padding: 1.25rem;
    }
}

/* === HOMEPAGE === */
.home-hero {
    background: linear-gradient(135deg, var(--deep-charcoal) 0%, var(--smoke) 100%);
    padding: 3rem 0 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--ash);
}

.home-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.home-hero__logo img {
    max-width: 280px;
    height: auto;
}

.home-hero__tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

.home-section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--cream);
    padding-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ember);
}

.home-featured__card {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    background: var(--smoke);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ash);
}

.home-featured__image-link {
    display: block;
    overflow: hidden;
}

.home-featured__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.home-featured__image-link:hover .home-featured__image {
    transform: scale(1.03);
}

.home-featured__info {
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-featured__title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--cream);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.home-featured__title a {
    color: inherit;
    text-decoration: none;
}

.home-featured__title a:hover {
    color: var(--ember);
}

.home-featured__excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.home-featured__cta {
    display: inline-block;
    background: var(--ember);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
    align-self: flex-start;
}

.home-featured__cta:hover {
    background: var(--ember-dark);
    color: var(--white);
}

.home-latest {
    padding-bottom: 1rem;
}

.home-nav-links {
    padding: 1rem 0 3rem;
}

.home-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.home-nav-card {
    background: var(--smoke);
    border: 1px solid var(--ash);
    border-radius: 8px;
    padding: 1.75rem;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}

.home-nav-card:hover {
    transform: translateY(-3px);
    border-color: var(--ember);
}

.home-nav-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.home-nav-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .home-hero__logo img {
        max-width: 200px;
    }

    .home-featured__card {
        grid-template-columns: 1fr;
    }

    .home-featured__info {
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .home-featured__title {
        font-size: 1.4rem;
    }

    .home-nav-grid {
        grid-template-columns: 1fr;
    }
}

/* === PHOTO GALLERY === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 2rem 0 3rem;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 1/1;
}

.gallery-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-item__image {
    transform: scale(1.05);
}

.gallery-item__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.75rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--white);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .gallery-item__overlay {
        opacity: 1;
        padding: 1.5rem 0.5rem 0.5rem;
    }

    .gallery-item__title {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === VIDEO EMBED === */
.video-embed {
    margin: 2rem auto;
}

.video-embed__heading {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--cream);
    margin-bottom: 1rem;
}

.video-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--ash);
}

.video-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
