/* ===================================
   HOME BOX ONE BLOCK STYLES
   =================================== */



.community-partners-section.alignwide {
    overflow: hidden;
}


/* Main block container - ISOLATED to prevent conflicts */
.wp-block-acf-atax-community-partners .community-partners-section {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 64px 80px 64px 80px; /* Main container controls all side spacing */
    display: flex;
    flex-direction: column;
    gap: 60px;
    box-sizing: border-box;
    background: #354477; /* Dark blue background as per design */
    position: relative;
    color: white; /* White text on dark background */
    margin-top: 0px;
    margin-bottom: 48px;
    margin-top: 48px;
}

/* Main container - 1280px max-width as per design */
.community-partners-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
    z-index: 2; /* Above background logo */
    padding: 0; /* No side padding - main container controls it */
}

/* Container 1: Header with mascot, title and subtitle */
.community-partners-header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
    padding: 0; /* No side padding - main container controls it */
}

/* Mascot section */
.community-partners-mascot {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0; /* No side padding - main container controls it */
}

.community-partners-mascot-image {
    max-width: 200px; /* Reasonable mascot size */
    height: auto;
    display: block;
}

/* Header text section */
.community-partners-header-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    padding: 0; /* No side padding - main container controls it */
}

/* Headline above main title */
.community-partners-headline {
    font-size: 24px; /* Headline size */
    font-weight: 600; /* Semi-bold */
    line-height: 1.3;
    color: white; /* White text */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* Main title */
.community-partners-main-title {
    font-size: 48px; /* Large title as per design */
    font-weight: 700; /* Bold */
    line-height: 1.2;
    color: white; /* White text on dark background */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    hyphens: auto;
    text-align: center; /* Center align text */
    padding: 0; /* No side padding - main container controls it */
}

/* Container 2: Four columns of checkmark items */
.community-partners-items-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Four equal columns */
    gap: 64px; /* Space between items */
    padding: 0; /* No side padding - main container controls it */
}

/* Individual item */
.community-partners-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: start;
    text-align: left;
    padding: 0; /* No side padding - main container controls it */
}

/* Checkmark icon */
.community-partners-item-icon {
    flex-shrink: 0; /* Don't shrink icon */
    display: flex;
    justify-content: start;
    align-items: center;
}

.community-partners-item-icon .checkmark-icon {
    width: 32px; /* Icon size */
    height: 32px;
    display: block;
}

/* Item content */
.community-partners-item-content {
    flex: 1; /* Take remaining space */
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: start;
    text-align: left;
    padding: 0; /* No side padding - main container controls it */
}

/* Item title - Bold 16px as requested */
.community-partners-item-title {
    font-size: 16px; /* Bold 16px as requested */
    font-weight: 700; /* Bold */
    line-height: 1.3;
    color: white; /* White text */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* Item description */
.community-partners-item-description {
    font-size: 16px; /* Smaller description text */
    font-weight: 400; /* Regular weight */
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* Container 3: Bottom text and button */
.community-partners-bottom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 0; /* No side padding - main container controls it */
}

/* Main description - now two lines */
.community-partners-description {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: start;
    text-align: left;
    padding: 0; /* No side padding - main container controls it */
}

/* Description line 1 - bold */
.community-partners-description-line-1 {
    font-size: 16px; /* Body text size */
    font-weight: 700; /* Bold weight */
    line-height: 1.6;
    color: white; /* White text */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* Description line 2 - bold */
.community-partners-description-line-2 {
    font-size: 16px; /* Body text size */
    font-weight: 700; /* Bold weight */
    line-height: 1.6;
    color: white; /* White text */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* Button container */
.community-partners-button {
    display: flex;
    justify-content: start;
    align-items: start;
    padding: 0; /* No side padding - main container controls it */
}

/* Reusable ATAX button styles */
.atax-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Space between icon and text */
    padding: 16px 32px;
    background-color: #FFD700; /* Yellow background */
    color: #354477; /* Dark blue text */
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-height: 48px;
}

.atax-button:hover {
    background-color: #FFED4E; /* Lighter yellow on hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}


.atax-button-text {
    color: inherit;
    font-weight: inherit;
}

/* Background logo watermark - positioned on left side */
.community-partners-background-logo {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70%; 
    opacity: 0.08;
    pointer-events: none; 
    z-index: 1; 
    overflow: hidden; 
}

.community-partners-background-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom left;
    display: block;
    position: relative;
    top: 400px; 
    right: 250px;
}

/* Inner layout for Community Partners (do not adjust outer container or background) */
.community-partners-grid {
    display: flex;
    gap: 64px;
    align-items: center;
}

.community-partners-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 2; /* Takes more space than logos */
}

.community-partners-eyebrow {
    font-size: 14px;
    letter-spacing: .08em;
    font-weight: 700;
    color: #fff;
    opacity: .95;
    font-family: 'Montserrat', sans-serif;
}

.community-partners-heading {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.community-partners-description {
    margin: 0;
}

.community-partners-description {
    font-family: 'Montserrat', sans-serif;
}

.community-partners-description p,
.community-partners-description ul,
.community-partners-description ol,
.community-partners-description li {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #fff;
    margin: 0 0 12px 0;
    font-family: 'Montserrat', sans-serif;
}

.community-partners-description ul,
.community-partners-description ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.community-partners-description li {
    margin-bottom: 8px;
}

.community-partners-description p:last-child {
    margin-bottom: 0;
}

.community-partners-button {
    margin-top: 8px;
}

.community-partners-right {
    display: flex;
    justify-content: end;
    align-items: center;
    flex: 1; /* Takes less space than left column */
}

.community-partners-logos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 350px;
}

.community-partners-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Only show hover effects when there are real partners */
.community-partners-logos-grid.has-real-partners .community-partners-logo-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.community-partners-logo {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    object-fit: contain;
}

/* Only show logo hover effects when there are real partners */
.community-partners-logos-grid.has-real-partners .community-partners-logo:hover {
    opacity: 1;
}

/* Hide hover effects completely when showing placeholders */
.community-partners-logos-grid.has-placeholders .community-partners-logo-item:hover {
    background: transparent;
}

.community-partners-logos-grid.has-placeholders .community-partners-logo:hover {
    opacity: 0.9; /* Keep original opacity, no change on hover */
}

/* Responsive adjustments for inner content only */
@media (max-width: 1150px) {
    .community-partners-grid {
        flex-direction: column;
        gap: 48px;
    }
    .community-partners-left {
        flex: none; /* Reset flex on mobile */
    }
    .community-partners-right {
        flex: none; /* Reset flex on mobile */
    }
    .community-partners-heading {
        font-size: 40px;
    }
    .community-partners-logos-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .community-partners-grid {
        gap: 32px;
    }
    .community-partners-heading {
        font-size: 32px;
    }
    .community-partners-logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .community-partners-logo-item {
        padding: 12px;
    }
    .community-partners-logo {
        max-height: 50px;
    }
}

/* ===================================
   RESPONSIVE DESIGN - GLOBAL FRAMEWORK
   =================================== */

/* Laptop (1151px-1600px) - Same layout, reduced gaps only */
@media (max-width: 1600px) {
    .wp-block-acf-atax-community-partners .community-partners-section {
        padding: 72px 80px 64px 80px; /* Reduced top padding */
        gap: 50px; /* Reduced gap */
    }
    .community-partners-container {
        gap: 50px; /* Reduced gap */
    }
    .community-partners-items-container {
        gap: 28px; /* Reduced gap between items */
    }
    /* NO font size changes - same fonts as desktop */
}

/* Tablet (768px-1150px) - Layout optimization, columns stack */
@media (max-width: 1150px) {
    .wp-block-acf-atax-community-partners .community-partners-section {
        padding: 64px 32px 64px 32px;
        gap: 45px;
    }
    .community-partners-container {
        max-width: 100%;
        gap: 45px; /* Reduced gap */
        padding: 0; /* No side padding - main container controls it */
    }
    .community-partners-items-container {
        grid-template-columns: repeat(2, 1fr); /* Two columns on tablet */
        gap: 24px; /* Reduced gap for tablet */
    }
    .community-partners-header-container {
        gap: 28px; /* Reduced gap for tablet */
    }
    .community-partners-bottom-container {
        gap: 28px; /* Reduced gap for tablet */
    }
    .community-partners-background-logo {
        width: 80%;
    }
    /* NO font size changes - same fonts as desktop */
}

/* Mobile (0px-767px) - Stacked layout, mobile optimization */
@media (max-width: 767px) {
    .wp-block-acf-atax-community-partners .community-partners-section {
        padding: 48px 16px 48px 16px; /* Proper mobile padding with bottom */
        gap: 40px;
    }
    .community-partners-container {
        gap: 40px; /* Scaled down for mobile */
        padding: 0; /* No side padding - main container controls it */
    }
    .community-partners-items-container {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 24px; /* Reduced gap for mobile */
    }
    .community-partners-header-container {
        gap: 24px; /* Reduced gap for mobile */
    }
    .community-partners-bottom-container {
        gap: 24px; /* Reduced gap for mobile */
    }
    .community-partners-mascot-image {
        max-width: 150px; /* Smaller mascot on mobile */
    }
    .community-partners-main-title {
        font-size: 36px; /* 48px → 36px for mobile readability (framework exception) */
    }
    .community-partners-description-line-1,
    .community-partners-description-line-2 {
        font-size: 16px; /* 18px → 16px for mobile readability */
    }
    .community-partners-background-logo {
        width: 100%;
    }
    .community-partners-background-logo img {
        top: 200px;
    }
    /* NO other font size changes - same fonts as desktop */
}

/* ===================================
   ALIGNMENT SUPPORT
   =================================== */

/* Wide alignment support */
.wp-block-acf-atax-community-partners .community-partners-section.alignwide {
    max-width: var(--wide-width, 1280px);
}

/* Full width alignment support */
.wp-block-acf-atax-community-partners .community-partners-section.alignfull {
    max-width: 100%;
}

/* ===================================
   OVERFLOW PROTECTION & TEXT HANDLING
   =================================== */

/* Prevent text overflow on all screen sizes */
.wp-block-acf-atax-community-partners .community-partners-main-title,
.wp-block-acf-atax-community-partners .community-partners-headline,
.wp-block-acf-atax-community-partners .community-partners-description-line-1,
.wp-block-acf-atax-community-partners .community-partners-description-line-2,
.wp-block-acf-atax-community-partners .community-partners-item-title,
.wp-block-acf-atax-community-partners .community-partners-item-description {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    margin: 0px;
}

/* Ensure containers don't cause horizontal scroll */
.wp-block-acf-atax-community-partners .community-partners-section {
    max-width: 100%;
}

/* Ensure grid containers don't overflow */
.wp-block-acf-atax-community-partners .community-partners-container {
    min-width: 0;
}

/* Ensure grid doesn't overflow */
.wp-block-acf-atax-community-partners .community-partners-items-container {
    min-width: 0;
}
