/**
 * Hampstead Academy Theme - Block Styles
 * Frontend styles for Gutenberg blocks
 */

/* Core Block Overrides */
.wp-block-group {
    margin-bottom: 2rem;
}

/* Front Page Specific - Remove gap between header and first content block */
.home .wp-block-group:first-of-type,
.front-page .wp-block-group:first-of-type {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Target the first block after header template part */
.home .wp-block-template-part[data-type="core/template-part"] + *,
.front-page .wp-block-template-part[data-type="core/template-part"] + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove spacing from first child of post content */
.home .wp-block-post-content > .wp-block-group:first-child,
.front-page .wp-block-post-content > .wp-block-group:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure slideshow blocks don't add top spacing on front page */
.home .wp-block-hampstead-academy-slideshow:first-child,
.front-page .wp-block-hampstead-academy-slideshow:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wp-block-columns {
    margin-bottom: 2rem;
}

.wp-block-column {
    padding: 0 1rem;
}

/* Button Block Styles */
.wp-block-button .wp-block-button__link {
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wp-block-button.is-style-primary .wp-block-button__link {
    background-color: var(--wp--preset--color--primary);
    color: white;
}

.wp-block-button.is-style-secondary .wp-block-button__link {
    background-color: var(--wp--preset--color--secondary);
    color: white;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--primary);
    color: white;
}

/* Heading Block Styles */
.wp-block-heading {
    margin-bottom: 1rem;
}

.wp-block-heading.has-text-align-center {
    text-align: center;
}

/* Image Block Styles */
.wp-block-image {
    margin-bottom: 2rem;
}

.wp-block-image.is-style-rounded img {
    border-radius: 10px;
}

.wp-block-image.is-style-circle img {
    border-radius: 50%;
}

/* Cover Block Styles */
.wp-block-cover {
    margin-bottom: 2rem;
    min-height: 400px;
}

.wp-block-cover .wp-block-cover__inner-container {
    padding: 2rem;
}

/* Quote Block Styles */
.wp-block-quote {
    border-left: 4px solid var(--wp--preset--color--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.wp-block-quote cite {
    font-style: normal;
    font-weight: 600;
    color: var(--wp--preset--color--secondary);
}

/* List Block Styles */
.wp-block-list {
    padding-left: 1.5rem;
}

.wp-block-list li {
    margin-bottom: 0.5rem;
}

/* Table Block Styles */
.wp-block-table {
    margin-bottom: 2rem;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

.wp-block-table th {
    background-color: var(--wp--preset--color--light-gray);
    font-weight: 600;
}

/* Media & Text Block Styles */
.wp-block-media-text {
    margin-bottom: 2rem;
}

.wp-block-media-text .wp-block-media-text__content {
    padding: 2rem;
}

/* Gallery Block Styles */
.wp-block-gallery {
    margin-bottom: 2rem;
}

.wp-block-gallery .blocks-gallery-item {
    margin-bottom: 1rem;
}

/* Separator Block Styles */
.wp-block-separator {
    margin: 3rem auto;
    border: none;
    border-top: 2px solid var(--wp--preset--color--light-gray);
    width: 100px;
}

.wp-block-separator.is-style-wide {
    width: 100%;
}

/* Spacer Block Styles */
.wp-block-spacer {
    clear: both;
}

/* Slideshow Block Styles */
.wp-block-hampstead-academy-slideshow {
    margin: 0;
    padding: 0;
}



/* Custom Block Styles for School Theme */
.school-announcement {
    background-color: var(--wp--preset--color--light-blue);
    border-left: 4px solid var(--wp--preset--color--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

.school-event {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.school-staff-card {
    text-align: center;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.school-staff-card img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Facebook Posts Block Styles */
.ha-facebook-posts {
    margin: 2rem 0;
    font-family: var(--wp--preset--font-family--lexend, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ha-facebook-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
}

.ha-facebook-posts-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ha-facebook-posts-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.ha-facebook-icon {
    font-size: 1.5rem;
}

/* Facebook Logo SVG */
.ha-facebook-icon::before {
    content: "";
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ha-facebook-follow-link {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.ha-facebook-follow-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.ha-facebook-posts-container {
    padding: 1.5rem;
}

/* Grid Layout */
.ha-facebook-posts--grid .ha-facebook-posts-container {
    display: grid;
    gap: 1.5rem;
}

.ha-facebook-posts--grid.ha-facebook-posts--columns-1 .ha-facebook-posts-container {
    grid-template-columns: 1fr;
}

.ha-facebook-posts--grid.ha-facebook-posts--columns-2 .ha-facebook-posts-container {
    grid-template-columns: repeat(2, 1fr);
}

.ha-facebook-posts--grid.ha-facebook-posts--columns-3 .ha-facebook-posts-container {
    grid-template-columns: repeat(3, 1fr);
}

.ha-facebook-posts--grid.ha-facebook-posts--columns-4 .ha-facebook-posts-container {
    grid-template-columns: repeat(4, 1fr);
}

/* List Layout */
.ha-facebook-posts--list .ha-facebook-posts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Carousel Layout */
.ha-facebook-posts--carousel .ha-facebook-posts-container {
    position: relative;
    overflow: hidden;
}

.ha-facebook-carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.ha-facebook-carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    width: 100%;
    align-items: stretch;
}

.ha-facebook-posts--carousel .ha-facebook-post {
    flex: 0 0 auto;
    padding: 0 0.75rem;
    box-sizing: border-box;
    /* Width will be set by JavaScript based on responsive columns */
}

.ha-facebook-carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2;
}

.ha-facebook-carousel-prev,
.ha-facebook-carousel-next {
    background: rgba(24, 119, 242, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
}

.ha-facebook-carousel-prev:hover,
.ha-facebook-carousel-next:hover {
    background: rgba(24, 119, 242, 1);
    transform: scale(1.1);
}

.ha-facebook-carousel-prev.disabled,
.ha-facebook-carousel-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ha-facebook-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ha-facebook-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ha-facebook-carousel-dot.active,
.ha-facebook-carousel-dot:hover {
    background: #1877f2;
}

/* Individual Post Styles */
.ha-facebook-post {
    background: white;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: auto;
}

.ha-facebook-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ha-facebook-post-image {
    position: relative;
    overflow: hidden;
}

.ha-facebook-post-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ha-facebook-post:hover .ha-facebook-post-image img {
    transform: scale(1.05);
}

.ha-facebook-post-content {
    padding: 1.25rem;
}

.ha-facebook-post-meta {
    margin-bottom: 0.75rem;
}

.ha-facebook-post-date {
    color: #65676b;
    font-size: 0.875rem;
    font-weight: 500;
}

.ha-facebook-post-message {
    color: #1c1e21;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.ha-facebook-post-message p {
    margin: 0 0 0.75rem 0;
}

.ha-facebook-post-message p:last-child {
    margin-bottom: 0;
}

.ha-facebook-post-engagement {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e4e6ea;
    border-bottom: 1px solid #e4e6ea;
}

.ha-facebook-likes,
.ha-facebook-comments,
.ha-facebook-shares {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #65676b;
    font-size: 0.875rem;
    font-weight: 500;
}

.ha-facebook-engagement-icon {
    font-size: 1rem;
}

.ha-facebook-post-actions {
    text-align: center;
}

.ha-facebook-post-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1877f2;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.ha-facebook-post-link:hover {
    background: #f0f2f5;
    color: #166fe5;
}

.ha-facebook-external-icon {
    font-size: 0.75rem;
    opacity: 0.7;
}

.ha-facebook-posts-footer {
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e4e6ea;
    text-align: center;
}

.ha-facebook-posts-cache-info {
    color: #65676b;
    font-size: 0.75rem;
}

/* Error State */
.ha-facebook-posts-error {
    margin: 2rem 0;
    text-align: center;
}

.ha-facebook-posts-placeholder {
    padding: 3rem 2rem;
    background: #f8f9fa;
    border: 2px dashed #e4e6ea;
    border-radius: 12px;
}

.ha-facebook-posts-placeholder .ha-facebook-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.ha-facebook-posts-placeholder h3 {
    color: #65676b;
    margin-bottom: 0.5rem;
}

.ha-facebook-posts-placeholder p {
    color: #8a8d91;
    font-size: 0.875rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Newsletter Subscription Block Styles */
.ha-newsletter-row-wrapper {
    margin: 2rem 0;
    padding: 0;
}

.ha-newsletter-row-wrapper[style*="background-color"] {
    padding: 2rem 0;
    margin: 0;
}

.ha-newsletter-row-wrapper--full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.ha-newsletter-row-wrapper--full-width[style*="background-color"] {
    padding: 2rem calc(50vw - 50%);
}

.ha-newsletter-subscription {
    font-family: var(--wp--preset--font-family--lexend, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e4e6ea;
    margin: 0 auto;
    max-width: 1200px;
}

.ha-newsletter-content {
    padding: 2rem;
}

.ha-newsletter-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.3;
}

.ha-newsletter-description {
    margin: 0 0 2rem 0;
    color: #65676b;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Styles */
.ha-newsletter-form {
    max-width: 100%;
}

.ha-newsletter-fields {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Layout Variations */
.ha-newsletter-subscription--stacked .ha-newsletter-fields {
    grid-template-columns: 1fr;
}

.ha-newsletter-subscription--inline .ha-newsletter-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.ha-newsletter-subscription--inline .ha-newsletter-field {
    flex: 1;
    min-width: 150px;
}

.ha-newsletter-subscription--inline .ha-newsletter-field--email {
    flex: 2;
    min-width: 200px;
}

.ha-newsletter-subscription--inline .ha-newsletter-actions {
    margin-bottom: 0;
    margin-left: 1rem;
}

.ha-newsletter-subscription--inline .ha-newsletter-submit {
    margin-top: 0;
    height: fit-content;
    align-self: end;
}

/* Field Styles */
.ha-newsletter-field {
    display: flex;
    flex-direction: column;
}

.ha-newsletter-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1c1e21;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ha-required {
    color: #e74c3c;
    font-weight: 700;
}

.ha-newsletter-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e4e6ea;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1c1e21;
}

.ha-newsletter-input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.ha-newsletter-input::placeholder {
    color: #8a8d91;
}

.ha-newsletter-input:invalid {
    border-color: #e74c3c;
}

.ha-newsletter-input:invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Interests Field */
.ha-newsletter-field--interests {
    margin-top: 0.5rem;
}

.ha-newsletter-interests {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.ha-newsletter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.ha-newsletter-checkbox:hover {
    background: #f0f2f5;
}

.ha-newsletter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1877f2;
    cursor: pointer;
}

.ha-checkbox-label {
    font-size: 0.875rem;
    color: #1c1e21;
    cursor: pointer;
    user-select: none;
}

/* Actions */
.ha-newsletter-actions {
    text-align: center;
    margin-bottom: 1.5rem;
}

.ha-newsletter-submit {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    position: relative;
}

.ha-newsletter-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Button Styles */
.ha-button--primary.ha-newsletter-submit {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
}

.ha-button--primary.ha-newsletter-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #166fe5 0%, #1976d2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.ha-button--secondary.ha-newsletter-submit {
    background: #42a5f5;
    color: white;
}

.ha-button--secondary.ha-newsletter-submit:hover:not(:disabled) {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.3);
}

/* Custom Button Color Overrides - CSS Custom Properties Support */
.ha-newsletter-subscription .ha-newsletter-submit.ha-button[style*="--ha-button-bg"] {
    background: var(--ha-button-bg) !important;
    background-image: none !important;
    border-color: var(--ha-button-border, var(--ha-button-bg)) !important;
    color: white !important;
}

/* Override theme's default button hover styles completely */
.ha-newsletter-subscription .ha-newsletter-submit.ha-button:hover:not(:disabled),
.ha-newsletter-subscription .ha-newsletter-submit.ha-button:focus:not(:disabled) {
    background-image: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
    color: white !important;
}

/* Support for CSS custom properties hover colors */
.ha-newsletter-subscription .ha-newsletter-submit.ha-button[style*="--ha-button-hover-bg"]:hover:not(:disabled),
.ha-newsletter-subscription .ha-newsletter-submit.ha-button[style*="--ha-button-hover-bg"]:focus:not(:disabled) {
    background: var(--ha-button-hover-bg) !important;
    background-image: none !important;
    border-color: var(--ha-button-hover-border, var(--ha-button-hover-bg)) !important;
}

/* Messages */
.ha-newsletter-messages {
    margin-top: 1rem;
}

.ha-newsletter-success,
.ha-newsletter-error {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ha-newsletter-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ha-newsletter-success p {
    margin: 0;
    font-weight: 500;
}

.ha-newsletter-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ha-newsletter-error p {
    margin: 0;
    font-weight: 500;
}

/* Not Configured State */
.ha-newsletter-not-configured {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border: 2px dashed #e4e6ea;
    border-radius: 8px;
    color: #65676b;
}

.ha-newsletter-not-configured p {
    margin: 0 0 1rem 0;
}

.ha-newsletter-not-configured a {
    color: #1877f2;
    text-decoration: none;
    font-weight: 600;
}

.ha-newsletter-not-configured a:hover {
    text-decoration: underline;
}

/* Alignment Variations */
.ha-newsletter-subscription--left .ha-newsletter-content {
    text-align: left;
}

.ha-newsletter-subscription--center .ha-newsletter-content {
    text-align: center;
}

.ha-newsletter-subscription--right .ha-newsletter-content {
    text-align: right;
}

.ha-newsletter-subscription--center .ha-newsletter-fields,
.ha-newsletter-subscription--right .ha-newsletter-fields {
    text-align: left; /* Keep form fields left-aligned for usability */
}

/* Padding Variations */
.ha-newsletter-subscription--padding-small .ha-newsletter-content {
    padding: 1rem;
}

.ha-newsletter-subscription--padding-medium .ha-newsletter-content {
    padding: 2rem;
}

.ha-newsletter-subscription--padding-large .ha-newsletter-content {
    padding: 3rem;
}

/* Full Width Option */
.ha-newsletter-subscription--full-width {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.ha-newsletter-subscription--full-width .ha-newsletter-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Custom Background and Text Colors */
.ha-newsletter-subscription[style*="background-color"] {
    border: none;
}

.ha-newsletter-content[style*="color"] .ha-newsletter-title,
.ha-newsletter-content[style*="color"] .ha-newsletter-description,
.ha-newsletter-content[style*="color"] .ha-newsletter-label,
.ha-newsletter-content[style*="color"] .ha-checkbox-label {
    color: inherit !important;
}

/* Ensure text color inheritance works properly */
.ha-newsletter-content[style*="color"] {
    color: inherit;
}

.ha-newsletter-content[style*="color"] * {
    color: inherit !important;
}

/* Exception for button text - keep white for readability */
.ha-newsletter-content[style*="color"] .ha-newsletter-submit {
    color: white !important;
}

/* Custom Border Radius Support */
.ha-newsletter-subscription[style*="border-radius"] {
    overflow: hidden;
}

/* Loading State */
.ha-newsletter-submit.loading {
    position: relative;
    color: transparent;
}

.ha-newsletter-submit.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        padding: 0 5px !important;
        margin-bottom: 1rem;
        flex-basis: 100% !important;
    }
    
    /* Exception: Keep footer columns in 3-column layout on mobile - override inline styles */
    .footer-main .wp-block-columns {
        flex-direction: column !important;
    }
    
    .footer-main .wp-block-column[style*="flex-basis"] {
        flex-basis: 100% !important;
        padding: 0 1rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Desktop footer layout - ensure proper column layout based on data-columns attribute */
@media (min-width: 769px) {
    /* Footer main container - set max-width and center */
    .footer-main .wp-block-group.alignwide {
        max-width: 1200px !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Force footer columns container to be flex row on desktop - prevent wrapping */
    .footer-main .wp-block-columns,
    .footer-main .wp-block-columns.footer-columns {
        flex-direction: row !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 20px !important; /* 10px padding between each column = 20px gap */
    }
    
    /* Override any WordPress core column styles for footer */
    .footer-main .wp-block-column,
    .footer-main .footer-column {
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
        min-width: 0 !important; /* Allow flex items to shrink */
        padding: 0 !important; /* Remove default padding since we're using gap */
    }
    
    /* 3-column layout (default) - equal width columns with gap handled by container */
    .footer-main .wp-block-columns .footer-column[data-columns="3"],
    .footer-main .wp-block-columns .wp-block-column[data-columns="3"] {
        flex: 1 1 calc(33.333% - 13.333px) !important;
        flex-basis: calc(33.333% - 13.333px) !important;
        width: calc(33.333% - 13.333px) !important;
        max-width: calc(33.333% - 13.333px) !important;
        margin-bottom: 0 !important;
    }
    
    /* Center the content in the second column (Quick Links) while keeping text left-aligned */
    .footer-main .wp-block-columns .footer-column[data-columns="3"]:nth-child(2),
    .footer-main .wp-block-columns .wp-block-column[data-columns="3"]:nth-child(2) {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    .footer-main .wp-block-columns .footer-column[data-columns="3"]:nth-child(2) h4,
    .footer-main .wp-block-columns .wp-block-column[data-columns="3"]:nth-child(2) h4 {
        text-align: left !important;
        margin: 0 0 1rem 0 !important;
        width: auto !important;
    }
    
    .footer-main .wp-block-columns .footer-column[data-columns="3"]:nth-child(2) ul,
    .footer-main .wp-block-columns .wp-block-column[data-columns="3"]:nth-child(2) ul {
        text-align: left !important;
        list-style: none !important;
        padding-left: 0 !important;
        margin: 0 !important;
        width: auto !important;
    }
    
    .footer-main .wp-block-columns .footer-column[data-columns="3"]:nth-child(2) ul li,
    .footer-main .wp-block-columns .wp-block-column[data-columns="3"]:nth-child(2) ul li {
        text-align: left !important;
    }
    
    /* 2-column layout */
    .footer-main .wp-block-columns .footer-column[data-columns="2"],
    .footer-main .wp-block-columns .wp-block-column[data-columns="2"] {
        flex: 1 1 calc(50% - 10px) !important;
        flex-basis: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        margin-bottom: 0 !important;
    }
    
    /* 4-column layout */
    .footer-main .wp-block-columns .footer-column[data-columns="4"],
    .footer-main .wp-block-columns .wp-block-column[data-columns="4"] {
        flex: 1 1 calc(25% - 15px) !important;
        flex-basis: calc(25% - 15px) !important;
        width: calc(25% - 15px) !important;
        max-width: calc(25% - 15px) !important;
        margin-bottom: 0 !important;
    }
    
    /* 1-column layout */
    .footer-main .wp-block-columns .footer-column[data-columns="1"],
    .footer-main .wp-block-columns .wp-block-column[data-columns="1"] {
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    /* Override any inline styles that WordPress might add */
    .footer-main .wp-block-column[style*="flex-basis"] {
        flex-basis: inherit !important;
    }
    
    .footer-main .footer-column[data-columns="3"][style*="flex-basis"],
    .footer-main .wp-block-column[data-columns="3"][style*="flex-basis"] {
        flex: 1 1 calc(33.333% - 13.333px) !important;
        flex-basis: calc(33.333% - 13.333px) !important;
        width: calc(33.333% - 13.333px) !important;
        max-width: calc(33.333% - 13.333px) !important;
    }
    
    .footer-main .footer-column[data-columns="2"][style*="flex-basis"],
    .footer-main .wp-block-column[data-columns="2"][style*="flex-basis"] {
        flex: 1 1 calc(50% - 10px) !important;
        flex-basis: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
    
    .footer-main .footer-column[data-columns="4"][style*="flex-basis"],
    .footer-main .wp-block-column[data-columns="4"][style*="flex-basis"] {
        flex: 1 1 calc(25% - 15px) !important;
        flex-basis: calc(25% - 15px) !important;
        width: calc(25% - 15px) !important;
        max-width: calc(25% - 15px) !important;
    }
    
    .footer-main .footer-column[data-columns="1"][style*="flex-basis"],
    .footer-main .wp-block-column[data-columns="1"][style*="flex-basis"] {
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Override any gap settings from the template */
    .footer-main .wp-block-columns[style*="gap"] {
        gap: 20px !important;
    }
}

/* Continue mobile responsive styles */
@media (max-width: 768px) {
    /* Specific fix for alignwide columns that have overflow issues */
    .wp-block-columns.alignwide {
        margin-left: 5px;
        margin-right: 5px;
        max-width: calc(100vw - 10px);
    }
    
    .wp-block-media-text .wp-block-media-text__content {
        padding: 1rem;
    }
    
    .wp-block-cover {
        min-height: 300px;
    }
    
    .wp-block-cover .wp-block-cover__inner-container {
        padding: 1rem;
    }
    
    /* Facebook Posts Responsive */
    .ha-facebook-posts--grid.ha-facebook-posts--columns-2 .ha-facebook-posts-container,
    .ha-facebook-posts--grid.ha-facebook-posts--columns-3 .ha-facebook-posts-container,
    .ha-facebook-posts--grid.ha-facebook-posts--columns-4 .ha-facebook-posts-container {
        grid-template-columns: 1fr;
    }
    
    .ha-facebook-posts-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .ha-facebook-posts-container {
        padding: 1rem;
    }
    
    .ha-facebook-post-content {
        padding: 1rem;
    }
    
    /* Comprehensive text indentation fixes for mobile */
    .ha-facebook-post-message,
    .ha-facebook-posts .ha-facebook-post-message,
    .ha-facebook-posts--carousel .ha-facebook-post-message {
        text-indent: 0 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }
    
    .ha-facebook-post-message p,
    .ha-facebook-posts .ha-facebook-post-message p,
    .ha-facebook-posts--carousel .ha-facebook-post-message p {
        text-indent: 0 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }
    
    .ha-facebook-post-message p:first-child,
    .ha-facebook-posts .ha-facebook-post-message p:first-child,
    .ha-facebook-posts--carousel .ha-facebook-post-message p:first-child {
        text-indent: 0 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }
    
    /* Target the specific div element directly */
    div.ha-facebook-post-message {
        text-indent: 0 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }
    
    /* Mobile Carousel - Enhanced for single-post auto-scroll experience */
    .ha-facebook-carousel-controls {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
        justify-content: space-between;
        pointer-events: none;
        z-index: 2;
        padding: 0 10px;
    }
    
    .ha-facebook-carousel-prev,
    .ha-facebook-carousel-next {
        width: 44px;
        height: 44px;
        font-size: 20px;
        pointer-events: auto;
        background: rgba(24, 119, 242, 0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        border-radius: 50%;
        border: none;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .ha-facebook-carousel-prev:hover,
    .ha-facebook-carousel-next:hover {
        background: rgba(24, 119, 242, 1);
        transform: scale(1.1);
    }
    
    /* Mobile carousel - Force single post display with proper containment */
    .ha-facebook-posts--carousel .ha-facebook-carousel-track {
        display: flex;
        transition: transform 0.4s ease-in-out;
        width: 100%;
        align-items: stretch;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post {
        flex: 0 0 100%; /* Each post takes full width on mobile */
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 0 0.75rem;
        box-sizing: border-box;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    /* Ensure post content is properly contained and formatted on mobile */
    .ha-facebook-posts--carousel .ha-facebook-post-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-width: 0; /* Important for flex items to shrink properly */
        overflow: hidden;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-message {
        flex: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0; /* Important for flex items to shrink properly */
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto;
        line-height: 1.5;
        margin-bottom: 1rem;
        font-size: 0.9rem; /* Slightly smaller on mobile */
        white-space: pre-wrap !important; /* Force text wrapping */
        overflow: hidden;
        text-indent: 0 !important; /* Remove any text indentation */
        padding-left: 0 !important; /* Remove any left padding */
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-message p {
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        margin: 0 0 0.5rem 0;
        line-height: 1.5;
        white-space: pre-wrap !important;
        overflow: hidden;
        text-indent: 0 !important; /* Remove any text indentation */
        padding-left: 0 !important; /* Remove any left padding */
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-link {
        width: 100%;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        white-space: normal; /* Allow wrapping instead of ellipsis */
        display: block;
        text-align: center;
        font-size: 0.85rem;
    }
    
    /* Ensure all text elements wrap properly on mobile */
    .ha-facebook-posts--carousel .ha-facebook-post-date {
        font-size: 0.8rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    /* Mobile carousel image optimization */
    .ha-facebook-posts--carousel .ha-facebook-post-image {
        width: 100%;
        overflow: hidden;
        border-radius: 8px 8px 0 0;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-image img {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
        display: block;
    }
    
    /* Enhanced mobile carousel dots with better visibility */
    .ha-facebook-carousel-dots {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding: 1rem 0.5rem;
        background: rgba(248, 249, 250, 0.8);
        border-radius: 20px;
        backdrop-filter: blur(10px);
    }
    
    .ha-facebook-carousel-dot {
        width: 12px;
        height: 12px;
        min-width: 12px;
        min-height: 12px;
        border-radius: 50%;
        background: #e0e0e0;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        touch-action: manipulation;
        position: relative;
    }
    
    .ha-facebook-carousel-dot.active {
        background: #1877f2;
        transform: scale(1.3);
        box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.3);
    }
    
    .ha-facebook-carousel-dot:hover {
        background: #1877f2;
        transform: scale(1.2);
    }
    
    /* Auto-scroll progress indicator for active dot */
    .ha-facebook-carousel-dot.active::after {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border: 2px solid #1877f2;
        border-radius: 50%;
        border-top-color: transparent;
        animation: ha-carousel-progress 5s linear infinite;
    }
    
    @keyframes ha-carousel-progress {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
    
    /* Newsletter Subscription Responsive */
    .ha-newsletter-subscription {
        margin: 1.5rem 0;
        border-radius: 8px;
    }
    
    .ha-newsletter-content {
        padding: 1.5rem;
    }
    
    .ha-newsletter-title {
        font-size: 1.25rem;
    }
    
    .ha-newsletter-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .ha-newsletter-fields {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .ha-newsletter-subscription--inline .ha-newsletter-fields {
        grid-template-columns: 1fr;
    }
    
    .ha-newsletter-interests {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .ha-newsletter-submit {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .ha-facebook-posts {
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .ha-facebook-posts-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ha-facebook-posts-title h3 {
        font-size: 1.1rem;
    }
    
    .ha-facebook-post-image img {
        height: auto;
    }
    
    .ha-facebook-post-engagement {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .ha-facebook-posts-placeholder {
        padding: 2rem 1rem;
    }
    
    .ha-facebook-posts-container {
        padding: 0.75rem;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post {
        max-width: calc(100vw - 2rem); /* Ensure it fits on small screens */
        width: 100%; /* Full width for single post display */
        min-width: 100%;
        padding: 0 0.5rem;
        flex: 0 0 100%; /* Force each post to take full width */
    }
    
    /* Mobile-specific image and text sizing */
    .ha-facebook-post-image {
        max-width: 100%;
        overflow: hidden;
    }
    
    .ha-facebook-post-image img {
        width: 100%;
        height: auto;
        max-width: calc(100vw - 4rem); /* Fit screen width with padding */
        object-fit: cover; /* Maintain aspect ratio with cropping */
    }
    
    /* Reduce text sizes for mobile */
    .ha-facebook-posts-title h3 {
        font-size: 1rem;
    }
    
    .ha-facebook-post-content {
        padding: 0.75rem;
    }
    
    .ha-facebook-post-date {
        font-size: 0.75rem;
    }
    
    .ha-facebook-post-message {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .ha-facebook-post-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .ha-facebook-post-content {
        padding: 1rem;
    }
    
    /* Ensure carousel controls are properly sized for small screens */
    .ha-facebook-carousel-controls {
        padding: 0 5px;
    }
    
    .ha-facebook-carousel-prev,
    .ha-facebook-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Make dots slightly smaller on very small screens */
    .ha-facebook-carousel-dot {
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
    }
    
    .ha-facebook-carousel-dot.active,
    .ha-facebook-carousel-dot:hover {
        transform: scale(1.3);
    }
    
    /* Improve spacing for mobile */
    .ha-facebook-carousel-dots {
        margin-top: 1rem;
        gap: 0.5rem;
    }
    
    /* Newsletter Subscription Mobile */
    .ha-newsletter-subscription {
        margin: 1rem 0;
        border-radius: 6px;
    }
    
    .ha-newsletter-content {
        padding: 1rem;
    }
    
    .ha-newsletter-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .ha-newsletter-description {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .ha-newsletter-fields {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .ha-newsletter-interests {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .ha-newsletter-submit {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .ha-newsletter-input {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }
    
    .ha-newsletter-label {
        font-size: 0.8rem;
    }
    
    .ha-checkbox-label {
        font-size: 0.8rem;
    }
}

/* Desktop and Tablet Carousel Styles - Ensure desktop functionality remains intact */
@media (min-width: 769px) {
    /* Reset mobile-specific styles for desktop */
    .ha-facebook-posts--carousel .ha-facebook-post {
        flex: 0 0 auto; /* Reset mobile flex settings */
        padding: 0 0.75rem; /* Standard desktop padding */
        box-sizing: border-box;
        /* Width will be set by JavaScript based on responsive columns */
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-content {
        padding: 1.25rem; /* Standard desktop padding */
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-message {
        font-size: 0.95rem; /* Standard desktop font size */
        line-height: 1.6;
        margin-bottom: 1rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-link {
        font-size: 0.875rem; /* Standard desktop font size */
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        max-width: 100%;
    }
    
    .ha-facebook-posts--carousel .ha-facebook-post-date {
        font-size: 0.875rem; /* Standard desktop font size */
    }
    
    /* Desktop carousel controls */
    .ha-facebook-carousel-controls {
        padding: 0;
    }
    
    .ha-facebook-carousel-prev,
    .ha-facebook-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Desktop carousel dots */
    .ha-facebook-carousel-dots {
        background: none;
        backdrop-filter: none;
        padding: 0;
        margin-top: 1rem;
        gap: 0.5rem;
    }
    
    .ha-facebook-carousel-dot {
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
    }
    
    .ha-facebook-carousel-dot.active {
        transform: scale(1.2);
        box-shadow: none;
    }
    
    .ha-facebook-carousel-dot:hover {
        transform: scale(1.1);
    }
    
    /* Remove mobile progress indicator on desktop */
    .ha-facebook-carousel-dot.active::after {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ha-facebook-posts--carousel .ha-facebook-post {
        /* Width set by JavaScript for 2 columns on tablet */
    }
}

@media (min-width: 1025px) {
    .ha-facebook-posts--carousel .ha-facebook-post {
        /* Width set by JavaScript for 3+ columns on desktop */
    }
}

/* Staff Block Styles */
.ha-staff-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ha-staff-title {
    color: #07074E;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.ha-staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Force single column on mobile and tablet */
@media (max-width: 768px) {
    .ha-staff-grid {
        grid-template-columns: 1fr !important;
    }
}

.ha-staff-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(7, 7, 78, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.ha-staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(7, 7, 78, 0.15);
    border-color: #3984AD;
}

.ha-staff-top {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.ha-staff-image {
    width: 160px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #50A684;
    flex-shrink: 0;
}

.ha-staff-info {
    flex: 1;
}

.ha-staff-name {
    color: #07074E;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ha-staff-title {
    color: #3984AD;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.ha-staff-bio-preview {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.ha-learn-more-btn {
    background: #3984AD;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.ha-learn-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 132, 173, 0.3);
}

/* Modal Styles */
.ha-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: ha-fadeIn 0.3s ease;
}

.ha-modal-content {
    position: relative;
    background: white;
    max-width: 700px;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10001;
    animation: ha-slideIn 0.3s ease;
}

.ha-modal-header {
    background: #3984AD;
    color: white;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ha-modal-image {
    width: 100px;
    height: 125px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid white;
}

.ha-modal-basic-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.ha-modal-basic-info p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.ha-modal-body {
    padding: 2rem;
}

.ha-modal-section {
    margin-bottom: 2rem;
}

.ha-modal-section h3 {
    color: #07074E;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #50A684;
    padding-bottom: 0.5rem;
}

.ha-modal-bio {
    line-height: 1.7;
    color: #444;
    font-size: 1rem;
}

.ha-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10003;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.ha-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ha-close-btn:focus {
    outline: 2px solid #3984AD;
    outline-offset: 2px;
}

.ha-close-btn span {
    display: block;
    line-height: 1;
    font-size: inherit;
}

.ha-contact-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.ha-contact-info h4 {
    color: #07074E;
    margin: 0 0 1rem 0;
}

.ha-contact-info p {
    margin: 0.5rem 0;
    color: #666;
}

/* Animations */
@keyframes ha-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ha-slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Staff Block Mobile Responsive */
@media (max-width: 768px) {
    .ha-staff-container {
        padding: 30px 15px;
        max-width: 100%;
        margin: 0;
    }

    .ha-staff-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        margin: 0;
    }

    .ha-staff-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    .ha-staff-card {
        padding: 1.5rem;
        text-align: left;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
        max-width: 500px;
    }

    .ha-staff-top {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
    }
    
    .ha-staff-image {
        width: 120px;
        height: 150px;
        flex-shrink: 0;
    }

    .ha-staff-name {
        font-size: 1.2rem;
    }

    .ha-staff-title {
        font-size: 1rem;
    }

    .ha-staff-bio-preview {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .ha-learn-more-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        margin-top: 1rem;
    }

    /* Modal Mobile Styling */
    .ha-modal-content {
        margin: 5% 10px;
        max-height: 90vh;
        max-width: calc(100vw - 20px);
    }

    .ha-modal-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 1.5rem;
        gap: 1rem;
    }

    .ha-modal-image {
        width: 80px;
        height: 100px;
        flex-shrink: 0;
    }

    .ha-modal-basic-info h2 {
        font-size: 1.4rem;
        margin-bottom: 0.25rem;
    }

    .ha-modal-basic-info p {
        font-size: 0.95rem;
    }

    .ha-modal-body {
        padding: 1.5rem;
    }

    .ha-modal-section h3 {
        font-size: 1.1rem;
    }

    .ha-modal-bio {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .ha-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.6rem;
        top: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .ha-staff-container {
        padding: 20px 10px;
    }

    .ha-staff-grid {
        gap: 1.5rem;
    }

    .ha-staff-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .ha-staff-card {
        padding: 1.25rem;
        max-width: none;
    }

    .ha-staff-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .ha-staff-image {
        width: 140px;
        height: 175px;
        margin: 0 auto;
    }

    .ha-staff-info {
        text-align: center;
        width: 100%;
    }

    .ha-staff-name {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .ha-staff-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .ha-staff-bio-preview {
        font-size: 0.9rem;
        line-height: 1.5;
        text-align: left;
        margin-bottom: 1rem;
    }

    .ha-learn-more-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        width: auto;
        min-width: 140px;
    }

    /* Modal Mobile Styling for Small Screens */
    .ha-modal-content {
        margin: 2% 5px;
        max-height: 96vh;
        max-width: calc(100vw - 10px);
    }

    .ha-modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }

    .ha-modal-image {
        width: 100px;
        height: 125px;
    }

    .ha-modal-basic-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .ha-modal-basic-info p {
        font-size: 1rem;
    }

    .ha-modal-body {
        padding: 1.25rem;
    }

    .ha-modal-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .ha-modal-bio {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .ha-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
        top: 1rem;
        right: 1rem;
    }
}
