.se-porto__controls { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem; justify-content:center; }
.se-porto__search-wrapper, .se-porto__sort-wrapper { position:relative; display:inline-block; width:100%; }

/* Tablet and desktop adjustments */
@media (min-width: 768px) {
    .se-porto__search-wrapper, .se-porto__sort-wrapper { width:auto; }
}
.se-porto__search, .se-porto__sort { padding:.6rem 1.2rem; border:1px solid #ddd; background:#fff; border-radius:20px; font-size:1rem; }
.se-porto__search { min-width:100%; padding-left:3rem; }
.se-porto__sort { min-width:100%; padding-left:3rem; }

/* Tablet and desktop adjustments */
@media (min-width: 768px) {
    .se-porto__search { min-width:400px; }
    .se-porto__sort { min-width:250px; }
}
.se-porto__search-icon, .se-porto__sort-icon { position:absolute; left:1rem; top:50%; transform:translateY(-50%); z-index:1; pointer-events:none; display:flex; align-items:center; }
.se-porto__search-icon svg, .se-porto__sort-icon svg { width:20px; height:20px; }
.se-porto__chips { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:2rem; justify-content:center; }
.se-porto__chip { padding:.4rem .8rem; border:1px solid #ddd; background:#fff; cursor:pointer; border-radius:20px; font-size:.85rem; transition:all 0.2s ease; }
.se-porto__chip:hover { border-color:#999; background:#f8f8f8; }
.se-porto__chip.is-active { background:#FFCB1D; color:#000; border-color:#FFCB1D; }
.se-porto__grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:16px; }
.se-porto__grid:has(.se-porto__loading), .se-porto__grid:has(.se-porto__empty) { display:flex; justify-content:center; align-items:center; }
.se-porto__card { border:1px solid #e6e6e6; border-radius:10px; overflow:hidden; background:#fff; display:flex; flex-direction:column; height:100%; }
.se-porto__thumb img { display:block; width:100%; height:auto; }
.se-porto__video { position:relative; width:100%; height:0; padding-bottom:56.25%; /* 16:9 aspect ratio */ }
.se-porto__video iframe { position:absolute; top:0; left:0; width:100%; height:100%; border:0; }
.se-porto__body { padding:14px; flex:1; display:flex; flex-direction:column; }
.se-porto__title { 
    margin:0 0 .25rem; 
    color: #212121;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
}
.se-porto__subtitle { 
    margin:0 0 .5rem; 
    color: #757575;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    text-transform: capitalize;
    line-height: 1.5;
}
.se-porto__description { 
    margin:.5rem 0 1rem; 
    color: #212121;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    text-transform: lowercase;
    line-height:1.4; 
    flex:1; 
}

/* Responsive font sizes */
@media (min-width: 768px) {
    .se-porto__title { font-size: 20px; }
    .se-porto__subtitle { font-size: 16px; }
    .se-porto__description { font-size: 14px; }
}
.se-porto__excerpt { margin:.25rem 0 .5rem; color:#555; }
.se-porto__tags { 
    display:flex; 
    gap:.25rem; 
    flex-wrap:nowrap; 
    overflow:hidden;
    max-width:100%;
}
.se-porto__tag { 
    color: #424242;
    font-family: "Open Sans", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    border: 0.5px solid #BDBDBD;
    background: #F5F5F5;
    padding: .05rem .4rem;
    border-radius:999px; 
    flex-shrink: 0;
    white-space: nowrap;
}

/* Hide tags beyond the first 3 */
.se-porto__tag:nth-child(n+4) {
    display: none;
}
.se-porto__pages { display:flex; gap:.25rem; justify-content:center; margin:16px 0; align-items:center; }
.se-porto__page { padding:.4rem .65rem; border:1px solid #ddd; background:#fff; cursor:pointer; border-radius:50%; width:40px; height:40px; display:flex; align-items:center; justify-content:center; }
.se-porto__page.is-active { font-weight:600; background:#FFCB1D; color:#000; border-color:#FFCB1D; }
.se-porto__page[disabled] { opacity:.5; cursor:not-allowed; }
.se-porto__ellipsis { padding:0 .25rem; }
.se-porto.is-loading .se-porto__grid { opacity:.5; }
.se-porto__loading { display:flex; justify-content:center; align-items:center; padding:4rem 2rem; min-height:300px; width:100%; }
.se-porto__loading-spinner { width:40px; height:40px; border:4px solid #f3f3f3; border-top:4px solid #FFCB1D; border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin { 0% { transform:rotate(0deg); } 100% { transform:rotate(360deg); } }
.se-porto__empty { text-align:center; padding:4rem 2rem; color:#666; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:300px; }
.se-porto__empty-icon { margin-bottom:1rem; opacity:0.7; }
.se-porto__empty-icon svg { width:48px; height:48px; }

/* Responsive icon sizes */
@media (min-width: 768px) {
    .se-porto__empty-icon svg { width:64px; height:64px; }
}
.se-porto__empty-title { font-size:1.5rem; margin:0 0 0.5rem; color:#333; font-weight:600; }
.se-porto__empty-text { font-size:1rem; margin:0; opacity:0.8; }

/* Action buttons and see detail link */
.se-porto__actions {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    padding-top: 1rem;
    gap: 0.75rem;
}

.se-porto__buttons-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.se-porto__mentor-btn, .se-porto__fund-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #BDBDBD;
    background: #fff;
    color: #424242;
    font-family: "Open Sans", sans-serif;
    text-align: center;
}

.se-porto__fund-btn {
    background: #FFCB1D;
    color: #000;
    border-color: #FFCB1D;
}

.se-porto__mentor-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.se-porto__fund-btn:hover {
    background: #e6b800;
    border-color: #e6b800;
}

.se-porto__see-detail {
    color: #424242;
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
    font-family: "Open Sans", sans-serif;
    align-self: flex-end;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.se-porto__see-detail svg {
    width: 16px;
    height: 17px;
    transition: fill 0.2s ease;
}

.se-porto__see-detail:hover {
    color: #FFCB1D;
}

.se-porto__see-detail:hover svg path {
    fill: #FFCB1D;
}

/* Responsive adjustments for action buttons */
@media (min-width: 768px) {
    .se-porto__mentor-btn, .se-porto__fund-btn {
        font-size: 14px;
        padding: 0.6rem 1.2rem;
    }
    
    .se-porto__see-detail {
        font-size: 14px;
    }
}

/* Modal Styles - Force highest position */
body.modal-open {
    overflow: hidden !important;
}

/* Force modal to be highest on WordPress */
#se-porto-modal,
.se-porto__modal {
    z-index: 2147483647 !important; /* Maximum z-index value */
    position: fixed !important;
}

/* Override any WordPress theme z-index */
body #se-porto-modal,
body .se-porto__modal {
    z-index: 2147483647 !important;
}

/* Force modal content above everything */
.se-porto__modal-content {
    z-index: 2147483648 !important;
    position: relative !important;
}

/* Override WordPress admin bar */
#wpadminbar ~ * .se-porto__modal,
#wpadminbar ~ .se-porto__modal {
    z-index: 2147483647 !important;
}

/* Override any theme modals or overlays */
body .se-porto__modal {
    z-index: 2147483647 !important;
}

/* Force modal to appear above WordPress admin */
@media screen and (max-width: 782px) {
    .se-porto__modal {
        z-index: 2147483647 !important;
    }
}

.se-porto__modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999 !important;
    overflow-y: auto;
}

.se-porto__modal.is-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.se-porto__modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1 !important;
}

.se-porto__modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 2 !important;
}

.se-porto__modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.se-porto__modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.se-porto__modal-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.se-porto__modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.se-porto__modal-body {
    padding: 2rem;
    text-align: center;
}

.se-porto__modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #212121;
    margin: 0 0 0.5rem 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    text-transform: uppercase;
}

.se-porto__modal-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #757575;
    margin: 0 0 0.5rem 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    line-height: 1.5;
}

.se-porto__modal-description {
    font-size: 14px;
    color: #212121;
    margin: 0 0 1.5rem 0;
    font-family: "Open Sans", sans-serif;
    line-height: 1.6;
}

.se-porto__modal-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    font-size: 14px;
    color: #424242;
    font-family: "Open Sans", sans-serif;
}

.se-porto__modal-field svg {
    flex-shrink: 0;
}

.se-porto__modal-fields-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    margin-top: -14px;
    flex-wrap: wrap;
}

.se-porto__modal-location,
.se-porto__modal-impact {
    margin: 0.5rem 0;
}

.se-porto__modal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: center;
}

.se-porto__modal-tag {
    color: #424242;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    font-weight: 400;
    border: 0.5px solid #BDBDBD;
    background: #F5F5F5;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.se-porto__modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.se-porto__modal-mentor-btn, .se-porto__modal-fund-btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #BDBDBD;
    background: #fff;
    color: #424242;
    font-family: "Open Sans", sans-serif;
    flex: 1;
    /* max-width: 200px; */
}

.se-porto__modal-fund-btn {
    background: #FFCB1D;
    color: #000;
    border-color: #FFCB1D;
}

.se-porto__modal-mentor-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.se-porto__modal-fund-btn:hover {
    background: #e6b800;
    border-color: #e6b800;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .se-porto__modal.is-open {
        padding: 0.5rem;
    }
    
    .se-porto__modal-content {
        max-height: 95vh;
    }
    
    .se-porto__modal-body {
        padding: 1.5rem;
    }
    
    .se-porto__modal-title {
        font-size: 20px;
    }
    
    .se-porto__modal-subtitle {
        font-size: 14px;
    }
    
    .se-porto__modal-description {
        font-size: 13px;
    }
    
    .se-porto__modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .se-porto__modal-mentor-btn, .se-porto__modal-fund-btn {
        max-width: none;
        width: 100%;
    }
}
