/* ==== T-RISE Theme — supplementary styles ==== */
/* theme.json handles layout, colors, typography. Only */
/* things that can't be expressed in theme.json go here. */

/* Sticky footer — push footer to bottom on short pages */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
body.admin-bar {
    min-height: calc(100vh - 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar {
        min-height: calc(100vh - 46px);
    }
}
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 100vh;
}
.site-footer {
    margin-top: auto;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--wp--preset--color--trise-dark-blue);
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Align helper */
.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

.alignwide {
    margin-left: calc(25% - 25vw);
    margin-right: calc(25% - 25vw);
    max-width: 100vw;
    width: 100vw;
}

/* Sticky & bypostauthor */
.sticky,
.bypostauthor {
    display: block;
}

/* ===== Contact Form ===== */

/* CF7 form fields */
.wpcf7-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 6px;
}

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

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1.125rem;
    color: #333;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #7cc357;
    box-shadow: 0 0 0 3px rgba(124, 195, 87, 0.15);
    background: #ffffff;
}

.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Submit button */
.wpcf7-form input[type="submit"] {
    display: block;
    width: 100%;
    padding: 16px 36px;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #7cc357, #629644);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(124, 195, 87, 0.3);
}

.wpcf7-form input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 195, 87, 0.4);
}

.wpcf7-form input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(124, 195, 87, 0.3);
}

/* CF7 response messages */
.wpcf7-response-output {
    margin-top: 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
}

.wpcf7 form.sent .wpcf7-response-output {
    background: #e8f5e9;
    border-color: #7cc357;
    color: #2e7d32;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    background: #fbe9e7;
    border-color: #e57373;
    color: #c62828;
}

/* Remove default CF7 fieldset styling */
.wpcf7-form fieldset.hidden-fields-container {
    border: none;
    padding: 0;
    margin: 0;
}

/* Hide CF7 default label line-break */
.wpcf7-form label br {
    display: none;
}

/* Reset paragraph margins in form */
.wpcf7-form p {
    margin: 0;
}



/* Equal-height cards in post grid */
.wp-block-post-template.is-layout-grid .wp-block-post {
    display: flex;
}
.wp-block-post-template.is-layout-grid .wp-block-post .wp-block-group.has-background {
    width: 100%;
}

/* ===== Details / Accordion block style ===== */

/* Accordion wrapper — only structural, no hardcoded colors */
.wp-block-details.is-style-accordion {
    border: 1px solid;
    border-color: inherit; /* inherits from text color or falls back */
    border-radius: 6px;
    overflow: hidden;
}

.wp-block-details.is-style-accordion[open] {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Summary — clickable header bar, inherits bg/text from block settings */
.wp-block-details.is-style-accordion summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: filter 0.2s;
}

/* Darken slightly on hover using the inherited background */
.wp-block-details.is-style-accordion summary:hover {
    filter: brightness(0.9);
}

/* Remove default marker in all browsers — brute force */
.wp-block-details.is-style-accordion summary::-webkit-details-marker {
    display: none !important;
}
.wp-block-details.is-style-accordion summary::marker {
    content: none !important;
    font-size: 0 !important;
}

/* Chevron icon — uses currentColor from block text color */
.wp-block-details.is-style-accordion summary::before {
    display: none;
}

/* Focus state for accessibility */
.wp-block-details.is-style-accordion summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

/* Content area — visible when open */
.wp-block-details.is-style-accordion > :not(summary) {
    padding: 1.25rem;
    line-height: 1.6;
}

/* Remove extra margin on first/last children inside content */
.wp-block-details.is-style-accordion > :not(summary):first-child {
    margin-top: 0;
}
.wp-block-details.is-style-accordion > :not(summary):last-child {
    margin-bottom: 0;
}

/* Smooth open/close */
@media (prefers-reduced-motion: no-preference) {
    .wp-block-details.is-style-accordion[open] > :not(summary) {
        animation: accordion-fade-in 0.2s ease-out;
    }
}

@keyframes accordion-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Archives date filter dropdown */
.wp-block-archives-dropdown {
    max-width: 300px;
}
.wp-block-archives-dropdown label {
    display: none;
}
.wp-block-archives-dropdown select {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--wp--preset--color--trise-dark-blue);
    background: var(--wp--preset--color--base);
    border: 1px solid var(--wp--preset--color--trise-teal-pale);
    border-radius: 6px;
    cursor: pointer;
    appearance: auto;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wp-block-archives-dropdown select:hover,
.wp-block-archives-dropdown select:focus {
    border-color: var(--wp--preset--color--trise-teal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 162, 126, 0.12);
}

/* Partners page spacing */
.page-id-22 .entry-content .wp-block-group.wp-block-group-is-layout-constrained {
    margin-block-start: 2rem !important;
}
.page-id-22 .entry-content .wp-block-group.wp-block-group-is-layout-constrained:first-of-type {
    margin-block-start: 0 !important;
}


