/*
Theme Name: ChkM Izakaya
Theme URI: https://chuoizakaya.com
Author: ChkM Izakaya Team
Author URI: https://chuoizakaya.com
Description: A modern, dark-themed WordPress theme for ChkM Izakaya, a contemporary Japanese tavern in Northwest Arkansas. Features custom blocks for hero sections, staff profiles, cocktail grids, and business information.
Version: 1.2
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chuo-izakaya
Tags: restaurant, dark, modern, custom-blocks, full-width-template, block-styles, wide-blocks
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 CSS Custom Properties
2.0 Typography
3.0 Base Styles
4.0 Layout
5.0 Navigation
6.0 Custom Utility Classes
7.0 Block Editor Styles
8.0 Responsive
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 CSS Custom Properties
--------------------------------------------------------------*/
:root {
    --color-copper: #CE8544;
    --color-deep-black: #0A0A0A;
    --color-rich-black: #1A1A1A;
    --color-charcoal: #2A2A2A;
    --color-cream: #F5F1E8;
    --color-light-gray: #E5E5E5;
    --color-sage-green: #8B9A7A;

    --font-heading: 'publico-text', 'Crimson Text', Georgia, serif;
    --font-body: 'Noto Sans', sans-serif;

    --spacing-small: 1rem;
    --spacing-medium: 2rem;
    --spacing-large: 4rem;

    --transition-default: all 0.3s ease;
}

/*--------------------------------------------------------------
2.0 Typography
--------------------------------------------------------------*/
body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-cream);
    background-color: var(--color-deep-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-copper);
    line-height: 1.2;
    margin-top: 0;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.56; /* 28px / 18px = 1.556 */
}

a {
    color: var(--color-copper);
    text-decoration: none;
    transition: var(--transition-default);
}

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

/*--------------------------------------------------------------
3.0 Base Styles
--------------------------------------------------------------*/
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

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

button, input, select, textarea {
    font-family: var(--font-body);
}

/*--------------------------------------------------------------
4.0 Layout
--------------------------------------------------------------*/
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    /* No padding-top needed since first block is full-height hero */
}

article {
    position: relative;
}

.entry-content {
    position: relative;
}

/* Allow full-width blocks to break out */
.entry-content > .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100%;
    width: 100%;
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.container-wide {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/*--------------------------------------------------------------
5.0 Navigation
--------------------------------------------------------------*/
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

/* WordPress Admin Bar Fix - Prevent overlap with fixed header */
.admin-bar .site-header {
    top: 32px;
}

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

.site-navigation {
    position: relative;
    width: 100%;
}

.nav-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.site-title a {
    color: var(--color-copper);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
}

.site-title a:hover {
    color: var(--color-copper);
}

.site-title-main {
    color: var(--color-copper);
}

.site-title-japanese {
    color: var(--color-cream);
    font-size: 1.5rem;
    margin-left: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.site-title-subtitle {
    color: var(--color-cream);
    font-size: 1.125rem;
    margin-left: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.main-navigation {
    display: none;
}

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

.main-navigation a {
    color: var(--color-cream);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-size: 18px;
    font-weight: 400 !important;
    transition: var(--transition-default);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--color-copper);
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--color-cream);
    cursor: pointer;
    padding: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.mobile-menu-toggle:hover {
    color: var(--color-copper);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.mobile-navigation {
    display: none;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

.mobile-navigation.active {
    display: block;
}

.mobile-navigation ul {
    list-style: none;
    margin: 0;
    padding: 1rem;
}

.mobile-navigation li {
    padding: 0.5rem 1rem;
}

.mobile-navigation a {
    color: var(--color-cream);
    display: block;
}

.mobile-navigation a:hover,
.mobile-navigation .current-menu-item a {
    color: var(--color-copper);
}

@media (min-width: 768px) {
    .main-navigation {
        display: block;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .site-title-subtitle {
        display: inline;
    }
}

@media (max-width: 767px) {
    .site-title-subtitle {
        display: none;
    }
}

/*--------------------------------------------------------------
6.0 Custom Utility Classes
--------------------------------------------------------------*/
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.bg-blur {
    backdrop-filter: blur(12px);
}

.copper-glow {
    box-shadow: 0 0 20px rgba(206, 133, 68, 0.3);
}

.image-overlay {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.8) 100%);
}

.wabi-sabi-texture {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.02"/></svg>');
}

.bg-deep-black { background-color: var(--color-deep-black); }
.bg-rich-black { background-color: var(--color-rich-black); }
.bg-charcoal { background-color: var(--color-charcoal); }
.bg-cream { background-color: var(--color-cream); }
.bg-copper { background-color: var(--color-copper); }

.text-copper { color: var(--color-copper); }
.text-cream { color: var(--color-cream); }
.text-sage { color: var(--color-sage-green); }

.border-copper { border-color: var(--color-copper); }
.border-charcoal { border-color: var(--color-charcoal); }

/*--------------------------------------------------------------
7.0 Block Editor Styles
--------------------------------------------------------------*/
.wp-block {
    max-width: 1280px;
}

/* Constrain wp-block-group to match static site max-w-7xl (1280px) */
.wp-block-group.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure all wp-block-group content areas match static site width */
.wp-block-group > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* But allow columns to be full width within their parent */
.wp-block-group .wp-block-columns {
    max-width: 1280px;
}

.wp-block-columns .wp-block-column {
    max-width: none;
}

.alignwide {
    max-width: 1440px;
}

.alignfull {
    max-width: none;
}

.has-copper-color { color: var(--color-copper); }
.has-copper-background-color { background-color: var(--color-copper); }
.has-deep-black-color { color: var(--color-deep-black); }
.has-deep-black-background-color { background-color: var(--color-deep-black); }
.has-cream-color { color: var(--color-cream); }
.has-cream-background-color { background-color: var(--color-cream); }

/*--------------------------------------------------------------
8.0 Responsive
--------------------------------------------------------------*/
@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    body {
        font-size: 16px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

/* Mobile-specific fixes for full-width blocks and hero images */
@media (max-width: 767px) {
    /* Remove padding from main content areas on mobile to prevent overflow */
    main, main article, .entry-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Simplify full-width block handling on mobile - use 100% instead of 100vw */
    .entry-content > .alignfull {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .wp-block-cover.alignfull {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Ensure hero images stay within viewport on mobile */
    .wp-block-cover__image-background {
        max-width: 100% !important;
        width: 100% !important;
    }

    .chuo-hero-section {
        max-width: 100% !important;
        width: 100% !important;
    }

    .chuo-hero-section__background {
        max-width: 100% !important;
        width: 100% !important;
    }

    .chuo-hero-section__image {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Restore padding for inner content only */
    .entry-content > *:not(.alignfull):not(.wp-block-cover):not(.chuo-hero-section) {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Ensure constrained block groups have padding */
    .wp-block-group:not(.alignfull) {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Site header should not exceed viewport */
    .site-header {
        max-width: 100% !important;
        width: 100% !important;
        left: 0;
        right: 0;
    }

    .nav-container {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/*--------------------------------------------------------------
9.0 WordPress Core Blocks
--------------------------------------------------------------*/

/* Cover Block */
.wp-block-cover {
    position: relative;
    min-height: 100vh !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-block-cover.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100%;
    width: 100%;
}

.wp-block-cover__image-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
}

.wp-block-cover__background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 0 !important;
    opacity: 0 !important;
}

.wp-block-cover__inner-container {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Image Block */
.wp-block-image img {
    border-radius: 0.5rem;
}

/* Cocktail images specific sizing */
.wp-block-columns .wp-block-image img[style*="height:300px"] {
    height: 300px !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Button Block */
.wp-block-button__link {
    background-color: var(--color-copper);
    color: var(--color-deep-black);
    padding: 0.75rem 2rem;
    border-radius: 0.25rem;
    font-weight: 600;
    transition: var(--transition-default);
}

.wp-block-button__link:hover {
    background-color: var(--color-cream);
    color: var(--color-deep-black);
}

/* Group Block */
.wp-block-group {
    position: relative;
}

/* Columns Block */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.wp-block-column {
    flex: 1;
    min-width: 0;
}

/*--------------------------------------------------------------
10.0 Footer
--------------------------------------------------------------*/
.site-footer {
    background-color: var(--color-deep-black);
    border-top: 1px solid var(--color-charcoal);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-copyright {
    text-align: center;
    color: rgba(245, 241, 232, 0.6);
    margin-top: 3rem;
    padding-top: 2rem;
    font-size: 0.875rem;
}

/* Add border-top to footer content sections - EXCLUDE homepage (page-id-15) */
body:not(.page-id-15) .wp-block-group.has-deep-black-background-color:last-of-type {
    border-top: 1px solid var(--color-charcoal) !important;
    padding-top: 2rem;
}

/* More specific footer border - EXCLUDE homepage */
body:not(.page-id-15) main .wp-block-group:last-child {
    border-top: 1px solid var(--color-charcoal) !important;
}

body:not(.page-id-15) .entry-content > .wp-block-group:last-child {
    border-top: 1px solid var(--color-charcoal) !important;
}

/*--------------------------------------------------------------
11.0 Visual Fidelity Fixes
--------------------------------------------------------------*/
/* Fix main content max-width to match static site */
main, main article, .entry-content {
    max-width: 1280px !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Fix navigation font-weight */
.main-navigation a {
    font-weight: 400 !important;
}

/* Fix footer section border - more specific selector */
main article > .wp-block-group:last-of-type {
    border-top: 1px solid var(--color-charcoal) !important;
    padding-top: 2rem !important;
}

/* Fix footer paragraph styles to match static site - ultra specific */
main article > .wp-block-group.has-deep-black-background-color:last-of-type p,
main article .wp-block-group:last-child p {
    font-size: 18px !important;
    line-height: 28px !important;
    margin-bottom: 4px !important;
    margin-top: 0 !important;
}

/* Copyright text styling - ultra specific */
main article > .wp-block-group.has-deep-black-background-color:last-of-type p:last-child,
main article .wp-block-group:last-child p:last-child {
    font-size: 14px !important;
    line-height: 21.84px !important;
    margin-top: 48px !important;
    margin-bottom: 0 !important;
}

/* Adjust padding-top for footer section */
main article > .wp-block-group:last-of-type {
    padding-top: 32px !important;
}

/* Cocktail card styling to match static site - ONLY cocktail cards, NOT footer */
.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column {
    background-color: var(--color-charcoal) !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
    transition: transform 0.3s ease !important;
}

.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column:hover,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column:hover,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column:hover {
    transform: scale(1.05) !important;
}

/* Cocktail card images - ONLY cocktail cards, NOT footer */
.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column img,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column img,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column img {
    border: 2px solid rgba(206, 133, 68, 0.3) !important;
    width: 100% !important;
}

/* Cocktail card text content needs padding - ONLY cocktail cards, NOT footer */
.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column h3,
.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column p,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column h3,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column p,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column h3,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column p {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column h3,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column h3,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column h3 {
    padding-top: 1.5rem !important;
}

.page-id-18 .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column p:last-child,
.page.craft-cocktails .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column p:last-child,
body[class*="craft-cocktail"] .wp-block-group:not(:last-child) .wp-block-columns .wp-block-column p:last-child {
    padding-bottom: 1.5rem !important;
}
