/* ==================================================================
   FAIR FORD PHARMACEUTICALS — SITE FOOTER
   footer.css · load LAST on every page that renders the site footer
   ------------------------------------------------------------------
   One shared design for the whole site. The markup already exists in
   two places — inline in public/index.html and in renderFooter() in
   js/common.js — and both use the same class names, so this single
   sheet drives them identically.

   It must load after style.css / about.css / contactus.css /
   product.css, each of which styled the old white footer.

   Not loaded on uphaar.html or nueva-vida.html: those are standalone
   campaign pages with their own footers and palettes.
   ================================================================== */

.footer {
    --ftr-ink:      #071F36;   /* deepest navy, base of the gradient   */
    --ftr-navy:     #0B2E4F;
    --ftr-royal:    #12456C;   /* royal blue, the lift                 */
    --ftr-accent:   #36B7A5;   /* teal, used sparingly                 */
    --ftr-soft:     #8FC2E4;   /* soft blue for secondary emphasis     */

    --ftr-head:     #FFFFFF;
    --ftr-body:     rgba(223, 238, 250, .76);
    --ftr-muted:    rgba(223, 238, 250, .60);
    --ftr-line:     rgba(255, 255, 255, .10);
    --ftr-line-str: rgba(255, 255, 255, .16);

    --ftr-ease: cubic-bezier(.22, .61, .36, 1);

    position: relative;
    isolation: isolate;
    padding: 0;
    color: var(--ftr-body);
    background:
        radial-gradient(62% 90% at 8% 0%, rgba(54, 183, 165, .10), transparent 58%),
        radial-gradient(58% 85% at 95% 100%, rgba(30, 111, 168, .26), transparent 62%),
        linear-gradient(168deg, var(--ftr-royal) 0%, var(--ftr-navy) 52%, var(--ftr-ink) 100%),
        /* Final value in the shorthand sets background-COLOR: a real fallback
           if the gradient layers fail, and it means the painted surface is
           reported honestly by tooling instead of computing as transparent. */
        var(--ftr-navy);
    font-family: var(--ff-font-body, 'Inter', system-ui, sans-serif);
}

/* Refined transition from the page into the footer: a hairline that
   brightens toward the centre rather than a hard edge. */
.footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(30, 111, 168, .5) 22%,
        var(--ftr-accent) 50%,
        rgba(30, 111, 168, .5) 78%,
        transparent 100%);
}

/* Very soft engineered grid, masked out at the edges. Adds depth
   without reading as a texture. */
.footer::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .55;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(72% 68% at 50% 40%, #000 0%, transparent 100%);
    mask-image: radial-gradient(72% 68% at 50% 40%, #000 0%, transparent 100%);
}

.footer .footer-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding: clamp(48px, 6vw, 76px) clamp(20px, 4vw, 48px) clamp(20px, 2.4vw, 28px);
}

/* ==================================================================
   LAYOUT — five clear columns, brand wider than the rest
   ================================================================== */
.footer .footer-top {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.5fr;
    gap: clamp(28px, 3.6vw, 56px);
    align-items: start;
}

/* The old markup separates columns with empty divider divs. The grid
   handles spacing now, so they are removed from the flow rather than
   left to add stray gaps. */
.footer .divider-vertical { display: none; }

.footer .footer-section { min-width: 0; }

/* ==================================================================
   BRAND COLUMN
   ================================================================== */
.footer .footer-logo { margin-bottom: 18px; }

/* style.css painted this with background-clip:text and a solid #0f4c81
   fill, which was invisible against the dark footer — the company name
   simply disappeared. Reset the clip and paint it directly. */
.footer .footer-logo .logo-text {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--ftr-head);
    font-family: var(--ff-font-heading, 'Manrope', sans-serif);
    font-weight: 700;
    font-size: clamp(19px, 2.1vw, 23px);
    line-height: 1.22;
    letter-spacing: -.012em;
    display: block;
}

.footer .company-description {
    color: var(--ftr-body);
    font-size: 14.5px;
    line-height: 1.8;
    max-width: 42ch;
    margin: 0 0 24px;
}

/* ==================================================================
   COLUMN TITLES
   ================================================================== */
.footer .footer-title,
.footer .newsletter-title {
    position: relative;
    color: var(--ftr-head);
    font-family: var(--ff-font-heading, 'Manrope', sans-serif);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .02em;
    margin: 0 0 22px;
    padding-bottom: 12px;
}

/* Short accent rule under each title — the visual hierarchy cue. */
.footer .footer-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ftr-accent), rgba(54, 183, 165, 0));
}

/* ==================================================================
   NAV LINKS — chevron slides in, label steps across
   ================================================================== */
.footer .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 13px;
}

.footer .footer-links .link-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: var(--ftr-body);
    font-size: 14.5px;
    line-height: 1.4;
    text-decoration: none;
    padding-left: 0;
    transition: color .3s var(--ftr-ease), padding-left .3s var(--ftr-ease);
}

.footer .footer-links .link-item::before {
    content: "";
    position: absolute;
    left: 0;
    width: 12px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--ftr-accent);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .3s var(--ftr-ease), transform .3s var(--ftr-ease);
}

.footer .footer-links .link-item:hover,
.footer .footer-links .link-item:focus-visible {
    color: var(--ftr-head);
    padding-left: 20px;
}
.footer .footer-links .link-item:hover::before,
.footer .footer-links .link-item:focus-visible::before {
    opacity: 1;
    transform: translateX(0);
}

/* ==================================================================
   CONTACT BLOCK — icon chip + label + value
   ================================================================== */
.footer .contact-info .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 18px;
}
.footer .contact-info .contact-item:last-child { margin-bottom: 0; }

.footer .contact-item > i {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-top: 2px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--ftr-soft);
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--ftr-line);
    transition: color .3s var(--ftr-ease), background .3s var(--ftr-ease),
                border-color .3s var(--ftr-ease);
}
.footer .contact-item:hover > i {
    color: #062A25;
    background: linear-gradient(140deg, var(--ftr-accent), #2A9C8C);
    border-color: transparent;
}

.footer .contact-label {
    margin: 0 0 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ftr-soft);
}

.footer .contact-value {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ftr-body);
    text-decoration: none;
    transition: color .3s var(--ftr-ease);
}
a.footer .contact-value:hover,
.footer a.contact-value:hover { color: var(--ftr-head); }

/* ==================================================================
   SOCIAL ICONS
   ================================================================== */
.footer .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer .social-links .social-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, .88);
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--ftr-line-str);
    text-decoration: none;
    overflow: hidden;
    transition: transform .35s var(--ftr-ease), color .35s var(--ftr-ease),
                border-color .35s var(--ftr-ease), box-shadow .35s var(--ftr-ease);
}

/* Brand wash rises from the base on hover rather than a flat swap. */
.footer .social-links .social-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #1E6FA8, var(--ftr-accent));
    transform: translateY(101%);
    transition: transform .38s var(--ftr-ease);
    z-index: -1;
}

.footer .social-links .social-icon:hover,
.footer .social-links .social-icon:focus-visible {
    transform: translateY(-4px);
    color: #052A24;
    border-color: transparent;
    box-shadow: 0 10px 20px -10px rgba(54, 183, 165, .85);
}
.footer .social-links .social-icon:hover::before,
.footer .social-links .social-icon:focus-visible::before { transform: translateY(0); }

/* ==================================================================
   SEPARATORS
   ================================================================== */
.footer .divider-horizontal {
    height: 1px;
    border: 0;
    margin: clamp(34px, 4vw, 48px) 0;
    background: linear-gradient(90deg, transparent, var(--ftr-line-str) 18%,
                var(--ftr-line-str) 82%, transparent);
}

/* ==================================================================
   NEWSLETTER
   ================================================================== */
.footer .newsletter-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(20px, 3vw, 40px);
    padding: clamp(24px, 3vw, 32px) clamp(22px, 3vw, 36px);
    border-radius: 18px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
    border: 1px solid var(--ftr-line);
}

.footer .newsletter-title { margin-bottom: 6px; padding-bottom: 0; }
.footer .newsletter-title::after { display: none; }

.footer .newsletter-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--ftr-body);
}

.footer .newsletter-form { flex: 1 1 320px; max-width: 460px; margin: 0; }

.footer .newsletter-form .input-group {
    display: flex;
    gap: 10px;
}

.footer .newsletter-input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid var(--ftr-line-str);
    color: #FFFFFF;
    caret-color: #FFFFFF;
    font-family: inherit;
    font-size: 14.5px;
    transition: background .3s var(--ftr-ease), border-color .3s var(--ftr-ease),
                box-shadow .3s var(--ftr-ease);
}

/* This placeholder is the field's only label, so it is held to the same
   4.5:1 as body copy rather than the looser placeholder convention. */
.footer .newsletter-input::placeholder {
    color: rgba(255, 255, 255, .72);
    opacity: 1;                       /* Firefox dims placeholders by default */
}

.footer .newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, .16);
    border-color: var(--ftr-accent);
    box-shadow: 0 0 0 3px rgba(54, 183, 165, .22);
}

/* Chrome repaints autofilled fields white with black text, which would
   undo the treatment above. */
.footer .newsletter-input:-webkit-autofill,
.footer .newsletter-input:-webkit-autofill:hover,
.footer .newsletter-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF;
    -webkit-box-shadow: 0 0 0 1000px #14456A inset;
    caret-color: #FFFFFF;
}

.footer .newsletter-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
    color: #052A24;
    background: linear-gradient(135deg, #46CBB8, var(--ftr-accent)) var(--ftr-accent);
    box-shadow: 0 10px 22px -12px rgba(54, 183, 165, .9);
    transition: transform .3s var(--ftr-ease), box-shadow .3s var(--ftr-ease),
                filter .3s var(--ftr-ease);
}
.footer .newsletter-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 16px 28px -12px rgba(54, 183, 165, .95);
}
.footer .newsletter-btn:active { transform: translateY(0); }

.footer .newsletter-message {
    margin: 10px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .88);
    min-height: 1em;                  /* reserve the line so nothing jumps */
}

/* ==================================================================
   BOTTOM BAR
   ================================================================== */
.footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer .footer-bottom p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ftr-muted);
}

.footer .footer-credit a {
    color: var(--ftr-soft);
    text-decoration: none;
    transition: color .3s var(--ftr-ease);
}
.footer .footer-credit a:hover { color: var(--ftr-head); }

/* Each half stays unbreakable so the line wraps between them rather
   than orphaning the separator or splitting the company name. */
.footer .fc-part { white-space: nowrap; }
.footer .fc-sep { margin: 0 9px; color: rgba(255, 255, 255, .34); }
.footer .footer-heart-svg { vertical-align: -2px; }

/* The back-to-top button is position:fixed and floats over the PAGE, not the
   footer, so it keeps the styling it already has in style.css / about.css. */

/* ==================================================================
   RESPONSIVE — 4 columns → 2 → 1
   ================================================================== */
@media (max-width: 1024px) {
    .footer .footer-top { grid-template-columns: 1.4fr 1fr 1.3fr; }
    .footer .company-description { max-width: none; }
}

@media (max-width: 820px) {
    .footer .footer-top { grid-template-columns: 1fr 1fr; gap: 34px 28px; }
    .footer .footer-section.company-info { grid-column: 1 / -1; }
    .footer .newsletter-section { flex-direction: column; align-items: stretch; }
    .footer .newsletter-form { max-width: none; }
}

@media (max-width: 560px) {
    .footer .footer-container { padding-top: 40px; }
    .footer .footer-top { grid-template-columns: 1fr; gap: 30px; }
    .footer .footer-title { margin-bottom: 16px; }
    .footer .newsletter-form .input-group { flex-direction: column; }
    .footer .newsletter-btn { justify-content: center; }
    .footer .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
    .footer .fc-part { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    .footer * { transition: none !important; }
}
