/*
 * Foremost Shortcodes – Footer CSS
 * Replicates Footer.tsx styles. All classes prefixed with fm- to avoid Elementor conflicts.
 */

/* ── 0. WP/Elementor reset overrides ─────────────────────────────────────── */

/* Remove fuchsia outline/focus on all interactive elements */
.fm-footer a,
.fm-footer a:focus,
.fm-footer a:active,
.fm-footer a:visited,
.fm-footer button,
.fm-footer button:focus,
.fm-footer button:active,
.fm-footer input,
.fm-footer input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Reset: button { border: 1px solid #c36; color: #c36; background-color: transparent }
   Reset: button:hover/focus { background-color: #c36; color: #fff }
   → Strip ALL button reset styles inside the footer */
.fm-footer button,
.fm-footer [type="button"],
.fm-footer [type="submit"] {
    border: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: inherit !important;
    font-weight: inherit !important;
    padding: 0 !important;
    font-size: inherit !important;
    text-align: inherit !important;
    white-space: normal !important;
    transition: none !important;
}

/* Restore subscribe button styles after the blanket reset above.
   Use high-specificity selectors (0,3,0+) to beat the blanket reset (0,2,0). */
.fm-footer .fm-main-btn.fm-main-btn--subscribe,
.fm-footer button.fm-main-btn--subscribe,
.fm-footer [type="submit"].fm-main-btn--subscribe {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--fm-green-1) !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    border: none !important;
    min-height: 56px !important;
    min-width: 120px !important;
    max-width: fit-content !important;
    width: auto !important;
    flex-shrink: 0 !important;
    padding: 8px 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 12px !important;
    transition: opacity 0.3s ease !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    overflow: hidden !important;
    position: relative !important;
}

.fm-footer .fm-main-btn.fm-main-btn--subscribe:hover,
.fm-footer button.fm-main-btn--subscribe:hover,
.fm-footer [type="submit"].fm-main-btn--subscribe:hover,
.fm-footer .fm-main-btn.fm-main-btn--subscribe:focus,
.fm-footer .fm-main-btn.fm-main-btn--subscribe:active {
    background-color: var(--fm-green-1) !important;
    color: #ffffff !important;
}

/* Reset: a { color: #c36 } / a:active, a:hover { color: #336 }
   → Catch-all for any missed links inside the footer */
.fm-footer a {
    color: inherit !important;
}

/* Reset: a:hover { color: #336 } — prevents dark navy on white links */
.fm-footer a:hover {
    color: inherit !important;
}

/* Reset: input[type=email] { border: 1px solid #666; border-radius: 3px; width: 100%; padding: .5rem 1rem }
   → Newsletter input must not have that border or full width */
.fm-newsletter-form__input,
.fm-footer input[type="email"] {
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 8px 16px !important;
    transition: none !important;
}

/* Reset: hr { height: 0; overflow: visible }
   → Dividers in footer must be solid white 1px bars */
.fm-footer__divider,
hr.fm-footer__divider {
    border: none !important;
    border-top: none !important;
    height: 1px !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    overflow: hidden !important;
    opacity: 1 !important;
}

/* Reset: h2 { font-size: 2rem; font-weight: 500 }
   → Footer headings must keep their size and weight */
.fm-footer__heading {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .fm-footer__heading {
        font-size: 48px !important;
    }
}

.fm-accordion__title {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

/* ── 1. Footer Wrapper ───────────────────────────────────────────────────── */

.fm-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    background-color: var(--fm-blue-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 80px 0;
}

/* ── 2. Inner sections ───────────────────────────────────────────────────── */

.fm-footer__section {
    width: 83.333%; /* w-10/12 */
    margin: 0 auto;
}

@media (min-width: 768px) {
    .fm-footer__section {
        width: 91.666%; /* md:w-11/12 */
    }
}

@media (min-width: 1280px) {
    .fm-footer__section {
        width: 83.333%; /* xl:w-10/12 */
    }
}

/* ── 3. Newsletter Section ───────────────────────────────────────────────── */

.fm-footer__newsletter-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 64px;
}

@media (min-width: 768px) {
    .fm-footer__newsletter-grid {
        grid-template-columns: 55% 1fr;
        gap: 0;
    }
}

.fm-footer__newsletter-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

@media (min-width: 768px) {
    .fm-footer__newsletter-left {
        gap: 40px;
    }
}

.fm-footer__heading {
    font-size: 36px; /* text-4xl */
    font-weight: 700;
    color: #ffffff;
    text-wrap: balance;
    margin: 0;
}

@media (min-width: 768px) {
    .fm-footer__heading {
        font-size: 48px; /* md:text-5xl */
    }
}

/* Newsletter form */
.fm-newsletter-form {
    width: 100%;
}

.fm-newsletter-form__row {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 9999px !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.fm-newsletter-form__honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

.fm-newsletter-form__input {
    flex: 1;
    padding: 8px 16px;
    outline: none;
    border: none;
    background: transparent;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: #000000;
}

.fm-newsletter-form__input::placeholder {
    color: var(--fm-gray-3);
    font-size: 13px;
}

/* Subscribe button */
.fm-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    border-radius: 9999px;
    min-height: 56px;
    min-width: 120px;
    max-width: 350px;
    padding: 8px 16px;
    transition: opacity 0.3s ease;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.fm-main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .fm-main-btn {
        min-width: 186px;
        max-width: 186px;
    }
}

.fm-main-btn--subscribe {
    background-color: var(--fm-green-1) !important;
    color: #ffffff !important;
    border-radius-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fm-main-btn--subscribe:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

@media (min-width: 768px) {
    .fm-footer .fm-main-btn.fm-main-btn--subscribe,
    .fm-footer button.fm-main-btn--subscribe,
    .fm-footer [type="submit"].fm-main-btn--subscribe {
        font-size: 16px !important;
        min-width: 186px !important;
        max-width: 186px !important;
    }
}

/* Marquee hover text container */
.fm-main-btn__text {
    display: block;
}

.fm-main-btn:hover .fm-main-btn__text {
    display: inline-flex;
    white-space: nowrap;
    animation: fm-marquee 1.5s linear infinite;
}

.fm-newsletter-form__message {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 16px;
    border-radius: 12px;
    width: fit-content;
}

.fm-newsletter-form__message--success {
    color: #ffffff;
}

.fm-newsletter-form__message--error {
    color: #dc2626;
}

/* ── 4. Social Media ─────────────────────────────────────────────────────── */

.fm-footer__social-right {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .fm-footer__social-right {
        gap: 40px;
    }
}

.fm-footer__social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fm-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fm-green-1) !important;
    width: 56px;
    height: 56px;
    aspect-ratio: 1;
    border-radius: 9999px;
    padding: 16px;
    transition: background-color 0.2s ease;
    text-decoration: none !important;
    color: #ffffff !important;
}

.fm-social-icon:hover {
    background-color: var(--fm-orange-1) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.fm-social-icon svg {
    width: 100%;
    height: 100%;
    color: #ffffff !important;
    fill: currentColor;
}

/* ── 5. Divider ──────────────────────────────────────────────────────────── */

.fm-footer__divider {
    height: 1px;
    width: 100%;
    background-color: #ffffff;
    margin: 0;
    flex-shrink: 0;
}

/* ── 6. Contact Methods ──────────────────────────────────────────────────── */

.fm-footer__contacts {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
}

@media (min-width: 768px) {
    .fm-footer__contacts {
        grid-template-columns: repeat(3, 1fr);
        align-items: stretch;
        gap: 0;
    }
}

.fm-contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* ── 7. Accordion ────────────────────────────────────────────────────────── */

.fm-accordion__toggle {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: fit-content !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    padding: 0 !important;
    color: #ffffff !important;
    transition: none !important;
}

.fm-accordion__toggle:hover,
.fm-accordion__toggle:focus,
.fm-accordion__toggle:active {
    background-color: transparent !important;
    color: #ffffff !important;
    border: none !important;
}

.fm-accordion__title {
    font-size: 30px; /* text-3xl */
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* Icon Plus/Minus */
.fm-icon-plus {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #ffffff;
}

.fm-icon-plus__line-h {
    transform-origin: center;
}

.fm-icon-plus__line-v {
    transform-origin: center;
    transition: transform 0.3s ease;
}

.fm-accordion__toggle[aria-expanded="true"] .fm-icon-plus__line-v {
    transform: rotate(90deg);
}

/* Accordion body */
.fm-accordion__body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.fm-accordion__body--open {
    max-height: 2000px;
    opacity: 1;
}

.fm-accordion__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    padding-left: 40px;
    color: #ffffff !important;
    text-decoration: none !important;
}

.fm-accordion__content:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Contact value */
.fm-contact-value {
    white-space: pre-line;
    color: #ffffff !important;
    font-size: 16px;
    margin: 0;
}

/* Contact CTA button */
.fm-contact-cta {
    background-color: var(--fm-green-1) !important;
    color: #ffffff !important;
    font-family: 'Sora', sans-serif !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 9999px !important;
    min-height: 56px !important;
    max-width: 213px;
    padding: 12px 8px !important;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.2s ease !important;
    margin-top: auto;
}

.fm-contact-cta:hover,
.fm-contact-cta:focus,
.fm-contact-cta:active {
    background-color: var(--fm-green-1) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    opacity: 0.9;
}

.fm-contact-cta__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.fm-contact-cta svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── 8. Menu Links Section ───────────────────────────────────────────────── */

.fm-footer__menus {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
}

@media (min-width: 768px) {
    .fm-footer__menus {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }
}

.fm-menu-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.fm-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding-left: 40px;
}

.fm-menu-list li a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 16px;
    transition: text-decoration 0.1s ease;
}

.fm-menu-list li a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}
