/*
Theme Name: GG Dev Client Theme Child
Theme URI: https://gg-dev.co/
Description: Child theme for GG Dev Client Theme
Author: GG Dev
Author URI: https://gg-dev.co/
Template: ggdevclienttheme
Version: 1.0.0
Text Domain: ggdevclienttheme-child
*/

/* Global */
a.skip-to-content {
    border-radius: 0;
}
a {
    text-decoration: none;
}

div#wpbody-content .error {
    display: none !important;
}


/* Sub Page Images */
/* TWO-COLUMN SUB PAGE: constrain image height & crop
-------------------------------------------------- */

/* Make the columns stretch to the same height */
.two-column-layout-sub-page.wp-block-columns {
    align-items: stretch;
}

/* Stack column contents vertically */
.two-column-layout-sub-page .wp-block-column {
    display: flex;
    flex-direction: column;
}

/* Image block fills its column, but we will cap height */
.two-column-layout-sub-page .wp-block-column:first-child .styled-image-block {
    flex: 1 1 auto;
}

/* Kill the forced 1:1 aspect ratio from the wrapper */
.two-column-layout-sub-page .styled-image-wrapper.styled-image-1-1 {
    padding-top: 0 !important;
    aspect-ratio: auto !important;
}

/* Constrain the image card height and keep your styling */
.two-column-layout-sub-page .styled-image-wrapper {
    max-height: 500px;           /* tweak this value to taste */
    height: 100%;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Make the image fill and crop within that card */
.two-column-layout-sub-page .styled-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}




/* Header */
/* Push content down so it’s not under the header */
body {
    padding-top: 70px; /* match your header height */
}
body.admin-bar header.site-header {
    top: 32px;
}
header.site-header {
    box-shadow:
        0 2px 4px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, .2)),
        0 4px 5px 0 var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, .14)),
        0 1px 10px 0 var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, .12));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #ffffff;
}
header.site-header .c-header__logo {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}
header.site-header .c-header__logo a:focus {
    outline: 3px solid #fff;
    outline-offset: 0px;
}
header.site-header .c-header__logo a,
header.site-header .c-header__logo img {
    max-height: 85px;
}
header.site-header .header-nav > .menu > li.menu-item-has-mega.open > .mega-menu {
	display: grid !important;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
    margin-top: -2rem !important;
}

/* ================================
   MOBILE MENU – PARENT TOGGLE (ROW-SAFE)
   ================================ */

.main-mobile-menu .menu > li.menu-item-has-children {
	display: flex;
	align-items: center;
	flex-wrap: wrap; /* submenu can wrap */
	gap: 0.75rem;    /* consistent spacing between arrow + text */
}

/* Arrow button */
.main-mobile-menu .menu > li.menu-item-has-children > .submenu-toggle {
	order: 1;
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: #2f6f3e;
	transform: rotate(45deg);
}

/* Draw chevron */
.main-mobile-menu .menu > li.menu-item-has-children > .submenu-toggle::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
}

/* Parent link stays on SAME ROW as the arrow */
.main-mobile-menu .menu > li.menu-item-has-children > a {
	order: 2;
	flex: 1 1 auto;
	min-width: 0;

	/* override parent theme “full width link” behavior */
	width: auto !important;
	display: inline-block !important;

	padding-left: 0;
	padding-right: 1rem;
}

/* Submenu always drops BELOW on its own row */
.main-mobile-menu .menu > li.menu-item-has-children > .sub-menu {
	order: 3;
	flex: 0 0 100%;
	width: 100%;
	display: none;
	padding-left: 2.5rem; /* indent under parent row */
}

.main-mobile-menu li.menu-item-has-children.open > .sub-menu {
	display: block;
}

/* Rotate arrow when open */
.main-mobile-menu li.menu-item-has-children.open > .submenu-toggle {
	transform: rotate(-135deg);
}




/* Footer */
.footer-logo-section img {
    max-width: 90px;
    height: auto;
}
footer {
    font-size: 0.75rem;
}
.footer-inner {
    padding: 0;
}
.footer-social {
    display: block !important;
    width: 100%;
    padding: 2rem 0 1rem 0;
}
.footer-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}
.footer-icons > * {
    flex: 1 1 0;
    text-align: left;
}
.footer-icons .widget {
    width: 100%;
}
.footer-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}
.footer-logo-section {
    display: flex;
    gap: 1rem;
}
.footer-content-cpyright {
    text-align: center;
    opacity: 0.9;
    margin-top: 2.5rem;
}
.footer-content-cpyright p {
    margin-bottom: 0;
}
.footer-contact-info p,
.footer-profile-info p {
    margin: 0;
}
.footer-contact-info p.contact-info-header,
.footer-profile-info p.profile-info-header {
    font-size: 1rem;
}
.footer-contact-info a,
.footer-profile-info a {
    font-size: 0.8rem !important;
    color: #10351E !important;
}
.footer-contact-info a:hover,
.footer-profile-info a:hover {
    color: #0A1F12 !important;
}
a.create-account-footer-button {
    background: #f7840f !important;
    color: #ffffff !important;
    padding: 0.25rem;
    margin: 0.5rem 0;
}
a.create-account-footer-button:hover {
    background: #d86c0c !important;
    color: #d8d8d8 !important;
}
.footer-social .footer-icons > div:first-child,
.footer-social .footer-icons > div:nth-child(3),
.footer-social .footer-icons > div:nth-child(4) {
    align-self: flex-start;
}
.footer-social .footer-social-icons {
    flex-wrap: nowrap !important;
    gap: 0 !important; /* override parent theme gap */
    text-align: center;
    margin-top: 2rem;
}
.footer-social .footer-social-icons a {
    margin: 0 0.25rem; /* visual spacing between icons only */
}

/* Only icon links inside .footer-icons should NOT stretch full width */
.footer-social-icons > a {
    flex: 0 0 auto !important;
    width: auto !important;
    font-size: 2rem !important;
}
.footer-logo-section img {
    border-radius: 50%;
}



/* Page Banner Inner Pages */
/* -----------------------------------------
   CORE PAGE BANNER – 40vh + TORN EDGE
------------------------------------------ */
/* Ensure the core banner is the height controller */
.core-page-banner {
    position: relative;
    height: 50vh !important;
    overflow: visible; /* allows torn edge to hang below */
}

/* Force the preview wrapper to fill the full hero height */
.core-page-banner .home-page-hero-preview {
    height: 100%;
    width: 100%;
    position: relative;
}

/* Make the image fill the hero space */
.core-page-banner .home-page-hero-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* Keep overlay height aligned */
.core-page-banner .home-page-hero-overlay {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

/* Content inside overlay */
.core-page-banner .home-page-hero-inner {
    position: relative;
    z-index: 3;
}

.core-page-banner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -79px;      /* how far it hangs into the content */
    height: 40px;

    background-image: url('/wp-content/themes/ggdevclienttheme-child/assets/img/hero-jagged-banner.svg');
    background-repeat: no-repeat;
    background-size: 100% 40px;
    background-position: center bottom;

    /* flip if the torn edge is on the top of the SVG */
    transform: scaleY(-1);
    transform-origin: top;

    pointer-events: none;
    z-index: 10;
}



/* Home */
body.home.wp-singular.page-template-default, body.page-id-835.wp-singular.page-template-default {
    background-color: #f5f7fa;
}
.natural-habitats a {
    color: #107741 !important;
}
.plants-pollinators a {
    color: #904f8f !important;
}
.vital-rivers a {
    color: #247bbe !important;
}
.healthy-forests a {
    color: #10351E !important;
}
.sustainable-trails a {
    color: #884B3E !important;
}
.youth-families a {
    color: #2BABA7 !important;
}
.wrv-basecamp a {
    color: #88888B !important;
}
.leaders-training a {
    color: #2C3078 !important;
}
/* Featured Areas Section */
.wrv-featured-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.featured-event-block {
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}
.featured-event-thumb {
    max-height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
}
.featured-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.featured-event-content {
    padding: 0rem 1.25rem 1rem 1.25rem;
}
h6.featured-event-title {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.volunteer-options-home .wp-block-column {
    background: #ffffff;
    padding: 0 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative; 
}
.volunteer-options-home .styled-image-block,
.volunteer-options-home .styled-image-wrapper,
.volunteer-options-home .styled-image-aspect {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
}
.volunteer-options-home .styled-image-aspect img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.volunteer-options-home .wp-block-heading {
    position: absolute;
    left: 50%;
    bottom: 10vh;          
    transform: translateX(-50%);
    margin: 0;
    padding: 0 1.25rem;
    text-align: center;
    line-height: 1.3;
}
.volunteer-options-home .wp-block-heading a {
    background: #ffffff;
    padding: 1rem;
    border-radius: 1px;
}
body.home .wp-block-columns.alignfull.has-background[style*="#006938"], body.page-id-835 .wp-block-columns.alignfull.has-background[style*="#006938"] {
    position: relative;
    padding-top: 3rem;
    padding-bottom: 6rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    z-index: 1;
}
body.home .wp-block-columns.alignfull.has-background[style*="#006938"]
  > .wp-block-column > .wp-block-columns.alignwide, body.page-id-835 .wp-block-columns.alignfull.has-background[style*="#006938"]
  > .wp-block-column > .wp-block-columns.alignwide {
    max-width: 1100px;
    margin: 0 auto;
}

body.home .volunteer-options-home:first-of-type, body.page-id-835 .volunteer-options-home:first-of-type {
    position: relative;
    margin-bottom: 2rem;
    z-index: 2;
}
body.home .volunteer-options-home:nth-of-type(2), body.page-id-835 .volunteer-options-home:nth-of-type(2) {
    position: relative;
    margin-top: 2rem;
    margin-bottom: -10rem;
    z-index: 2;
}
.styled-image-block .styled-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
}
.styled-image-block .styled-image-wrapper .styled-image-aspect {
    width: 100% !important;
}
.volunteer-options-home .wp-block-column > * {
    width: 100% !important;
}
body.home .wrv-featured-events-grid,
body.home .wrv-featured-events-grid .featured-event-block, body.page-id-835 .wrv-featured-events-grid, body.page-id-835 .wrv-featured-events-grid .featured-event-block {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
body.home .wp-block-columns.alignwide:nth-of-type(3), body.page-id-835 .wp-block-columns.alignwide:nth-of-type(3) {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    padding-top: 4rem;
    padding-bottom: 4rem;
    background: white;
}
.wp-block-columns.featured-events-header,
.wp-block-columns.featured-events-section {
    margin-bottom: 0;
}
.multiple-buttons .two-col-cta-wrapper .wp-block-buttons .wp-block-button {
    flex: 1 1 0;
}
.multiple-buttons .two-col-cta-wrapper .wp-block-buttons .wp-block-button__link {
    width: 100%;
    text-align: center;
}
.multiple-buttons .two-col-cta-wrapper .wp-block-buttons .wp-block-button {
    flex: 1 1 0;
}
.multiple-buttons .two-col-cta-wrapper .wp-block-buttons .wp-block-button__link {
    width: 100%;
    text-align: center;
}
div.stats-columns-home h2, div.stats-columns-home p {
    margin-block-start: 0.75rem;
}
.wp-block-columns.history-achievements-mission {
    margin-bottom: 0;
    margin-top: 3rem;
}



/* Sub Pages */
.core-page-banner h4 {
    margin-top: 0;
}
.core-page-banner h4 a {
    color: #f7840f !important;
}
.wp-block-columns.page-description-first-container {
    margin-bottom: 0;
}
.wp-block-gg-blocks-home-page-hero.core-page-banner.sub-page-banner h4 {
    margin-top: 0;
}
.section-divider {
    display: block;
    width: 100%;
    height: 80px; /* adjust as needed */
}
.section-divider path {
    fill: #87a291; /* or a WRV brand color, or currentColor */
}
.forest-banner figure.wp-block-image.size-large {
    text-align: center;
}
.wp-block-ggb-multi-image.multi-img-grid.images-grid .styled-img-wrapper {
    border-radius: 1px;
}
.images-grid-container p {
    margin-block-start: 1rem;
    margin-block-end: 0;
}
.wp-block-ggb-multi-image.multi-img-grid.images-grid {
    margin-block-start: 0;
    padding-bottom: 0;
    margin-bottom: -1rem;
}
blockquote.wp-block-quote.is-layout-flow.wp-block-quote-is-layout-flow {
    margin-inline-start: 0;
    border-left: 6px solid #2c944b;
}
blockquote.wp-block-quote.is-layout-flow.wp-block-quote-is-layout-flow p {
    padding-left: 1.5rem;
}
.team-members-pro-grid {
    flex-direction: column;
}
.donation-iframe-wrap {
	max-width: none !important;
	width: 100%;
}
.donate-page-cta .wp-block-group.two-col-cta-text.is-layout-flow.wp-block-group-is-layout-flow {
    flex: 1 1 100%;
    max-width: 100%;
}
/* =========================================
   DONATION IFRAME AREA — WRAPPER + CARD UI
   Targets:
   - .donation-iframe-wrap (columns wrapper)
   - .donation-iframe-col (the column containing the embed)
========================================= */

/* The whole section behind the form */
.donation-iframe-wrap {
	background: #f5f7fa; /* soft neutral */
	padding: 3rem 1rem;
}

/* The column that contains the embeds */
.donation-iframe-wrap .donation-iframe-col {
	max-width: 820px;
	margin: 0 auto;
}

/* Card framing around the iframe + the content inside that column */
.donation-iframe-wrap .donation-iframe-col {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	padding: 2.5rem 1.75rem;
}

/* Make the embedded iframe behave */
.donation-iframe-wrap .donation-iframe-col iframe {
	display: block;
	width: 100% !important;
	border: 0 !important;
	background: transparent;
}

/* Optional: give the matching gifts widget its own spacing */
.donation-iframe-wrap .donation-iframe-col #dd-container {
	margin-top: 2rem;
}

/* Optional: visually separate the matching gift section if it feels glued */
.donation-iframe-wrap .donation-iframe-col #dd-container {
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0,0,0,0.08);
}
.wp-block-ggb-cta-fw.cta-fw.alignfull.donate-page-cta a {
    color: #f7840f !important;
}
.wp-block-ggb-cta-fw.cta-fw.alignfull.donate-page-cta a:hover {
    color: #d86c0c !important;
}
.sponsor-logos-section img {
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
}
p.address-info, p.phone-info {
    margin-top: 0.5rem;
}
.wp-block-columns .wp-block-column .contact-info {
    padding: 0 !important;
    margin-top: 0rem;
}
.wp-block-ggb-contact-info.contact-info.wrv-contact-info {
    padding: 0 !important;
}
#wpbody-content > .wrap > div.error {
    display: none !important;
}
.youth-and-families .wp-block-ggb-faq.faq-outer-wrapper {
    margin-left: 1.5rem !important;
}





/* Mobile padding cleanup */
@media (max-width: 640px) {
	.donation-iframe-wrap {
		padding: 2rem 0.75rem;
	}

	.donation-iframe-wrap .donation-iframe-col {
		padding: 1.5rem 1rem;
	}
}
.sponsor-logos-section .wp-block-column {
    text-align: center !important;
    align-self: center !important;
}





/* Media Queries */
@media only screen and (max-width: 1120px) {
    .volunteer-options-home h4.wp-block-heading {
        font-size: 0.8rem !important;
    }
}

@media only screen and (max-width: 990px) {
    .volunteer-options-home h4.wp-block-heading {
        font-size: 0.7rem;
    }
}

@media only screen and (max-width: 980px) {
    .wp-block-columns.page-description-first-container p {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* === 2 CARDS PER ROW ON TABLET + MOBILE === */
@media (max-width: 900px) {

    /* the wrapper row */
    .volunteer-options-home {
        display: flex !important;
        flex-wrap: wrap;
        gap: 1.5rem; /* adjust spacing */
        justify-content: center;
    }

    /* each column becomes 50% width */
    .volunteer-options-home .wp-block-column {
        flex: 0 1 calc(50% - 1.5rem);
        max-width: calc(50% - 1.5rem);
    }
}

@media (min-width: 768px) {
    .footer-social {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .footer-icons {
        flex: 1 1 auto;
    }

    .footer-content-cpyright {
        flex: 0 0 auto;
        text-align: center;
        white-space: nowrap;
    }
}

@media only screen and (max-width: 768px) {
    .footer-social {
        padding: 1rem 0 1rem 0;
    }
    .footer-social .footer-icons {
        flex-direction: column;
        padding: 0 1rem;
    }
    .footer-social .footer-social-icons {
        margin-top: 0;
    }
    .footer-social-links-widget {
        align-self: flex-start;
    }
    .footer-content-cpyright {
        text-align: left;
        padding-left: 1rem;
    }

    .wrv-featured-events-grid {
        grid-template-columns: 1fr;
    }

    /* Make the entire white section full-width */
    body.home .wp-block-columns.alignwide:nth-of-type(3), body.page-id-835 .wp-block-columns.alignwide:nth-of-type(3) {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Make the featured events grid full-width */
    body.home .wrv-featured-events-grid, body.page-id-835 .wrv-featured-events-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Each event card full-width */
    body.home .featured-event-block,  body.page-id-835 .featured-event-block {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure images span full card width */
    body.home .featured-event-thumb,
    body.home .featured-event-thumb img, body.page-id-835 .featured-event-thumb, body.page-id-835 .featured-event-thumb img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }

    .cta-fw .two-col-cta-wrapper {
        align-items: normal;
    }
    body.home .wp-block-columns.alignfull.has-background[style*="#006938"], body.page-id-835 .wp-block-columns.alignfull.has-background[style*="#006938"] {
        padding-left: 0;
        padding-right: 0;
    }
    body.home .wp-block-columns.alignfull.has-background[style*="#006938"] h2, body.page-id-835 .wp-block-columns.alignfull.has-background[style*="#006938"] h2 {
        padding-left: 1.25rem;
    }
    .volunteer-options-home h4.wp-block-heading {
        font-size: 0.6rem !important;
    }
    .sub-page-banner h4.wp-block-heading, .volunteer-page h4.wp-block-heading {
        font-size: 1.5rem;
    }
    .sub-page-banner h2.wp-block-heading, .volunteer-page h2.wp-block-h {
        font-size: 2.75rem !important;
    }
}


/* OPTIONAL: On very small screens, add spacing */
@media (max-width: 480px) {
    .volunteer-options-home {
        gap: 1rem;
    }
    .sub-page-banner h4.wp-block-heading, .volunteer-page h4.wp-block-heading {
        font-size: 1.2rem;
    }
    .sub-page-banner h2.wp-block-heading, .volunteer-page h2.wp-block-heading {
        font-size: 2.2rem !important;
    }
    .mission-core-values .wp-block-button {
        width: 100% !important;
    }
}
@media only screen and (max-width: 438px) {
    .two-column-layout-sub-page .styled-image-wrapper {
        max-height: auto;
        height: auto !important;
    }
}
@media only screen and (max-width: 336px) {
    header.site-header .c-header__logo a, header.site-header .c-header__logo img {
        max-height: 65px !important;
    }
}
