/* ========================================
   COMMUNITY GRID - FINAL CORRECTED
   ======================================== */

/* Grid Layout - 4 Columns */
.foz-community-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    margin: 40px 0;
    /* Removed outer borders to match Figma inner-grid style */
}

@media (min-width: 600px) {
    .foz-community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .foz-community-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card Item - Inner Borders Logic */
.foz-community-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 50px 15px;
    /* Borders: Default to Mobile (1 col) -> Top separator only */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-bottom: none;
    border-left: none;
}

/* Base: Remove top border for the very first item (first row of 1 column) */
.foz-community-item:first-child {
    border-top: none;
}

/* Desktop (4 Columns) overrides */
@media (min-width: 1024px) {

    /* Right border for columns 1, 2, 3. None for 4. */
    .foz-community-item {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .foz-community-item:nth-child(4n) {
        border-right: none;
    }

    /* Top border logic for 4-column grid (First row is 1-4) */
    .foz-community-item:nth-child(-n+4) {
        border-top: none;
    }
}

/* Tablet (2 Columns) overrides */
@media (max-width: 1023px) and (min-width: 600px) {

    /* Right border for column 1. None for 2. */
    .foz-community-item {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .foz-community-item:nth-child(2n) {
        border-right: none;
    }

    /* Top border logic for 2-column grid (First row is 1-2) */
    .foz-community-item:nth-child(-n+2) {
        border-top: none;
    }
}

/* Mobile is covered by base styles (1 col, no right border, top border for all except 1st) */


/* ========================================
   IMAGE WRAPPER & DECORATIVE SHAPES
   Technique: Solid Filled Offset Circles
   Based on "Ozgul Sokullu" Reference
   ======================================== */

.foz-community-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    /* Create visual stacking context */
    z-index: 0;
}

/* --- RED SHAPE ---
   Large solid red circle, positioned behind image,
   offset to the BOTTOM-LEFT significantly.
   Reference shows it curving nicely roughly from 6 o'clock to 9 o'clock.
*/
.foz-deco-red {
    position: absolute;
    width: 130px;
    height: 130px;
    left: -10px;
    bottom: -10px;
    background-color: var(--theme-palette-color-1, #D32F2F);
    border-radius: 50%;
    z-index: 0;
    /* Behind everything */
}

/* --- LIGHT GREY CIRCLE ---
   Positioned on the RIGHT side, seemingly the "upper" of the two grey bubbles.
   Around 3 o'clock position.
   Behind the dark grey one.
*/
.foz-deco-light {
    position: absolute;
    width: 50px;
    height: 50px;
    right: -20px;
    top: 120px;
    transform: translateY(-50%);
    /* Centered vertically on right edge */
    background-color: #e5e5e5;
    /* Very light grey */
    border-radius: 50%;
    z-index: 1;
    /* Same level as red, behind dark/image */
}

/* --- DARK GREY CIRCLE ---
   Positioned on the RIGHT side, "lower".
   Around 4-5 o'clock position.
   It appears to be visually "in front" of the light grey one in the female ref?
   (Or it's darker, making it prominent).
*/
.foz-deco-dark {
    position: absolute;
    width: 60px;
    height: 60px;
    right: 0px;
    bottom: 0px;
    background-color: #555;
    /* Dark grey */
    border-radius: 50%;
    z-index: 1;
    /* In front of light grey (z-0) */
}

/* --- MAIN IMAGE --- */
.foz-community-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}


/* ========================================
   TYPOGRAPHY
   ======================================== */

.foz-community-name {
    font-size: 26px !important;
    margin: 0 0 8px 0;
    font-weight: 400;
}

.foz-community-role {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.5;
    margin: 0 auto 15px;
    max-width: 200px;
}


/* ========================================
   SOCIAL ICONS
   ======================================== */

.foz-community-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.foz-community-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--theme-palette-color-1, #C41E3A);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s;
}

.foz-community-social a:hover {
    transform: scale(1.1);
}

.foz-community-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* ========================================
   VIEW PROFILE LINK
   ======================================== */

.foz-community-link {
    font-size: 13px;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--theme-palette-color-1, #C41E3A);
    text-underline-offset: 3px;
    margin-top: 15px;
    display: inline-block;
    transition: text-decoration-color 0.2s;
}

.foz-community-link:hover {
    color: #fff;
    text-decoration-color: var(--theme-palette-color-1, #C41E3A);
}


/* ========================================
   SEARCH BAR
   ======================================== */
/* ========================================
   SEARCH BAR
   ======================================== */
/* ========================================
   SEARCH BAR
   ======================================== */
.foz-community-search {
    position: relative;
    max-width: 500px;
    /* Wider to match FAQ/Reference */
    margin: 0 auto 40px !important;
}

.foz-community-search-input {
    width: 100% !important;
    padding: 15px 60px 15px 20px !important;
    /* Space for icon button */
    background-color: #fff !important;
    border: none !important;
    border-radius: 2px !important;
    /* Slight radius or none */
    color: #333 !important;
    font-size: 16px !important;
    line-height: normal !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
    height: auto !important;
    min-height: 50px !important;
}

.foz-community-search-input:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5) !important;
    /* Focus ring */
    background-color: #fff !important;
}

.foz-community-search-input::placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

.foz-search-icon {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    background-color: #EEF0F5 !important;
    /* Light grey circle */
    border-radius: 50% !important;
    color: #333 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.foz-search-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2px !important;
    fill: none !important;
    stroke: currentColor !important;
}

/* ========================================
   LOAD MORE BUTTON
   ======================================== */
.foz-community-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.foz-community-load-more {
    display: inline-block;
    padding: 12px 40px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.foz-community-load-more:hover {
    background-color: #d31616;
    transform: translateY(-2px);
}

.foz-community-load-more:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.foz-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

/* ========================================
   PROJECT GRID OVERRIDES
   ======================================== */

.foz-grid-type-project {
    gap: 20px;
    /* Force gap for separation */
}

/* Reset existing borders for project grid items */
.foz-grid-type-project .foz-community-item {
    border: none !important;
}

/* Project Card Style */
.foz-project-item {
    background-color: #fff;
    width: 100%;
    height: 100%;
    padding: 30px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    box-sizing: border-box;
}

/* Project Logo */
.foz-project-logo-wrap {
    height: 60px;
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    /* Center vertically in the 60px space */
    justify-content: flex-start;
}

.foz-project-logo-wrap img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 100px;
}

/* Typography */
.foz-project-title {
    font-size: 1.8em !important;
    font-weight: 700;
    color: #000;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.foz-project-alumni-name {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    font-weight: 400;
}

/* Review Button */
.foz-project-review-btn {
    margin-top: auto;
    /* Push to bottom */
    display: inline-block;
    padding: 8px 20px;
    background-color: #f1f1f1;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.foz-project-review-btn:hover {
    background-color: var(--theme-palette-color-1, #D32F2F);
    color: #fff;
}