@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');

:root {
    --color-primary: #1E6BB8;
    --color-primary-hover: #155A99;
    --color-accent: #F4A261;
    --color-bg-soft: #F7F9FC;
    --color-bg-muted: #E8EDF2;
    --color-text: #1F2937;
    /* Primary logo height; tagline has its own cap below */
    --nav-v-gutter: 8px;
    --nav-primary-max-height: 148px;
    --nav-tagline-max-height: 118px;
    --nav-height: calc(var(--nav-primary-max-height) + var(--nav-v-gutter));
    --radius-button: 14px;
    --radius-image: 10px;
}

* {
    font-family: "Lexend", sans-serif;
    color: var(--color-text);
}

img {
    max-width: 100%;
}

/* Softer imagery in page content (nav logos stay square-edged in header) */
main img,
footer img {
    border-radius: var(--radius-image);
}

body {
    margin: 0;
    min-height: 100vh;
}

header {
    box-shadow: rgba(154, 161, 177, 0.1) 0px 5px 10px;
    width: 100%;
    background-color: #fff;
    position: fixed;
}

header .container {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

header .container > nav {
    flex: 1 1 auto;
    min-width: 0;
}

/* FRU widget as sibling of <nav> inside header (some embed modes) */
header .container > div:has(#donate-button-FUNRLYHXKWS),
header .container > div:has([data-testid="donate-button"]) {
    margin-left: auto;
    flex-shrink: 0;
}

header .container > #donate-button-FUNRLYHXKWS {
    margin-left: auto;
    flex-shrink: 0;
}

nav {
    display: flex;
    height: var(--nav-height);
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 1 auto;
    min-width: 0;
    /* space after logo + tagline block before FRU donate (FRU is usually next flex sibling) */
    margin-right: 0.75rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 0;
    flex: 0 1 auto;
    min-width: 0;
}

.nav-brand img {
    max-width: min(68vw, 620px);
    max-height: var(--nav-primary-max-height);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.nav-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 100%;
    line-height: 0;
    padding-right: 0.75rem;
    margin-right: 0.5rem;
    padding-left: 0.35rem;
}

.nav-tagline img {
    max-width: min(48vw, 420px);
    max-height: var(--nav-tagline-max-height);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Fundraise Up: pin donate UI to the right of <nav> (JS in script.js also sets inline styles; !important beats FRU stylesheet) */
header nav > *:has(#donate-button-FUNRLYHXKWS),
header nav > *:has([data-testid="donate-button"]) {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

header nav > #donate-button-FUNRLYHXKWS,
header nav > button[data-testid="donate-button"] {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

main {
    padding-top: var(--nav-height);
}

h1 {
    font-size: 32px;
    margin: 0;
    margin-bottom: 2rem;
}

p {
    font-size: 18px;
    font-weight: 300;
    margin: 0;
    margin-bottom: 2rem;
}

strong {
    font-size: 18px;
    font-weight: 600;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

section {
    padding: 2rem;
}

.gray-section {
    background: linear-gradient(var(--color-bg-soft), var(--color-bg-muted));
}

/* Site CTAs / donate links only — Fundraise Up uses its own markup & styles */
.button {
    background-color: var(--color-primary);
    color: #fff;
    min-width: 200px;
    text-align: center;
    text-decoration: none;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 22px;
    border-radius: var(--radius-button);
    box-shadow: 0 2px 10px rgba(30, 107, 184, 0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 14px rgba(21, 90, 153, 0.28);
}

.two-columns {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2.5rem;
}

.column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    max-width: 50%;
}

.column.full {
    width: 100%;
}

.column.end {
    align-items: end;
}

#hero {
    background: url(../img/Hero1.png);
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 600px;
    background-position-y: center;
    background-position-x: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

#hero h1 {
    font-size: 46px;
}

#hero-donate {
    margin-bottom: 0;
}

/* Programs */
.program-tile {
    border: 4px solid var(--color-bg-muted);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    margin-bottom: 1rem;
    min-height: 120px;
    padding: 1rem;
    box-sizing: border-box;
}

.program-tile:hover {
    border-color: var(--color-primary);
}

.program-tile a {
    text-decoration: none;
}

.program-tile a strong {
    font-size: 24px;
}

.program-tile a p {
    margin: 0;
}

/* Overnight support — two Fundraise Up goal-meter slots side by side */
#overnight-support .zakat-goal-meters__row {
    width: 100%;
}

/* Capital Campaign — tighter rhythm than the global p/li defaults */
#capital-campaign p {
    margin-bottom: 1rem;
}

#capital-campaign ul {
    margin: 0 0 1.5rem;
    padding-left: 1.25rem;
}

#capital-campaign li {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

#capital-campaign img {
    margin-top: 1rem;
}

footer {
    padding: 2rem ;
    padding-bottom: 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

footer img {
    max-width: 240px;
    margin-bottom: 1rem;
}

@media(max-width:767px){
    section {
        padding: 2rem 1rem;
    }
    
    .two-columns {
        flex-direction: column;
    }

    .column {
        width: 100%;
        max-width: 100%;
    }
}
