/* ==========================================================================
   Footer Section Styles
   Mental Care Group Theme - Footer Component
   ========================================================================== */

/* Main Footer Container */
.footer {
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    border-top-right-radius: clamp(6rem, 20vw, 17rem);
    background-color: var(--color-green-400, var(--primary-blue));
}

.footer__main {
    padding-top: 5rem;
    padding-bottom: 15rem;
}

@media (min-width: 1024px) {
    .footer__main {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }
}

.footer__container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Grid System */
.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    grid-auto-rows: auto;
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* Main Title */
.footer__title {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    .footer__title {
        margin-bottom: 3rem;
        font-size: 3.25rem;
    }
}

@media (min-width: 1024px) {
    .footer__title {
        margin-bottom: 4rem;
        font-size: 4rem;
    }
}

/* Content Grid */
.footer__content-grid {
    margin-bottom: 0;
}

/* Contact Section */
.footer__contact {
    position: relative;
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .footer__contact {
        grid-column: span 3;
        margin-bottom: 0;
    }
}

.footer__icon-bg {
    position: absolute;
    width: 48px;
    height: 48px;
    aspect-ratio: 1;
    fill: rgba(122, 189, 183, 0.1);
}

.footer__icon-bg--contact {
    left: -10%;
    top: -20%;
    height: 140%;
    width: auto;
}

@media (min-width: 1024px) {
    .footer__icon-bg--contact {
        left: 0;
        height: auto;
        width: 100%;
    }
}

.footer__contact-content {
    position: relative;
}

.footer__section-title {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1024px) {
    .footer__section-title {
        font-size: 1.625rem;
    }
}

.footer__address {
    font-size: 1.125rem;
    font-weight: 300;
    font-style: normal;
    color: var(--white);
    line-height: 1.5;
}

.footer__address p {
    color: var(--white);
    margin: 0 0 0.25rem;
}

.footer__address p:last-child {
    margin-bottom: 0;
}

.footer__address strong {
    color: var(--white);
    font-weight: 600;
}

.footer__address a {
    color: var(--white);
    text-decoration: none;
}

.footer__address a:hover {
    text-decoration: underline;
}

.footer__company-info {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--white);
    line-height: 1.5;
}

.footer__company-info p {
    color: var(--white);
    margin: 0 0 0.25rem;
}

.footer__company-info p:last-child {
    margin-bottom: 0;
}

.footer__company-info strong {
    color: var(--white);
    font-weight: 600;
}

.footer__company-info a {
    color: var(--white);
    text-decoration: none;
}

.footer__company-info a:hover {
    text-decoration: underline;
}

.footer__company-item {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.footer__company-name {
    font-weight: 600;
}

/* Navigation Accordions */
.footer__nav-accordions {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 1.5rem;
    padding-left: 0;
    padding-right: 0;
    border-top: 1px solid rgba(135, 165, 188, 0.2);
    border-bottom: 1px solid rgba(135, 165, 188, 0.2);
}

@media (min-width: 1024px) {
    .footer__nav-accordions {
        grid-column: span 6;
        margin-bottom: 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        border-top: none;
        border-bottom: none;
    }
}

.footer__accordion {
    border-bottom: 1px solid rgba(135, 165, 188, 0.2);
}

@media (min-width: 1024px) {
    .footer__accordion {
        border-bottom: none;
    }
}

.footer__accordion-button {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0.75rem;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 1.5rem 0;
    outline: none;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.footer__accordion-button:focus-visible {
    z-index: 10;
    outline: 2px dashed var(--white);
    outline-offset: 2px;
}

@media (min-width: 1024px) {
    .footer__accordion-button {
        padding-top: 0;
        pointer-events: none;
        cursor: default;
    }
}

.footer__accordion-title-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.footer__accordion-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s;
}

@media (min-width: 1024px) {
    .footer__accordion-icon {
        display: none;
    }
}

.footer__accordion-button[aria-expanded="true"] .footer__accordion-icon {
    transform: rotate(-180deg);
}

.footer__icon-arrow {
    height: 1.5rem;
    width: 1.5rem;
    fill: var(--white);
}

.footer__accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

@media (min-width: 1024px) {
    .footer__accordion-content {
        max-height: none !important;
        overflow: visible;
    }
}

.footer__nav-list {
    list-style: none;
    padding: 0 0 1.5rem 0;
    margin: 0;
}

@media (min-width: 1024px) {
    .footer__nav-list {
        padding-bottom: 0;
    }
}

.footer__nav-list li {
    margin-bottom: 0.75rem;
}

.footer__nav-link {
    display: flex;
    gap: 0.5rem;
    color: white;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: auto;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0.25rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    padding: 0.5rem 1rem;
    text-decoration: none;
    background-color: rgba(135, 165, 188, 0.1);
    border-radius: 15px;
}

.footer__nav-link:hover {
    opacity: .5;
}

.footer__nav-link:focus-visible {
    z-index: 10;
    outline: 1px dashed var(--white);
    outline-offset: 0;
}

/* Social Media Section */
.footer__social {
    position: relative;
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .footer__social {
        grid-column: span 3;
    }
}

.footer__icon-bg--social {
    position: absolute;
    right: 0;
    height: 100%;
    width: auto;
}

@media (min-width: 1024px) {
    .footer__icon-bg--social {
        left: -20%;
        right: auto;
        top: 50%;
        height: auto;
        width: 140%;
        transform: translateY(-50%);
    }
}

.footer__social .footer__section-title {
    position: relative;
}

.footer__social-list-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: clip;
    padding: 0;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .footer__social-list-wrapper {
        margin-bottom: 0;
    }
}

.footer__social-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    outline: none;
    margin: 0 -1rem;
    padding: 0;
    list-style: none;
}

.footer__social-list li {
    margin: 0;
}

.footer__social-link {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0.25rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.footer__social-link:hover {
    background-color: rgba(135, 165, 188, 0.1);
}

.footer__social-link:focus-visible {
    z-index: 10;
    outline: 1px dashed var(--white);
    outline-offset: 0;
}

.footer__social-link-content {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.footer__social-icon {
    height: 1.5rem;
    width: 1.5rem;
    flex-shrink: 0;
    fill: var(--color-link);
}

.footer__social-text {
    font-weight: 700;
}

/* Bottom Grid with Logo and Nav */
.footer__bottom-grid {
    align-items: center;
}

.footer__logo-wrapper {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .footer__logo-wrapper {
        grid-column: span 3;
    }
}

.footer__logo-link {
    align-self: center;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .footer__logo-link {
        align-self: flex-start;
    }
}

.footer__logo {
    width: auto;
    height: 3rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 640px) {
    .footer__logo {
        height: 2.5rem;
    }
}

@media (min-width: 768px) {
    .footer__logo {
        height: 2.75rem;
    }
}

@media (min-width: 1024px) {
    .footer__logo {
        height: 2rem;
    }
}

@media (min-width: 1280px) {
    .footer__logo {
        height: 2.5rem;
    }
}

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

/* Logo Links (multiple links next to logo) */
.footer__logo-links-wrapper {
    grid-column: 1 / -1;
    display: block;
    margin-top: 1rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .footer__logo-links-wrapper {
        grid-column: span 3;
        margin-top: 0;
        text-align: left;
    }
}

.footer__logo-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .footer__logo-links {
        flex-direction: column;
        gap: 0.375rem;
    }
}

.footer__logo-link-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: opacity 0.2s;
}

.footer__logo-link-item:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.footer__logo-link-item:focus-visible {
    z-index: 10;
    outline: 1px dashed currentColor;
    outline-offset: 3px;
}

.footer__logo-link-icon {
    display: inline-flex;
    height: 1.5rem;
    width: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #7abdb7;
    color: var(--white);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.footer__logo-link-item:hover .footer__logo-link-icon {
    transform: translateX(0.25rem);
}

.footer__icon-arrow-right {
    height: 1rem;
    width: 1rem;
    fill: currentColor;
}

/* Bottom Bar */
.footer__bottom {
    position: relative;
    background-color: #eff8f8;
    overflow: hidden;
}

.footer__bottom-nav-wrapper {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .footer__bottom-nav-wrapper {
        grid-column: span 6;
        padding-bottom: 1.5rem;
    }
}

.footer__bottom-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0;
    margin: 0;
    list-style: none;
}

@media (min-width: 1024px) {
    .footer__bottom-nav {
        flex-direction: row;
        gap: 2rem;
        padding: 0.5rem 0;
    }
}

.footer__bottom-nav li {
    margin: 0;
}

.footer__bottom-link {
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--color-heading, #ffffff);
    opacity: 0.75;
    text-decoration: none;
    transition: opacity 0.2s;
}

@media (min-width: 1024px) {
    .footer__bottom-link {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

.footer__bottom-link:hover {
    text-decoration: underline;
    opacity: 1;
}

.footer__bottom-link:focus-visible {
    z-index: 10;
    outline: 2px solid var(--color-focus, var(--color-blue-100));
    outline-offset: 2px;
}

.footer__credits {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--color-heading, #ffffff);
    opacity: 0.75;
}

.footer__credits svg {
    width: 44px;
    height: 47px;
}

/* Waves Section */
.footer__waves-wrapper {
    grid-column: span 6;
    position: static;
}

@media (min-width: 1024px) {
    .footer__waves-wrapper {
        position: relative;
    }
}

.footer__waves {
    pointer-events: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    height: 13rem;
    width: 100%;
    overflow: hidden;
    z-index: 1000;
}

@media (min-width: 1024px) {
    .footer__waves {
        bottom: 0;
    }
}

.footer__waves-svg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 20rem;
    width: auto;
    z-index: 1001;
}

@media (min-width: 1024px) {
    .footer__waves-svg {
        height: auto;
        width: 100%;
    }
}

.footer__wave {
    stroke-width: 8;
    stroke-linecap: round;
    opacity: 0;
    stroke-dashoffset: 0px;
    stroke-dasharray: 0px 1px;
}

/* Animations */
@keyframes wave-animate {
    from {
        stroke-dasharray: 0 1;
    }
    to {
        stroke-dasharray: 1 0;
    }
}

/* Color Variables (if not defined globally) */
:root {
    --color-mid-blue: var(--mid-blue);
    --color-grey-blue: var(--grey-blue);
    --color-dark-pink: var(--dark-pink);
    --color-light-blue: var(--color-blue-100);
    --color-focus: var(--color-blue-100);
}

/* ================================================
   BACKGROUND COLOR MODIFIERS
   ================================================ */

.footer--bg-dark { background-color: var(--text-dark); }
.footer--bg-blue { background-color: var(--primary-blue); }

/* ================================================
   CTA BUTTONS
   ================================================ */

.footer__cta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
}

.footer__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    -webkit-font-smoothing: antialiased;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}

.footer__cta-btn:hover { opacity: 0.85; }
.footer__cta-btn:active { transform: scale(0.97); }

.footer__cta-btn--pink {
    background-color: var(--dark-pink);
    color: var(--white);
}

.footer__cta-btn--grey-blue {
    background-color: var(--color-footer-btn);
    color: var(--white);
}

/* ================================================
   COPYRIGHT
   ================================================ */

.footer__copyright {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--white);
    opacity: 0.7;
    margin-top: 0.5rem;
    display: block;
}

/* ================================================
   PHONE IN ADDRESS
   ================================================ */

.footer__phone {
    color: var(--white);
    text-decoration: none;
}

.footer__phone:hover {
    text-decoration: underline;
}

/* ================================================
   IMAGE LOGO
   ================================================ */

.footer__logo--img {
    height: 3rem;
    width: auto;
    object-fit: contain;
}

@media (min-width: 640px) {
    .footer__logo--img { height: 2.5rem; }
}

@media (min-width: 768px) {
    .footer__logo--img { height: 2.75rem; }
}

@media (min-width: 1024px) {
    .footer__logo--img { height: 2rem; }
}

@media (min-width: 1280px) {
    .footer__logo--img { height: 2.5rem; }
}
