/**
 * Theme Name:      Simple Article AC
 * Author:          Goodlayers
 * Template:        simplearticle
 * Text Domain:     simple-article-ac
 * Description:     Simple Article for Autism Calgary
 */

/* Menu and Navigation Styles */
#ac-site .gdlr-main-menu > li > a, .contact-link a {
    padding-right: 20px;
    padding-left: 0px;
    font-size: 17px;
    text-transform: uppercase;
    margin: 0px;
    letter-spacing: 1px;
    font-weight: 700;
}

.contact-link {
    position: fixed; /* Must also be fixed if it needs to stay near the search button */
    top: 30px;
    right: 40px;
}

#top-search-button {
    top: 4px; /* Adjusted +2px to vertically center with the text baseline */
    right: 190px; 
    display: block !important;
    cursor: pointer;
    font-size: 18px;
        position: fixed !important;
    z-index: 99999 !important;
}

.icon-search:before {
    content: "\f002";
    font-family: 'FontAwesome';
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    z-index: 999999 !important;
}

.contact-link a {
    color: #111111;
}

.contact-link a:hover {
    color: #f05d21;
}

#ac-site .content-wrapper {
padding: 0px 30px 30px 30px;
}

#ac-site .gdlr-page-title-wrapper {
    padding: 20px 0px 0px;
}

#ac-site .gdlr-navigation-wrapper .gdlr-main-menu > li > a:before {
    content: "|";
    font-size: 20px;
    line-height: 1;
    margin: 0 20px 0 0;
    color: black;
}

#ac-site .gdlr-navigation-wrapper li.noclick > a {
    cursor: default !important; 
    pointer-events: none;      
    text-decoration: none; 
}

/*
#ac-site .gdlr-navigation-wrapper li.current_page_item a {
    color: #833d00;
}*/

#ac-site .gdlr-navigation-gimmick {
    display: none;
}

/* Page Titles */
.tax-information .gdlr-page-title {
    display: none;
}

.tax-information .gdlr-page-title#page-title-override {
    display: block;
}

#ac-site.tax-information .elementor-column {
    margin-top: 30px;
}

/* Layout and Containers */
#ac-site .gdlr-logo-container {
    position: relative; 
}
/*
.contact-link {
    position: absolute;
    top: 20px;
    right: 20px;
}*/

/* Resource Grid/Columns */
.resources-column-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    align-items: stretch;
}

.resources-column-wrapper h3 {
    text-align: center;
}

.resources-column-wrapper > .elementor-column {
    width: 25%;
    padding: 0 10px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.child-term-link-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none; 
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
    transition: box-shadow 0.3s;
    background-color: #fff;
    color: inherit;
}

.child-term-link-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.child-term-thumbnail {
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: 15px;
}

.child-term-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

.child-term-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.child-term-description {
    flex-grow: 1;
    margin-bottom: 15px;
}

.read-more-link {
    margin-top: auto;
    font-weight: bold;
    display: block;
}

/* Responsive Grid */
@media (max-width: 767px) {
    
#ac-site .information-value {
    overflow-wrap: break-word;  /* The modern standard */
    word-break: break-all;      /* The "brute force" fallback */
    white-space: normal;        /* Ensures no 'nowrap' rules are interfering */
}

p { font-size: 16px; }
 
h3.staff-subcat-heading {
    font-size: 25px;
}   
    
#ac-site .gdlr-page-title-wrapper .gdlr-page-title {
font-size: 36px !important;
}
    .resources-column-wrapper > .elementor-column {
        width: 50%;
    }
}
@media (max-width: 480px) {
    .resources-column-wrapper > .elementor-column {
        width: 100%;
    }
}

/* UI Elements */
.accordion-title span {
    font-size: 21px;
}

#ac-site .search-text input {
    padding-top: 15px;
    padding-bottom: 15px;
}

#footer-widget-3 {
    width: 100%;
    text-align: center;
}

#ac-site.single-autism_resource .blog-date-wrapper, 
#ac-site.single-autism_resource .gdlr-blog-info {
    display: none;
}

#ac-site #footer-widget-1 {
    font-size: 120%;
}

#ac-site #footer-widget-3 {
    font-size: 85%;
}

/* Visibility for Resource Processing */
body.tax-resources .gdlr-content, 
body.single-resource .gdlr-content {
    display: none;
}

.record_link {
    margin-top: 5px !important; 
    display: block;
}

.resource_search_field[name="keywords"] {
    background-color: #ffffff !important;
    color: #111111 !important;
    opacity: 1 !important;
    border: 1px solid #cccccc !important;
}

.information_page { font-size: 17px; }
.information_page h3, h4 { font-size: 22px; }

/* Information-Style Information Pages */
/* 1. Global Container Reset for Information Pages */
/* Container Reset */
#ac-site.information-resource-page .elementor-element,
#ac-site.information-resource-page .e-con,
#ac-site.information-resource-page .e-con-inner {
    --margin-left: 0 !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: left !important;
}

/* 1. Title: No Indent */
#ac-site.information-resource-page .information-main-heading {
    margin-left: 0 ;
    margin-top: 2.5em ;
    margin-bottom: 10px ;
    font-size: 20px;
    font-weight: 700;
    display: block;
}

/* 2. Description: Single Indent (30px) */
#ac-site.information-resource-page .information-description {
    margin-left: 30px ;
    margin-bottom: 20px ;
    display: block;
    line-height: 1.6;
}

/* 3. Metadata Wrapper: Vertical gap below description */
#ac-site.information-resource-page .has-label-structure {
    margin-top: 25px ;
    margin-bottom: 40px ;
    display: block;
}

/* 4. Metadata Lines: Double Indent (60px) */
#ac-site.information-resource-page .contact-line {
    padding-left: 60px ;
    display: block;
    margin-bottom: 8px ;
    line-height: 1.4;
}

@media only screen and (max-width: 767px) {


.contact-link {
    right: 0px;
    top: 10px;
    z-index: 999999;
}

#top-search-button {
    right: 150px; 
    top: -15px;
}


#ac-site.information-resource-page .contact-line {
    padding-left: 30px ;
}


#ac-site.information-resource-page .information-label {
    min-width: 0 !important;
}


}

@media only screen and (max-width: 767px) {
#ac-site.information-resource-page .information-description {
    margin-left: 15px;
}

#ac-site .accordion-content {
    margin-left: 15px;
}

}

#ac-site.information-resource-page .information-label {
    font-weight: bold ;
    display: inline-block;
    min-width: 70px;
    margin-right: 8px;
}

#ac-site.information-resource-page .information-value {
    font-weight: normal ;
}
/* End resource-style information */

.archive .taxonomy-description {
    margin-top: 50px;
}

.taxonomy-extra-content {
    text-align: center;
}

#ac-site .gdlr-page-title-wrapper .gdlr-page-title {
text-transform: none;
font-size: 44px;
}

#ac-site h2.entry-title {
    font-size: 35px;
}

.search-highlight {
    font-weight: bold;
    color: #f05d21;
}

.resource-search-link {
    margin-bottom: 40px;
}

#ac-site.page-id-20746 .gdlr-page-title {
    display: none;
}


.search-result-count {
    font-weight: bold;
}

#ac-site .individual_resource_value {
    color: black;
}

#ac-site .resource_desc, #ac-site .resource_desc p {
    color: black;
}

/* 1. Default layout: Left-aligned for 4 or more items */
#ac-site .resources-column-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Ensure rows start from the left */
}

#ac-site .resources-column-wrapper .child-term-card {
    margin-bottom: 20px;
}

/* 2. The "Quantity Selector" logic:
   If there are 1, 2, or 3 items TOTAL, center them. 
   This works by checking if the first item is also among the last 3 items. */

/* If 1st child is also the last-child (Total: 1) */
#ac-site .child-term-card:first-child:nth-last-child(1),
/* If 1st child is 2nd from last (Total: 2) */
#ac-site .child-term-card:first-child:nth-last-child(2),
/* If 1st child is 3rd from last (Total: 3) */
#ac-site .child-term-card:first-child:nth-last-child(3) {
    margin-left: auto;
}

/* If the last child is within the first 3 (completes the centering) */
#ac-site .child-term-card:first-child:nth-last-child(-n+3) ~ .child-term-card:last-child {
    margin-right: auto;
}

/* If there is exactly ONE item, we need both margins auto */
#ac-site .child-term-card:first-child:nth-last-child(1) {
    margin-right: auto;
}

/* Alternative modern method */
html {
  scroll-padding-top: 120px; /* Adjust this to match your header height */
}
#asn {
    color: #d13939;
}

i.fcb-icons {
    margin-right: 20px;
}
/* 1. Stop the main container from rotating */
i.fcb-icons:hover {
    transform: none !important;
}

/* 2. Apply the rotation only to the span (the icon/image) */
i.fcb-icons span {
    transition: transform .3s ease;
}

i.fcb-icons:hover span {
    transform: translate(-50%, -50%) rotate(90deg) !important;
}

/* 3. Re-position your text (now it stays put naturally) */
i.fcb-icons::before {
    content: "Ask Us A Question";
    position: absolute;
    top: -40px; /* Adjust height here */
    left: 50%;
    transform: translateX(-50%);
    color: red;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
    /* No rotation or transition needed here anymore! */
}

/* 4. Ensure container doesn't hide text */
i.fcb-icons { 
    overflow: visible !important;
}

#ac-site .wpcf7-text { padding: 7px; }

.accordion-content .information-main-heading
{ margin-top: 0px; }

#ac-site .wpcf7-response-output{
    padding-top: 0; margin-top: 0;
}

#ac-site .wpcf7-spinner {
    display: none;
}


#ac-site .fcb-modal-content { padding-bottom: 55px; }
#ac-site .elementor-widget h3:first-child
{
    margin-top: 0px;
}

#ac-site h3.staff-subcat-heading
{
    margin-top: 50px;
}

#ac-site .information-main-heading:first-child {
    margin-top: 18px;
}

#ac-site .search_resource_banner {
    /* Horizontal Centering */
    display: block;
    margin-left: auto;
    margin-right: auto;

    /* Height Constraint */
    max-height: 35vh; /* Occupies a maximum of 25% of the screen height */
    
    /* Responsiveness */
    width: auto;      /* Maintains aspect ratio */
    max-width: 100%;  /* Prevents horizontal overflow */
    object-fit: contain; 
}

#ac-site.page-id-20755 .e-n-accordion-item-title-text {
  height: 50px;
  align-items: center;    /* This does the vertical centering */
  display: flex;
}

#ac-site .donate_img {
    height: 100%;     /* Scales to the parent's full height */
    width: auto;      /* Prevents stretching/distortion */
    max-width: 100%;  /* Ensures it doesn't spill out horizontally */
    object-fit: contain; /* Keeps the entire logo visible within the box */
    margin-right: 20px; 
}    

#ac-site .forminator-label { font-size: 15px !important; }
#ac-site .big_header .forminator-label { font-size: 20px !important; }
#ac-site .forminator-row .forminator-label { color: black !important;
font-size: 18px !important;
}
span[data-limit="7"], #text-2 .forminator-description {
    display: none;
}

#ac-site #html-1 label {
    display: none;
}

#ac-site #html-1 {
    font-size: 20px;
}

#ac-site.page-id-15 .elementor-widget-accordion {
    margin-bottom: 30px;
}

/* Styling the container */
.elementor-widget-accordion .elementor-accordion-item {
    border: 1px solid #d4d4d4;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

/* Styling the clickable title bar */
.elementor-widget-accordion .elementor-tab-title {
    background-color: #f9f9f9;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.elementor-widget-accordion .elementor-tab-title:hover {
    background-color: #f1f1f1;
}

/* Styling the active/open state */
.elementor-widget-accordion .elementor-tab-title.elementor-active {
    border-bottom: 1px solid #d4d4d4;
    color: #000;
}

/* Styling the content area where the form rows live */
.elementor-widget-accordion .elementor-tab-content {
    padding: 20px;
    background-color: #fff;
}

/* Adding an indicator (the + and - icon) */
.elementor-tab-title::after {
    content: '+';
    font-size: 1.2rem;
}

.elementor-tab-title.elementor-active::after {
    content: '−';
}

@media only screen and (max-width: 419px) {
  body#ac-site .container {
    max-width: 390px;
  }
}

@media only screen and (max-width: 767px) {
  body#ac-site .container {
    max-width: 740px;
    padding-left: 0px;
    padding-right: 0px;
  }
  /* 1. Center the row and tighten the gap */
    .elementor-element-f5ecf13.e-con {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important; /* Slightly smaller gap for smaller icons */
    }

    /* 2. Lower the container width */
    .elementor-element-f5ecf13 .elementor-widget-image {
        width: 15% !important; /* Reduced from 25% */
        flex-basis: auto !important; 
    }

    /* 3. Lower the hard limit */
    .elementor-element-f5ecf13 img {
        width: 100% !important;
        height: auto !important;
        max-width: 40px !important; /* Reduced from 60px */
    }

}

#ac-site .taxonomy-description {
    line-height: 1.9;
}

#ac-site .back-to-parent-link.l2 {
    margin-bottom: 40px;
}

.hide-on-scroll {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease; /* Smooth fade out */
}

.page-id-20755 .e-n-accordion-item-title-text {
  display: grid;
  /* Forces a 100px wide column for images, 1fr for text */
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 20px;
  /* Prevents rows from collapsing or overlapping */
  min-height: 80px; 
  overflow: hidden;
}

.page-id-20755 .e-n-accordion-item-title-text img {
  /* This is the crucial part to stop the overlap */
  width: 100%;
  max-width: 80px;
  max-height: 60px;
  /* Keeps the logo proportional within the 80x60 box */
  object-fit: contain;
  /* Keeps the image centered in its 100px column */
  justify-self: center;
}

@media only screen and (max-width: 767px) {
.page-id-20755 .e-n-accordion-item-title-text {
    font-size: 16px;
    line-height: 1.4;
}
}

@media only screen and (max-width: 767px) {
#ac-site .gdlr-item.gdlr-main-content.gdlr-with-background {
  padding-left: 5px;
  padding-right: 5px;
}

#ac-site .content-wrapper {
    padding-left: 5px;
    padding-right: 5px;
}

#ac-site .sub-resource-group {
    padding-bottom: 0 !important;
}

#ac-site .gdlr-header-wrapper { z-index: 99999; }

#ac-site { font-size: 18px; }
}

/* Apply basic icon properties to both old classes */
.icon-plus, .icon-minus {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900; 
}

#ac-site .gdlr-accordion-item.style-1 .accordion-title i {
  background: none;
}

.icon-plus, .icon-minus {
    vertical-align: middle;
    line-height: 1; /* Prevents the icon from adding extra height to the box */
    margin-bottom: 2px; /* Small nudge if it still looks a tiny bit low */
}

/* Unicode for Plus icon */
.icon-plus::before {
    content: "\f067";
}
.accordion-tab:hover .accordion-title,
.accordion-tab:hover .accordion-title span,
.accordion-tab:hover .icon-plus::before,
.accordion-tab:hover .icon-minus::before {
    color: #f05d21;
    transition: color 0.2s ease; /* Keeps the transition smooth */
}

/* Ensure the title has a pointer cursor so it feels clickable */
.accordion-title {
    cursor: pointer;
}

/* Unicode for Minus icon */
.icon-minus::before {
    content: "\f068";
}

.sub-category-title {
    font-size: 21px;
    font-weight: bold;
}

#ac-site.tax-information .gdlr-item.gdlr-main-content.gdlr-with-background {
    padding-top: 0;
}

#ac-site .child-term-title {
    font-size: 25px;
}

.elementor-heading-title {
    line-height: 1.4em;
}

#ac-site.information-resource-page  .elementor-element.elementor-element-7e872fc .e-con-inner {
    align-items: center !important;
    max-width: 100%;
}