/* ============================================================
   THE ROSEVILLES — FOOTER STYLES
   ============================================================

   Structure:
   1. Row 1 — Contact & Social Media
   2. Row 2 — Information
   3. Row 3 — Copyright & Credits

   Each section contains:
   - Main styling
   - Tablet adjustments (where applicable)
   - Mobile adjustments

   Colours:
   - Primary: Astra Global Colour 1
   - Light dividers: Primary colour mixed with white
   - Bottom bar: Burgundy (#800020)

   ============================================================ */


/* ============================================================
   1. FOOTER ROW 1 — CONTACT & SOCIAL MEDIA
   ============================================================ */


/* ---------- Astra wrapper ---------- */

.site-above-footer-wrap {
    margin-top: 0 !important;
    padding-top: 20px !important;
    padding-bottom: 0 !important;
}


/* ---------- Main layout ---------- */

.rosevilles-footer-row1 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;

    width: 100% !important;
    max-width: none !important;

    gap: 60px !important;
    margin: 0 !important;
    padding-top: 16px !important;
    padding-bottom: 8px !important;

    border-top: 1px solid color-mix(
        in srgb,
        var(--ast-global-color-0) 35%,
        white
    );
}


/* ---------- Columns ---------- */

.rosevilles-footer-row1 > .wp-block-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;

    flex: 1 1 0 !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* Contact column */

.rosevilles-footer-row1 > .wp-block-column:first-child {
    display: grid !important;
    grid-template-columns: max-content;
    justify-content: center !important;
    justify-items: start !important;
    align-content: start !important;
}

/* Social media column */

.rosevilles-footer-row1 > .wp-block-column:nth-child(2) {
    align-items: center !important;
}


/* ---------- Section headings ---------- */

.rosevilles-footer-heading {
    color: var(--ast-global-color-0) !important;

    font-size: 32px !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;

    margin: 0 0 24px 0 !important;
    padding: 0 !important;

    text-align: center !important;
}


/* ---------- Contact details ---------- */

.rosevilles-footer-contact-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 14px !important;

    margin: 0 0 -2px 0 !important;
    padding: 0 !important;

    font-size: 17px;
    line-height: 1.35;
}

.rosevilles-footer-contact-row:last-child {
    margin-bottom: 0 !important;
}

/* Contact icons */

.rosevilles-footer-contact-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 34px;
    min-width: 34px;
    height: 34px;

    margin: 0 !important;

    color: var(--ast-global-color-0) !important;
}

.rosevilles-footer-contact-icon svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
}

/* Contact text and links */

.rosevilles-footer-contact-row p {
    margin: 0 !important;
}

.rosevilles-footer-contact-row a {
    color: #333;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;

    transition: color 0.2s ease;
}

.rosevilles-footer-contact-row a:hover {
    color: var(--ast-global-color-0);
}


/* ---------- Social media icons ---------- */

.rosevilles-footer-socials {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 24px !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* Icon containers */

.rosevilles-footer-socials .wp-social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 50px !important;
    height: 50px !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 50% !important;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* Icon links */

.rosevilles-footer-socials .wp-social-link a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 0 !important;
}

/* SVG symbols */

.rosevilles-footer-socials .wp-social-link svg {
    width: 38px !important;
    height: 38px !important;

    fill: #ffffff !important;
    color: #ffffff !important;
}

/* Facebook */

.rosevilles-footer-socials .wp-social-link-facebook {
    background: transparent !important;
    padding: 0 !important;
}

.rosevilles-footer-socials .wp-social-link-facebook a {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}

.rosevilles-footer-socials .wp-social-link-facebook svg {
    width: 100% !important;
    height: 100% !important;

    fill: #1877f2 !important;
    color: #1877f2 !important;

    flex-shrink: 0 !important;

    transform: scale(1.18);
    transform-origin: center;
}

/* Instagram */

.rosevilles-footer-socials .wp-social-link-instagram {
    background: radial-gradient(
        circle at 30% 107%,
        #fdf497 0%,
        #fdf497 5%,
        #fd5949 45%,
        #d6249f 60%,
        #285aeb 90%
    ) !important;
}

/* YouTube */

.rosevilles-footer-socials .wp-social-link-youtube {
    background-color: #ff0000 !important;
}

/* Hover effects */

.rosevilles-footer-socials .wp-social-link:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}


/* ---------- Tablet: 921px and below ---------- */

@media (max-width: 921px) {

    .rosevilles-footer-row1 {
        gap: 30px !important;
    }

    .rosevilles-footer-heading {
        font-size: 28px !important;
    }

    .rosevilles-footer-contact-row {
        font-size: 16px;
    }

    /* Original tablet dimensions are overridden
       by the base icon sizing with !important. */
}


/* ---------- Mobile: 600px and below ---------- */

@media (max-width: 600px) {

    /* Stack and centre columns */

    .rosevilles-footer-row1 {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 24px !important;
    }

    .rosevilles-footer-row1 > .wp-block-column {
        width: 100% !important;
        flex: 0 0 auto !important;

        align-items: center !important;
        text-align: center !important;
    }

    .rosevilles-footer-row1 > .wp-block-column:first-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .rosevilles-footer-row1 > .wp-block-column:nth-child(2) {
        align-items: center !important;
        width: 100% !important;
    }

    /* Headings */

    .rosevilles-footer-heading {
        width: 100% !important;

        font-size: 28px !important;
        text-align: center !important;

        margin-bottom: 18px !important;
    }

    /* Contact details */

    .rosevilles-footer-contact-row {
        justify-content: flex-start !important;
        font-size: 16px;
    }

    /* Social media */

    .rosevilles-footer-socials {
        justify-content: center !important;
        gap: 18px !important;
    }

    .rosevilles-footer-socials .wp-social-link {
        width: 48px !important;
        height: 48px !important;
    }

    .rosevilles-footer-socials .wp-social-link svg {
        width: 26px !important;
        height: 26px !important;
    }

    /* Preserve full-size Facebook symbol */

    .rosevilles-footer-socials .wp-social-link-facebook svg {
        width: 100% !important;
        height: 100% !important;
    }
}


/* ============================================================
   2. FOOTER ROW 2 — INFORMATION
   ============================================================ */


/* ---------- Astra wrapper ---------- */

.site-primary-footer-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* ---------- Main layout ---------- */

.rosevilles-footer-row2 {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;

    width: 100% !important;
    max-width: none !important;

    gap: 0 !important;

    margin: 0 !important;
    padding: 20px 0 !important;

    border-top: 1px solid color-mix(
        in srgb,
        var(--ast-global-color-0) 35%,
        white
    );

    box-sizing: border-box;
}


/* ---------- Five equal-width columns ---------- */

.rosevilles-footer-row2 > .wp-block-column {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 20% !important;

    width: 20% !important;
    max-width: 20% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 20px !important;

    box-sizing: border-box;
}

/* Vertical dividers */

.rosevilles-footer-row2 > .wp-block-column:not(:last-child) {
    border-right: 1px solid color-mix(
        in srgb,
        var(--ast-global-color-0) 35%,
        white
    ) !important;
}


/* ---------- Information items ---------- */

.rosevilles-footer-info-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;

    gap: 14px !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* ---------- Information icons ---------- */

.rosevilles-footer-info-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 34px !important;

    width: 34px !important;
    height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--ast-global-color-0) !important;
}

/* SVG icons */

.rosevilles-footer-info-icon svg {
    width: 30px !important;
    height: 30px !important;

    fill: currentColor !important;
    color: var(--ast-global-color-0) !important;
}

/* Image icons */

.rosevilles-footer-info-icon img {
    width: 34px;
    height: 34px;

    object-fit: contain;
}


/* ---------- Information text ---------- */

.rosevilles-footer-info-text {
    flex: 0 1 190px !important;

    width: auto !important;
    max-width: 190px !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 16px;
    line-height: 1.4;

    color: #333;

    text-align: center !important;

    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
}

/* ---------- Information text — mobile ---------- */

@media (max-width: 767px) {
    .rosevilles-footer-info-text {
        font-size: 15px !important;
    }
}

/* Remove Gutenberg paragraph spacing */

.rosevilles-footer-info-text p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Links */

.rosevilles-footer-info-text a {
    color: #333;
    text-decoration: underline;
}

.rosevilles-footer-info-text a:hover {
    color: var(--ast-global-color-0);
}


/* ---------- Mobile: 600px and below ---------- */

@media (max-width: 600px) {

    /* Stack columns vertically */

    .rosevilles-footer-row2 {
        flex-direction: column !important;
        align-items: stretch !important;

        gap: 0 !important;
        padding: 6px 20px !important;
    }

    /* Full-width information columns */

    .rosevilles-footer-row2 > .wp-block-column {
        flex: 0 0 auto !important;

        width: 100% !important;
        max-width: 100% !important;

        padding: 8px 0 !important;

        border-right: none !important;
    }

    /* Replace vertical dividers with horizontal ones */

    .rosevilles-footer-row2 > .wp-block-column:not(:last-child) {
        border-right: none !important;

        border-bottom: 1px solid color-mix(
            in srgb,
            var(--ast-global-color-0) 35%,
            white
        ) !important;
    }

    /* Information items */

    .rosevilles-footer-info-item {
        width: 100% !important;

        justify-content: flex-start !important;

        gap: 16px !important;
    }

    /* Icons */

    .rosevilles-footer-info-icon {
        flex: 0 0 34px !important;
    }

    /* Text */

    .rosevilles-footer-info-text {
        flex: 1 1 auto !important;
        max-width: none !important;

        text-align: left !important;

        font-size: 16px;
        line-height: 1.35 !important;
    }
}


/* ============================================================
   3. FOOTER ROW 3 — COPYRIGHT & CREDITS
   ============================================================ */


/* ---------- Astra wrapper ---------- */

.site-below-footer-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    background-color: #800020 !important;
}

/* Remove Astra's minimum footer height */

.site-below-footer-wrap,
.site-below-footer-wrap .ast-builder-footer-grid-columns {
    min-height: 0 !important;
}


/* ---------- Main bottom bar ---------- */

.rosevilles-footer-row3 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;

    width: 100% !important;
    max-width: none !important;

    gap: 30px !important;

    margin: 0 !important;
    padding: 12px 14px;

    background-color: #800020 !important;

    box-sizing: border-box;
}


/* ---------- Columns ---------- */

.rosevilles-footer-row3 > .wp-block-column {
    display: flex !important;
    align-items: center !important;

    flex: 1 1 0 !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* Copyright column */

.rosevilles-footer-row3 > .wp-block-column:first-child {
    justify-content: flex-start !important;
}

/* Website credit column */

.rosevilles-footer-row3 > .wp-block-column:last-child {
    justify-content: flex-end !important;
}


/* ---------- Copyright and credit text ---------- */

.rosevilles-footer-copyright,
.rosevilles-footer-credit {
    margin: 0 !important;
    padding: 0 !important;

    color: #ffffff !important;

    font-size: 15px;
    line-height: 1.4;
}

/* Text alignment */

.rosevilles-footer-copyright {
    text-align: left !important;
}

.rosevilles-footer-credit {
    text-align: right !important;
}


/* ---------- Website credit link ---------- */

.rosevilles-footer-credit a {
    color: #ffffff !important;

    text-decoration: underline !important;
    text-underline-offset: 3px;

    transition: opacity 0.2s ease;
}

.rosevilles-footer-credit a:hover {
    opacity: 0.75;
}


/* ---------- Tablet: 921px and below ---------- */

@media (max-width: 921px) {

    .rosevilles-footer-row3 {
        padding: 20px 30px !important;
        gap: 20px !important;
    }

    .rosevilles-footer-copyright,
    .rosevilles-footer-credit {
        font-size: 14px;
    }
}


/* ---------- Mobile: 600px and below ---------- */

@media (max-width: 600px) {

    /* Stack and centre columns */

    .rosevilles-footer-row3 {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 10px !important;

        padding: 20px 15px !important;
    }

    .rosevilles-footer-row3 > .wp-block-column {
        width: 100% !important;
        flex: 0 0 auto !important;

        justify-content: center !important;
    }

    /* Centre copyright and credit text */

    .rosevilles-footer-copyright,
    .rosevilles-footer-credit {
        text-align: center !important;
        font-size: 13px;
    }
}