/*
Theme Name: Applause
Theme URI: https://kekkon-tottori.com
Author: Antigravity
Description: A custom block theme for Applause based on existing design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
*/


/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.6;
}

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

/* Admin Bar Fix */
body.admin-bar .header {
    top: 32px;
}

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

/* Header CSS */

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: block;
    margin: 0;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.nav-list a:hover {
    color: var(--wp--preset--color--primary);
}

.btn-nav {
    border: 1px solid var(--wp--preset--color--primary);
    padding: 8px 20px;
    border-radius: 30px;
    color: var(--wp--preset--color--primary) !important;
    text-decoration: none;
    transition: 0.3s;
}

.btn-nav:hover {
    background: var(--wp--preset--color--primary);
    color: #fff !important;
}

.btn-login {
    background: #333;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.menu-toggle {
    display: none;
}

/* Footer CSS */
.footer {
    background: #333;
    color: #fff;
    padding: 80px 0 20px;
}

.footer-logo {
    font-family: var(--wp--preset--font-family--serif);
    margin-bottom: 40px;
    font-size: 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.map-item {
    margin-bottom: 20px;
}

.map-item h4 {
    color: var(--wp--preset--color--primary);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.office {
    margin-bottom: 30px;
}

.office h3 {
    border-left: 3px solid var(--wp--preset--color--primary);
    padding-left: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.office p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ccc;
}

.office p a {
    color: #ccc;
    text-decoration: none;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #888;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-inner {
        padding: 15px 20px;
    }

    .nav {
        display: none;
        /* Simplification: hiding nav on mobile for now unless JS is added */
    }

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

    .menu-toggle {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        background: none;
        border: none;
        z-index: 1001;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #333;
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }

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

    .menu-toggle span:nth-child(2) {
        top: 9px;
    }

    .menu-toggle span:nth-child(3) {
        top: 18px;
    }
}

/* Base Fixes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}


.main-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 120px;
    padding-bottom: 60px;

}

/* Ensure WordPress blocks respect the container width */
.wp-block-post-content {
    max-width: 100%;
}



/* Breadcrumbs */
.applause-breadcrumbs {
    font-size: 0.9rem;
    color: var(--wp--preset--color--text-light);
    margin-bottom: 20px;
    padding: 10px 0;
    font-family: var(--wp--preset--font-family--sans);
}

.applause-breadcrumbs a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    transition: 0.3s;
}

.applause-breadcrumbs a:hover {
    text-decoration: underline;
}

.applause-breadcrumbs .delimiter {
    margin: 0 8px;
    color: #ccc;
    font-size: 0.8em;
}

.applause-breadcrumbs .current {
    color: var(--wp--preset--color--text);
    font-weight: 500;
}

/* Single Post CTA */
.single-cta {
    background-color: var(--wp--preset--color--bg-alt);
    padding: 60px 20px;
    margin-top: 80px;
    margin-bottom: 60px;
    border-radius: 8px;
    text-align: center;
}

.single-cta h3 {
    margin-bottom: 20px;
    color: var(--wp--preset--color--primary);
}

.single-cta p {
    margin-bottom: 30px;
}

/* Related Posts */
.related-section {
    margin-bottom: 60px;
}

.related-section h3 {
    border-left: 5px solid var(--wp--preset--color--primary);
    padding-left: 15px;
    margin-bottom: 30px;
}

.related-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.related-item {
    transition: 0.3s;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.related-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    margin-bottom: 0;
}

.related-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
    flex-grow: 1;
}

.related-date {
    font-size: 0.8rem;
    color: var(--wp--preset--color--text-light);
    display: block;
    margin-top: auto;
}