/* Step 1: Overall footer container - Base wrapper, grid setup */

/* Main footer container - matches original .footer-container */
.give-org-footer-block {
    width: 100%;
    max-width: 100%;
    padding: 5%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* Three columns */
    grid-template-rows: 1fr 0.6fr;
    /* Two rows */
    gap: 10px;
    /* space between rows and columns */
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Apply box-sizing to all elements within footer */
.give-org-footer-block *,
.give-org-footer-block *::before,
.give-org-footer-block *::after {
    box-sizing: border-box;
}

/* Step 2: Text/Socials section - Logo, description, copyright, social icons layout */

/* Logo/text/socials section - matches original .logo-text-socials */
.give-footer-logo-text-socials {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    grid-column: 1 / 2;
    /* Occupy the first column */
    grid-row: 1 / 3;
    /* Span both rows */
}

/* Logo container */
.give-footer-logo-section {
    display: flex;
    align-items: center;
}

.give-footer-logo-section img {
    object-fit: contain;
}

/* Description text */
.give-footer-description {
    width: 338px;
}

/* Organization description and desktop copyright spacing */
.give-footer-org-description+.give-footer-desktop-copyright {
    margin-top: 20px;
}

/* Social icons container */
.give-footer-socials {
    display: flex;
    gap: 15px;
}

/* Step 3: Links section - 3-column navigation layout */

/* Footer links section - matches original .footer-links */
.give-footer-links {
    display: flex;
    justify-content: space-between;
    grid-column: 2/4;
    grid-row: 1/2;
    padding-bottom: 20px;
    border-bottom: 1px solid #f6f4ee;
}

/* Individual navigation columns - matches original .columns */
.give-footer-links .give-footer-nav {
    display: flex;
    width: 200px;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

/* Navigation list - remove default list styling */
.give-footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.1;
}

/* Individual navigation items */
.give-footer-nav-item {
    margin: 0;
    padding: 0;
}

/* Step 4: Legal section - 2x2 grid for legal links */

/* Legal section mobile - matches original mobile behavior */
.give-footer-legal-terms {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    order: 3;
    margin-top: 20px;
}

.give-footer-legal-row {
    display: flex;
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 30px;
}

/* Individual legal links */
.give-footer-legal-link {
    white-space: nowrap;
}

/* Step 5: Newsletter section - Email input and button layout */
.give-footer-newsletter {
    grid-column: 3/4;
    grid-row: 2/3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* align-items: flex-end; */
    max-width: 21rem;
}

/* Newsletter text */
.give-footer-newsletter-text {
    width: 80%;
    text-align: right;
}

/* Email input and button container */
.give-footer-email-trigger {
    display: flex;
    max-width: 100%;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
    gap: 10px;
}

/* Email input */
.give-footer-email-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    outline: none;
    background: transparent;
    min-width: 0;
}

/* Send button */
.give-footer-send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 12px 8px;
    cursor: pointer;
    background: #e99918;
    border-radius: 0 5px 5px 0;
    flex-shrink: 1;
    min-width: 60px;
}

.give-footer-send-button:hover {
    background: #d18915;
}

/* Step 6: Modal layout - Newsletter modal structure */

/* Modal overlay */
.give-footer-newsletter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Only apply flex when modal is shown */
.give-footer-newsletter-modal[style*="flex"] {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Modal content container */
.give-footer-newsletter-modal-content {
    background: white;
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Close button */
.give-footer-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* Form container */
.give-footer-newsletter-form-container {
    width: 100%;
}

/* Form fields */
.give-newsletter-form-field {
    margin-bottom: 20px;
}

.give-newsletter-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.give-newsletter-form-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Checkbox group */
.give-newsletter-checkbox-group {
    margin-bottom: 20px;
}

.give-newsletter-checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.give-newsletter-checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.give-newsletter-checkbox-field input[type="checkbox"] {
    width: auto;
}

/* Submit button */
.give-newsletter-submit-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    background: #e99918;
    color: white;
}

.give-newsletter-submit-btn:hover {
    background: #d18915;
}

/* Disclaimer text */
.give-newsletter-disclaimer {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .give-footer-newsletter-modal-content {
        padding: 20px;
        margin: 10px;
        max-width: none;
    }
}

/* Step 9: Typography - Font sizes, weights, line heights */

/* Step 10: Colors - Text colors, background colors, hover states */

/* Footer background and border */
.give-org-footer-block {
    background: #3f454f;
    border-top: 10px solid #0079a3;
}

/* Description text - matches original .text-under-logo */
.give-footer-description {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 135%;
    color: #dedede;
}

/* Navigation links - matches original .column-text */
.give-footer-nav-link {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: normal;
    text-decoration: none;
    color: #f3e7a0;
}

.give-footer-nav-link:hover {
    color: #f3e7a0;
}

/* Legal links - matches original .term */
.give-footer-legal-link {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 100%;
    text-decoration: none;
    color: #f6f4ee;
}

.give-footer-links a:hover,
.give-footer-legal-terms a:hover {
    text-decoration: underline;
}

/* Newsletter text - matches original .stay-informed-text */
.give-footer-newsletter-text {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
    color: #f6f4ee;
    text-align: left;
}

/* Modal typography */
.give-footer-newsletter-modal h3 {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 125%;
    margin-bottom: 15px;
}

.give-footer-newsletter-modal p {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 135%;
    padding-bottom: 15px;
}

.give-newsletter-form-field label {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.give-newsletter-form-field input {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.give-newsletter-submit-btn {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
}

.give-newsletter-disclaimer {
    font-family: "proxima-nova", Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 300;
}

/* Mobile typography adjustments */
@media (max-width: 440px) {
    .give-footer-nav-link {
        font-size: 16px;
    }
}

/* Mobile copyright section - hidden by default, shown on mobile */
.give-footer-mobile-copy {
    display: none;
}

/* Responsive grid adjustment - prevents button cutoff */
@media (max-width: 1200px) {
    .give-org-footer-block {
        grid-template-columns: 1fr 1fr minmax(0, 1fr);
    }
}

/* Mobile layout - triggers earlier to prevent button cutoff */
@media (max-width: 991px) {
    .give-org-footer-block {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .give-footer-logo-text-socials {
        order: 1;
        grid-column: 1/2;
        grid-row: 1/3;
        margin: auto;
        padding-left: 20px;
    }

    .give-footer-socials {
        margin: auto;
    }

    .give-footer-links {
        order: 0;
        width: auto;
        margin-top: 20px;
        border-bottom: none;
        margin: auto;
        padding-left: 45px;
        padding-right: 45px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    /* Legal section mobile - matches original mobile behavior */
    .give-footer-links nav.give-footer-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        order: 3;
        margin: auto;
        margin-top: 20px;
    }

    .give-footer-links nav.give-footer-nav .give-footer-nav-list {
        text-align: center;
        align-items: center;
        gap: inherit;
        flex-direction: column;
    }

    /* Hide desktop copyright on mobile (use mobile-copy instead) */
    .give-footer-desktop-copyright {
        display: none;
    }

    /* Show mobile copyright section */
    .give-footer-mobile-copy {
        display: block;
        color: white;
        margin: auto;
        margin-top: 40px;
        text-align: center;
        order: 4;
        font-weight: 300;
        font-size: 16px;
    }

    /* Newsletter section ordering and centering */
    .give-footer-newsletter {
        order: 2;
        align-items: center;
        text-align: center;
        padding: 20px;
        margin: auto;
    }

    /* Legal section centering */
    .give-footer-legal-terms {
        align-items: center;
        text-align: center;
    }

    /* Only second legal row stacks vertically on mobile (has long text) */
    .give-footer-legal-row-2 {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .give-footer-newsletter-text {
        text-align: center;
        width: 100%;
    }

}

@media (max-width: 991px) {
    .give-footer-logo-text-socials {
        padding-left: unset !important;
    }
}

/* Tablet breakpoint - 2-column navigation layout */
@media (max-width: 768px) {
    .give-footer-links {
        flex-wrap: wrap;
        justify-content: flex-start;
        column-gap: 20px;
        border: none;
    }

    .give-footer-links .give-footer-nav {
        width: calc(50% - 10px);
    }

    .give-footer-links .give-footer-nav:nth-child(3) {
        width: 100%;
        margin-top: 10px;
    }

    /* Third column uses 2-column grid on mobile */
    .give-footer-links .give-footer-nav:nth-child(3) .give-footer-nav-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 20px;
    }
}

/* Smaller mobile breakpoint */
@media (max-width: 440px) {
    .give-footer-links {
        justify-content: center;
        padding-left: 0px;
        margin: 20px 0 0 0;
    }

    .give-footer-nav {
        width: 40%;
    }
}