/**
 * Kahunam Blocks - Frontend Styles
 *
 * Minimal base styles for block defaults.
 * Most styling should be defined per-block.
 */

/* Base block wrapper */
[class*="wp-block-kahunam-"] {
    box-sizing: border-box;
}

[class*="wp-block-kahunam-"] *,
[class*="wp-block-kahunam-"] *::before,
[class*="wp-block-kahunam-"] *::after {
    box-sizing: inherit;
}

/* Alignment support */
.wp-block-kahunam.alignwide {
    max-width: var(--wp--style--global--wide-size, 1200px);
    margin-left: auto;
    margin-right: auto;
}

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

/* Common block patterns */
.kb-testimonial {
    padding: 1.5rem 2rem;
    border-left: 4px solid currentColor;
    margin: 1rem 0;
}

.kb-testimonial blockquote {
    font-size: 1.125rem;
    font-style: italic;
    margin: 0 0 1rem 0;
}

.kb-testimonial cite {
    font-style: normal;
    font-weight: 600;
}

.kb-cta {
    padding: 2rem;
    text-align: center;
    border-radius: 0.5rem;
}

.kb-cta h2 {
    margin: 0 0 0.5rem 0;
}

.kb-cta p {
    margin: 0 0 1.5rem 0;
}

.kb-cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: currentColor;
    color: #fff;
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 500;
}

.kb-cta-button:hover {
    opacity: 0.9;
}

/* Accordion */
.kb-accordion {
    border: 1px solid #ddd;
    border-radius: 0.25rem;
}

.kb-accordion-item {
    border-bottom: 1px solid #ddd;
}

.kb-accordion-item:last-child {
    border-bottom: none;
}

.kb-accordion-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.kb-accordion-item summary::-webkit-details-marker {
    display: none;
}

.kb-accordion-item summary::before {
    content: '+';
    display: inline-block;
    width: 1.5rem;
    font-weight: normal;
}

.kb-accordion-item[open] summary::before {
    content: '−';
}

.kb-accordion-content {
    padding: 0 1rem 1rem 2.5rem;
}

/* Team member */
.kb-team-member {
    text-align: center;
    padding: 1.5rem;
}

.kb-team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.kb-team-member h3 {
    margin: 0 0 0.25rem 0;
}

.kb-team-member-position {
    color: #666;
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

/* Posts grid */
.kb-posts-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .kb-posts-grid {
        grid-template-columns: repeat(min(var(--columns, 3), 2), 1fr);
    }
}

@media (max-width: 480px) {
    .kb-posts-grid {
        grid-template-columns: 1fr;
    }
}

.kb-post-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kb-post-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.kb-post-card h3 {
    padding: 0 1rem;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.kb-post-card h3 a {
    color: inherit;
    text-decoration: none;
}

.kb-post-card h3 a:hover {
    text-decoration: underline;
}

.kb-post-card p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: #666;
    font-size: 0.875rem;
}

/* Utility classes that blocks can use */
.kb-hidden {
    display: none !important;
}

.kb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
