/* Grid Layout */
.wp-authors-grid {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.wp-authors-columns-2 { grid-template-columns: repeat(2, 1fr); }
.wp-authors-columns-3 { grid-template-columns: repeat(3, 1fr); }
.wp-authors-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .wp-authors-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .wp-authors-grid { grid-template-columns: 1fr; }
}

/* Card Style */
.wp-authors-card {
    background: #fff;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wp-authors-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.wp-authors-info {
    padding: 20px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wp-authors-name {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    color: #333;
    font-weight: 700;
}

/* Button Style as requested */
.wp-authors-button {
    background-color: #000000;
    color: #ffffff;
    padding: 12px 40px;
    box-shadow: 8px 8px 0 #57a8f2;
    border: none;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
    font-size: 14px;
}

.wp-authors-button:hover {
    box-shadow: 12px 12px 0 #57a8f2;
}

.wp-authors-button:active {
    transform: translate(2px, 2px);
}

/* Modal Styles */
/* Forçar o modal a estar acima de tudo, incluindo o header do Flatsome */
body .wp-authors-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 9999999999 !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.wp-authors-modal-container {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    padding: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 9999999999;
}

.wp-authors-modal-body {
    overflow-y: auto;
    color: #333;
    padding: 20px;
}

/* Botão de fechar posicionado no canto superior direito do modal */
.wp-authors-modal-close {
    position: absolute !important;
    top: -20px !important;
    right: -20px !important;
    background: #000000 !important;
    width: 44px !important;
    height: 44px !important;
    cursor: pointer !important;
    z-index: 2147483647 !important;
    border: 2px solid #ffffff !important;
    box-shadow: 4px 4px 0px #57a8f2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.wp-authors-modal-close svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
}

.wp-authors-modal-close:hover {
    box-shadow: 6px 6px 0px #57a8f2 !important;
    transform: translate(-2px, -2px) !important;
}

/* Ajuste para mobile para o botão não sair do ecrã */
@media (max-width: 600px) {
    .wp-authors-modal-close {
        top: 10px !important;
        right: 10px !important;
    }
    .wp-authors-modal-container {
        padding-top: 50px;
    }
}



.wp-authors-modal-image img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.wp-authors-modal-title {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.wp-authors-modal-description {
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Prevent body scroll when modal is open */
body.wp-authors-modal-open {
    overflow: hidden;
}

.wp-authors-loader {
    text-align: center;
    padding: 40px;
    font-style: italic;
}
