/*
Theme Name: Fukui Coffee Theme
Theme URI: https://example.com/fukui-coffee-theme
Author: Antigravity
Description: Custom theme for Fukui Prefectural Coffee Shop Cooperative.
Version: 1.0
Text Domain: fukui-coffee
*/

:root {
    --color-coffee-dark: #3b2f2f;
    --color-coffee-medium: #6f4e37;
    --color-coffee-light: #c0a080;
    --color-coffee-cream: #f5f5dc;
    --color-text-main: #2c2c2c;
    --color-white: #ffffff;

    --font-mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "HGSMinchoE", "MS PMincho", "MS Mincho", serif;
}

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

body {
    font-family: var(--font-mincho);
    background-color: var(--color-coffee-cream);
    color: var(--color-text-main);
    line-height: 1.8;
}

a {
    color: var(--color-coffee-medium);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: var(--color-white);
    border-bottom: 4px solid var(--color-coffee-medium);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    line-height: 1;
}

.site-logo {
    max-width: 300px;
    /* Adjust based on actual logo size preference */
    height: auto;
    display: block;
}

.site-title a {
    display: inline-block;
}

/* Header Info */
.header-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-phone {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-coffee-medium);
    margin-bottom: 5px;
}

.btn-contact {
    display: inline-block;
    background-color: var(--color-coffee-dark);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Global Navigation */
.global-nav {
    background-color: var(--color-coffee-medium);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.global-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.global-nav li {
    margin: 0;
}

.global-nav li a {
    display: block;
    padding: 15px 25px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.global-nav li a:hover {
    background-color: var(--color-coffee-dark);
}

/* Responsive Nav */
/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1000;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-coffee-dark);
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.hamburger-menu span:nth-child(1) {
    top: 0;
}

.hamburger-menu span:nth-child(2) {
    top: 10px;
}

.hamburger-menu span:nth-child(3) {
    top: 20px;
}

/* Active State for Hamburger */
.hamburger-menu.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
    background-color: #fff;
    /* White on dark menu */
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
    background-color: #fff;
}

/* Responsive Styles */
@media (max-width: 768px) {

    /* Header Layout */
    .header-inner {
        padding: 10px 15px;
        /* Reduce padding */
        position: relative;
    }

    .site-title {
        font-size: 1.2rem;
        margin: 0;
    }

    .header-info {
        display: none;
        /* Hide info on super small screens or move into menu? */
        /* Let's keep it visible but smaller if possible, or hide phone number */
    }

    /* Redefine Header Info for Mobile */
    .header-info {
        display: block;
        margin-top: 10px;
        text-align: right;
    }

    .header-phone {
        font-size: 1rem;
        display: none;
        /* Hide phone on mobile header to save space, maybe add to menu later */
    }

    .btn-contact {
        padding: 5px 10px;
        font-size: 0.8em;
    }

    /* Show Hamburger */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 15px;
        top: 20px;
        /* Align with title */
    }

    /* Move contact button to left of hamburger or hide */
    .header-info {
        position: absolute;
        right: 60px;
        /* Space for hamburger */
        top: 15px;
    }

    /* Mobile Drawer Menu */
    .global-nav {
        position: fixed;
        top: 0;
        right: -300px;
        /* Hide off screen */
        width: 250px;
        height: 100vh;
        background-color: var(--color-coffee-dark);
        z-index: 999;
        transition: right 0.3s ease;
        padding-top: 60px;
        /* Space for close button */
        display: block;
        /* Override default flow */
    }

    .global-nav ul {
        flex-direction: column;
        text-align: left;
    }

    .global-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .global-nav li a {
        padding: 15px 20px;
        font-size: 1rem;
    }

    /* Open State */
    body.menu-open .global-nav {
        right: 0;
    }

    body.menu-open .mobile-menu-overlay {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
        /* Prevent scrolling */
    }
}

/* Hero Section */
.hero {
    background-color: var(--color-coffee-dark);
    color: var(--color-white);
    padding: 80px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Overlay for readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Section Common */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    color: var(--color-coffee-dark);
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-coffee-medium);
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Member Grid */
.member-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.member-card {
    background: var(--color-white);
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.member-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.member-card h3 {
    margin-bottom: 15px;
    color: var(--color-coffee-medium);
    font-size: 1.4rem;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 10px;
}

.btn-detail {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-coffee-medium);
    border: 1px solid var(--color-coffee-medium);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-detail:hover {
    background-color: var(--color-coffee-medium);
    color: var(--color-white);
}

/* News List */
.news-list {
    list-style: none;
    padding: 0;
}

.news-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.news-link {
    display: flex;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.news-link:hover {
    background-color: #fafafa;
}

.news-thumbnail {
    flex-shrink: 0;
    margin-right: 15px;
    width: 80px;
    height: 80px;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.news-meta-wrapper {
    display: flex;
    flex-direction: column;
}

@media (min-width: 600px) {
    .news-meta-wrapper {
        flex-direction: row;
        align-items: center;
    }

    .news-date {
        margin-right: 15px;
        min-width: 100px;
    }
}

.news-date {
    color: #666;
    font-size: 0.9em;
}

.news-title {
    font-weight: bold;
    color: var(--color-coffee-dark);
}

/* Footer */
.site-footer {
    background-color: var(--color-coffee-dark);
    color: var(--color-white);
    padding: 40px 0;
    text-align: center;
}


/* Fix for broken syntax from previous edit */
/* margin-bottom: 10px; */
/* Removing these stray lines */
/* } */

/* Sitemap Styles */
.sitemap-list li {
    margin-bottom: 10px;
    padding-left: 10px;
}

.sitemap-list li a:hover {
    color: var(--color-coffee-light);
    text-decoration: underline;
}

/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    /* Dark background */
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    /* White border effect backing */
    padding: 15px;
    /* Creates the white border width */
    border-radius: 4px;
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    /* Adjust for padding and close button */
    height: auto;
}

/* Close Button - positioned bottom right or top right as requested */
.lightbox-close {
    position: absolute;
    bottom: -40px;
    /* Below the white box */
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 0 5px #000;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-trigger {
    cursor: pointer;
    display: block;
    transition: opacity 0.2s;
}

.lightbox-trigger:hover {
    opacity: 0.8;
}

/* Contact Form Styles */
.wpcf7 {
    background-color: #f4f6f8;
    padding: 40px;
    border-radius: 8px;
    margin: 40px auto;
    max-width: 800px;
}

.wpcf7 form {
    margin: 0 auto;
}

.contact-form-message {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: var(--color-coffee-dark);
}

.contact-form-row {
    margin-bottom: 25px;
}

/* Force labels to be on their own line */
.contact-form-row label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    font-size: 1rem;
    width: 100%;
}

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.wpcf7-text,
.wpcf7-email,
.wpcf7-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    /* Crucial for width: 100% */
}

.wpcf7-textarea {
    height: 200px;
}

.wpcf7-submit {
    display: block;
    width: 200px;
    margin: 40px auto 0;
    padding: 15px 0;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wpcf7-submit:hover {
    background-color: var(--color-coffee-dark);
    opacity: 1;
}
/* Representative Greeting Section */
.greeting-box {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: space-between;
}

.greeting-text {
    flex: 1; /* Approx 70% */
    text-align: justify;
    line-height: 2;
}

.greeting-image {
    flex: 0 0 30%; /* Fixed 30% width */
    text-align: center;
}

.greeting-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.greeting-name {
    margin-top: 30px;
    font-weight: bold;
    text-align: right;
    font-size: 1.1em;
}

/* Mobile Responsive for Greeting */
@media (max-width: 768px) {
    .greeting-box {
        flex-direction: column;
    }

    .greeting-text {
        width: 100%;
        order: 2;
    }

    .greeting-image {
        width: 100%;
        order: 1;
        margin-bottom: 30px;
    }
    
    .greeting-image img {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}
